drawAnnotationsNormalized static method
- Painter painter,
- List<
NormalizedVertex> vertices, - {String color = 'red',
- int thickness = 3}
Draw a box on the supplied Painter around detected object using NormalizedVertex values.
Implementation
static void drawAnnotationsNormalized(
Painter painter, List<NormalizedVertex> vertices,
{String color = 'red', int thickness = 3}) {
final topLeft = vertices.first;
final bottomRight = vertices[2];
painter.drawRectangle(
(topLeft.x * painter.width).toInt(),
(topLeft.y * painter.height).toInt(),
(bottomRight.x * painter.width).toInt(),
(bottomRight.y * painter.height).toInt(),
color,
);
}