$applyPaint method
(Internal usage)
Applies the current paint to the given canvas
.
If this object has filters, each filter is updated, and the filter paint is resolved before applying the texture paint.
If the texture is not null, it is rendered with the current paint to
the canvas
. If _hasScale9Grid
is true, the object's scale is set to
_buffScaleX
and _buffScaleY
after rendering the texture.
Implementation
@override
void $applyPaint(ui.Canvas canvas) {
if (hasFilters) {
for (var filter in filters!) {
filter.update();
filter.currentObject = this;
filter.resolvePaint(_paint);
filter.currentObject = null;
}
}
texture?.render(canvas, _paint);
if (_hasScale9Grid) {
setScale(_buffScaleX, _buffScaleY);
}
}