fillLeftRightGradient method
void
fillLeftRightGradient()
override
Fill a rectangle (x
,y
, width
x height
) with a left right linear gradient.
See fillRightLeftGradient.
Implementation
@override
void fillLeftRightGradient(
num x, num y, num width, num height, PColor colorFrom, PColor colorTo) {
x = transform.x(x);
y = transform.y(y);
var grd = _ctx.createLinearGradient(x, y, x + width, y);
grd.addColorStop(0, colorFrom.toString());
grd.addColorStop(1, colorTo.toString());
_setFillStyleGradient(grd);
_ctx.fillRect(x, y, x + width, y + height);
}