paintBoxModel method

void paintBoxModel(
  1. PaintingContext context,
  2. Offset offset
)

Implementation

void paintBoxModel(PaintingContext context, Offset offset) {
  // If opacity to zero, only paint intersection observer.
  if (alpha == 0) {
    paintIntersectionObserver(context, offset, paintNothing);
  } else if (isScrollingContentBox) {
    // Scrolling content box should only size painted.
    performPaint(context, offset);
  } else {
    // Paint fixed element to fixed position by compensating scroll offset
    double offsetY =
        scrollingOffsetY != null ? offset.dy + scrollingOffsetY! : offset.dy;
    double offsetX =
        scrollingOffsetX != null ? offset.dx + scrollingOffsetX! : offset.dx;
    offset = Offset(offsetX, offsetY);
    paintColorFilter(context, offset, _chainPaintImageFilter);
  }
}