YoloxResultsPainter constructor
YoloxResultsPainter({})
Implementation
YoloxResultsPainter({
required this.image,
required this.results,
required this.labels,
Paint? drawRectPaint,
TextStyle? labelTextStyle,
}) {
final defaultDrawRectPaint = Paint()
..color = Colors.red
..style = PaintingStyle.stroke
..strokeWidth = min(image.width, image.height) * 0.01;
this.drawRectPaint = drawRectPaint ?? defaultDrawRectPaint;
this.labelTextStyle = labelTextStyle ??
TextStyle(
color: Colors.red,
fontWeight: FontWeight.bold,
fontSize: min(image.width, image.height) * 0.05,
);
}