GraphicsPath.GetBounds Method ()
Returns a rectangle that bounds this GraphicsPath.
Assembly: System.Drawing (in System.Drawing.dll)
The size of the returned bounding rectangle is influenced by the type of end caps, pen width, and pen miter limit, and therefore produces a "loose fit" to the bounded path. The approximate formula is: the initial bounding rectangle is inflated by pen width, and this result is multiplied by the miter limit, plus some additional margin to allow for end caps.
Creates a graphics path.
Adds an ellipse (circle) to it and draws it to the screen.
Retrieves the bounding rectangle for the circle with a call toand draws the rectangle to the screen.
Creates a second graphics path.
Adds a circle and widens the path to a width of 10.
Draws the path to the screen.
Retrieves the bounding rectangle for the second circle.
Draws the bounding rectangle to the screen.
Displays the rectangle size in a dialog box.
Notice that the bounding rectangle on the right is larger (to account for the extra width of the line).
Available since 1.1