paint method

  1. @override
void paint(
  1. PCanvas pCanvas
)
override

The paint operation of this element.

Implementation

@override
void paint(PCanvas pCanvas) {
  _lastPaintBoundingBox = PRectangle.fromDimension(0, 0, pCanvas.dimension);

  if (pCanvas.isZeroDimension) return;

  pCanvas.fillBottomUpGradient(
      0, 0, pCanvas.width, pCanvas.height, colorFrom, colorTo);
}