Slide 29
Slide 29 text
Use the values from the SparseArray
for (int i = 0; i < sparseArray.size(); i++) {
Face face = sparseArray.valueAt(i);
float left = face.getPosition().x;
float top = face.getPosition().y;
float right = left + face.getWidth();
float bottom = right + face.getHeight();
float cornerRadius = 2.0f;
RectF rectF = new RectF(left, top, right, bottom);
canvas.drawRoundRect(rectF, cornerRadius, cornerRadius, rectPaint);
}