Graphics Methods

The Graphics type exposes the following members.

Methods

Name Description
Public method Clear

Clears the entire drawing surface and fills it with the specified background color.

Public method Dispose

Releases all resources used by this Graphics.

Public method DrawArc Overloaded.

Draws an arc.

Public method DrawBezier Overloaded.
Public method DrawBeziers

Draws a series of Bezier splines from an array of Point structures.

Public method DrawEllipse Overloaded.
Public method DrawFormattedText Overloaded.

Draws the specified text in the specified rectangle according to its markup.

Public method DrawImage Overloaded.

Draws the specified Bitmap.

Public method DrawLine Overloaded.

Draws a line connecting the two points.

Public method DrawLines

Draws a series of line segments that connect an array of Point structures.

Public method DrawPie Overloaded.

Draws a pie shape defined by an ellipse and two radial lines.

Public method DrawPolygon

Draws a polygon defined by an array of Point structures.

Public method DrawRectangle Overloaded.

Draws a rectangle.

Public method DrawString Overloaded.

Draws the specified text string at the specified location.

Public method DrawText Overloaded.

Draws the specified text in the specified rectangle taking into account its line breaks and justification.

Public method Equals (Inherited from Object.)
Public method ExcludeClip Overloaded.

Updates the clip region of this Graphics by excluding a given area.

Public method FillEllipse Overloaded.

Fills the interior of an ellipse defined by a bounding rectangle.

Public method FillPie Overloaded.

Fills the interior of a pie section defined by an ellipse and two radial lines.

Public method FillPolygon Overloaded.

Fills the interior of a polygon defined by an array of points.

Public method FillRectangle Overloaded.

Fills the interior of a rectangle.

Protected method Finalize (Inherited from Object.)
Public method Static member FromHdc

Creates a new Graphics from the specified handle to a device context.

Public method Static member FromHwnd

Creates a new Graphics from the specified handle to a window.

Public method GetDC

Gets the handle to the device context associated with this Graphics.

Public method GetHashCode (Inherited from Object.)
Public method GetPixel

Gets the color of the specified pixel.

Public method GetType (Inherited from Object.)
Public method IntersectClip Overloaded.

Updates the clip region of this Graphics to the intersection of the current clip region and the specified one.

Public method Static member MeasureFormattedText Overloaded.

Measures the specified formatted test when drawn with the specified Font within the specified region.

Public method Static member MeasureString

Measures the specified string when drawn with the specified Font.

Public method Static member MeasureText Overloaded.

Measures the specified test when drawn with the specified Font within the specified region.

Protected method MemberwiseClone (Inherited from Object.)
Public method ResetClip

Resets the clip region of this Graphics to an infinite region.

Public method SetClip Overloaded.

Sets the clipping region of this Graphics.

Public method SetPixel

Sets the color of the specified pixel.

Public method ToString (Inherited from Object.)
Public method TranslateClip

Translates the clipping region of this Graphics by specified amounts in the horizontal and vertical directions.

See Also

Reference