WidgetPainter.setClipRectangle

Sets the clip rectangle to the given settings. It will automatically calculate the intersection of your widget's content boundaries and your requested clip rectangle.

  1. Rectangle setClipRectangle(Rectangle rectangle)
  2. Rectangle setClipRectangle(Point upperLeft, int width, int height)
  3. Rectangle setClipRectangle(Point upperLeft, Size size)
    struct WidgetPainter
    setClipRectangle
    (
    Point upperLeft
    ,
    Size size
    )

Meta

History

Before February 26, 2025, you could sometimes exceed widget boundaries, as this forwarded directly to the underlying ScreenPainter. It now wraps it to calculate the intersection.