your painter (forwarded from paint) for drawing on the widget. The clip rectangle and coordinate translation are prepared for you ahead of time so you can use widget coordinates. It also has the theme foreground preloaded into the painter outline color, the theme font preloaded as the painter's active font, and the theme background preloaded as the painter's fill color.
the bounds, inside the widget, where your content should be drawn. This is the rectangle inside the border and padding (if any). The stuff outside is not clipped - it is still part of your widget - but you should respect these bounds for visual consistency and respecting the theme's area.
If you do want to clip it, you can of course call auto oldClip = painter.setClipRectangle(bounds); scope(exit) painter.setClipRectangle(oldClip); to modify it and return to the previous setting when you return.
The rectangle representing your actual content. Typically, this is simply return bounds;. The theme engine uses this return value to determine where the outline and overlay should be.
Added May 15, 2021
Responsible for drawing the content as the theme engine is responsible for other elements.