fillRect method
Fill a rectangle (x
,y
, width
x height
).
Implementation
@override
void fillRect(num x, num y, num width, num height, PStyle style) {
var xd = transform.xD(x);
var yd = transform.yD(y);
xd = canvasXD(xd);
yd = canvasYD(yd);
final widthD = canvasXD(width);
final heightD = canvasYD(height);
final rect = Rect.fromLTWH(xd, yd, widthD, heightD);
final paint = style.asPaintFill;
_widgetPainter.addOp((canvas, size) {
canvas.drawRect(rect, paint);
});
}