When overriding an OnPaint or OnPaintBackground method in an inheritor of System.Windows.Forms.Control, one argument is always a System.Windows.Forms.PaintEventArgs object. The partial object structure:
- PaintEventArgs
- ClipRectangle (System.Drawing.Rectangle)
- Graphics (System.Drawing.Graphics)
- Clip (System.Drawing.Region)
- ClipBounds (System.Drawing.RectangleF)
- VisibleClipBounds (System.Drawing.RectangleF)
Graphics.Clip appears to be a 1-bit map of applicable pixels to influence in subsequent paint operations.
MSDN: "Gets or sets a Region that limits the drawing region of this Graphics."
Graphics.ClipBounds is a read only rectangle that appears to be the minimum rectangle to fully contain the Clip region.
MSDN: "Gets a RectangleF structure that bounds the clipping region of this Graphics."
Graphics.VisibleClipBounds seems to be a more 'intelligent' clip, though I cannot understand how it operates.
MSDN: "Gets the bounding rectangle of the visible clipping region of this Graphics."
ClipRectangle appears to in all cases duplicate the Graphics.ClipBounds property.
MSDN: "Gets the rectangle in which to paint."
Can someone please answer the main question and potentially shed light on what all the various boundary objects are for?
Edit: added MSDN's descriptions as per Dan-o's answer.