paint method
Implementation
@override
void paint(PCanvas pCanvas, [GraphicContext? graphicContext]) {
graphicContext = resolveGraphicContext(graphicContext);
var x = graphicContext.position.x + this.x;
var y = graphicContext.position.y + this.y;
pCanvas.fillRect(
x, y, width, height, PStyle(color: graphicContext.backgroundColor));
var strokeSize = this.strokeSize;
if (strokeSize != null) {
pCanvas.strokeRect(
x, y, width, height, PStyle(color: graphicContext.color));
}
}