paintOrigin property

double paintOrigin

The visual location of the first visible part of this sliver relative to its layout position.

For example, if the sliver wishes to paint visually before its layout position, the paintOrigin is negative. The coordinate system this sliver uses for painting is relative to this paintOrigin. In other words, when RenderSliver.paint is called, the (0, 0) position of the Offset given to it is at this paintOrigin.

The coordinate system used for the paintOrigin itself is relative to the start of this sliver's layout position rather than relative to its current position on the viewport. In other words, in a typical scrolling scenario, paintOrigin remains constant at 0.0 rather than tracking from 0.0 to SliverConstraints.viewportMainAxisExtent as the sliver scrolls past the viewport.

This value does not affect the layout of subsequent slivers. The next sliver is still placed at layoutExtent after this sliver's layout position. This value does affect where the paintExtent extent is measured from when computing the SliverConstraints.overlap for the next sliver.

Defaults to 0.0, which means slivers start painting at their layout position by default.


final double paintOrigin