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.

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.