This documentation is archived and is not being maintained.

Graphics Members

Graphics overview

Public Properties

public propertyClip

Supported by the .NET Compact Framework.

Gets or sets a Region object that limits the drawing region of this Graphics object.
public propertyClipBounds

Supported by the .NET Compact Framework.

Gets a RectangleF structure that bounds the clipping region of this Graphics object.
public propertyCompositingMode Gets a value that specifies how composited images are drawn to this Graphics object.
public propertyCompositingQuality Gets or sets the rendering quality of composited images drawn to this Graphics object.
public propertyDpiX Gets the horizontal resolution of this Graphics object.
public propertyDpiY Gets the vertical resolution of this Graphics object.
public propertyInterpolationMode Gets or sets the interpolation mode associated with this Graphics object.
public propertyIsClipEmpty Gets a value indicating whether the clipping region of this Graphics object is empty.
public propertyIsVisibleClipEmpty Gets a value indicating whether the visible clipping region of this Graphics object is empty.
public propertyPageScale Gets or sets the scaling between world units and page units for this Graphics object.
public propertyPageUnit Gets or sets the unit of measure used for page coordinates in this Graphics object.
public propertyPixelOffsetMode Gets or set a value specifying how pixels are offset during rendering of this Graphics object.
public propertyRenderingOrigin Gets or sets the rendering origin of this Graphics object for dithering and for hatch brushes.
public propertySmoothingMode Gets or sets the rendering quality for this Graphics object.
public propertyTextContrast Gets or sets the gamma correction value for rendering text.
public propertyTextRenderingHint Gets or sets the rendering mode for text associated with this Graphics object.
public propertyTransform Gets or sets the world transformation for this Graphics object.
public propertyVisibleClipBounds Gets or sets the bounding rectangle of the visible clipping region of this Graphics object.

Public Methods

public methodAddMetafileComment Adds a comment to the current Metafile object.
public methodBeginContainer Overloaded. Saves a graphics container with the current state of this Graphics object and opens and uses a new graphics container.
public methodClear

Supported by the .NET Compact Framework.

Clears the entire drawing surface and fills it with the specified background color.
public methodCreateObjRef (inherited from MarshalByRefObject) Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
public methodDispose

Supported by the .NET Compact Framework.

Releases all resources used by this Graphics object.
public methodDrawArc Overloaded. Draws an arc representing a portion of an ellipse specified by a pair of coordinates, a width, and a height.
public methodDrawBezier Overloaded. Draws a Bzier spline defined by four Point structures.
public methodDrawBeziers Overloaded. Draws a series of Bzier splines from an array of Point structures.
public methodDrawClosedCurve Overloaded. Draws a closed cardinal spline defined by an array of Point structures.
public methodDrawCurve Overloaded. Draws a cardinal spline through a specified array of Point structures.
public methodDrawEllipse

Supported by the .NET Compact Framework.

Overloaded. Draws an ellipse defined by a bounding rectangle specified by a pair of coordinates, a height, and a width.
public methodDrawIcon

Supported by the .NET Compact Framework.

Overloaded. Draws the image represented by the specified Icon object at the specified coordinates.
public methodDrawIconUnstretched Draws the image represented by the specified Icon object without scaling the image.
public methodDrawImage

Supported by the .NET Compact Framework.

Overloaded. Draws the specified Image object at the specified location and with the original size.
public methodDrawImageUnscaled Overloaded. Draws the specified image using its original physical size at the location specified by a coordinate pair.
public methodDrawLine

Supported by the .NET Compact Framework.

Overloaded. Draws a line connecting the two points specified by coordinate pairs.
public methodDrawLines Overloaded. Draws a series of line segments that connect an array of Point structures.
public methodDrawPath Draws a GraphicsPath object.
public methodDrawPie Overloaded. Draws a pie shape defined by an ellipse specified by a coordinate pair, a width, and a height and two radial lines.
public methodDrawPolygon

Supported by the .NET Compact Framework.

Overloaded. Draws a polygon defined by an array of Point structures.
public methodDrawRectangle

Supported by the .NET Compact Framework.

Overloaded. Draws a rectangle specified by a coordinate pair, a width, and a height.
public methodDrawRectangles Overloaded. Draws a series of rectangles specified by Rectangle structures.
public methodDrawString

Supported by the .NET Compact Framework.

Overloaded. Draws the specified text string at the specified location with the specified Brush and Font objects.
public methodEndContainer Closes the current graphics container and restores the state of this Graphics object to the state saved by a call to the BeginContainer method.
public methodEnumerateMetafile Overloaded. Sends the records in the specified Metafile object, one at a time, to a callback method for display at a specified point.
public methodEquals (inherited from Object)

Supported by the .NET Compact Framework.

Overloaded. Determines whether two Object instances are equal.
public methodExcludeClip Overloaded. Updates the clip region of this Graphics object to exclude the area specified by a Rectangle structure.
public methodFillClosedCurve Overloaded. Fills the interior a closed cardinal spline curve defined by an array of Point structures.
public methodFillEllipse

Supported by the .NET Compact Framework.

Overloaded. Fills the interior of an ellipse defined by a bounding rectangle specified by a pair of coordinates, a width, and a height.
public methodFillPath Fills the interior of a GraphicsPath object.
public methodFillPie Overloaded. Fills the interior of a pie section defined by an ellipse specified by a pair of coordinates, a width, and a height and two radial lines.
public methodFillPolygon

Supported by the .NET Compact Framework.

Overloaded. Fills the interior of a polygon defined by an array of points specified by Point structures.
public methodFillRectangle

Supported by the .NET Compact Framework.

Overloaded. Fills the interior of a rectangle specified by a pair of coordinates, a width, and a height.
public methodFillRectangles Overloaded. Fills the interiors of a series of rectangles specified by Rectangle structures.
public methodFillRegion

Supported by the .NET Compact Framework.

Fills the interior of a Region object.
public methodFlush Overloaded. Forces execution of all pending graphics operations and returns immediately without waiting for the operations to finish.
public methodstatic (Shared in Visual Basic)FromHdc Overloaded. Creates a new Graphics object from the specified handle to a device context.
public methodstatic (Shared in Visual Basic)FromHdcInternal Internal method. Do not use.
public methodstatic (Shared in Visual Basic)FromHwnd Creates a new Graphics object from the specified handle to a window.
public methodstatic (Shared in Visual Basic)FromHwndInternal Internal method. Do not use.
public methodstatic (Shared in Visual Basic)FromImage

Supported by the .NET Compact Framework.

Creates a new Graphics object from the specified Image object.
public methodstatic (Shared in Visual Basic)GetHalftonePalette Gets a handle to the current Windows halftone palette.
public methodGetHashCode (inherited from Object)

Supported by the .NET Compact Framework.

Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
public methodGetHdc Gets the handle to the device context associated with this Graphics object.
public methodGetLifetimeService (inherited from MarshalByRefObject) Retrieves the current lifetime service object that controls the lifetime policy for this instance.
public methodGetNearestColor Gets the nearest color to the specified Color structure.
public methodGetType (inherited from Object)

Supported by the .NET Compact Framework.

Gets the Type of the current instance.
public methodInitializeLifetimeService (inherited from MarshalByRefObject) Obtains a lifetime service object to control the lifetime policy for this instance.
public methodIntersectClip Overloaded. Updates the clip region of this Graphics object to the intersection of the current clip region and the specified Rectangle structure.
public methodIsVisible Overloaded. Indicates whether the point specified by a pair of coordinates is contained within the visible clip region of this Graphics object.
public methodMeasureCharacterRanges Gets an array of Region objects, each of which bounds a range of character positions within the specified string.
public methodMeasureString

Supported by the .NET Compact Framework.

Overloaded. Measures the specified string when drawn with the specified Font object.
public methodMultiplyTransform Overloaded. Multiplies the world transformation of this Graphics object and specified the Matrix object.
public methodReleaseHdc Releases a device context handle obtained by a previous call to the GetHdc method of this Graphics object.
public methodReleaseHdcInternal Internal method. Do not use.
public methodResetClip

Supported by the .NET Compact Framework.

Resets the clip region of this Graphics object to an infinite region.
public methodResetTransform Resets the world transformation matrix of this Graphics object to the identity matrix.
public methodRestore Restores the state of this Graphics object to the state represented by a GraphicsState object.
public methodRotateTransform Overloaded. Applies the specified rotation to the transformation matrix of this Graphics object.
public methodSave Saves the current state of this Graphics object and identifies the saved state with a GraphicsState object.
public methodScaleTransform Overloaded. Applies the specified scaling operation to the transformation matrix of this Graphics object by prepending it to the object's transformation matrix.
public methodSetClip Overloaded. Sets the clipping region of this Graphics object to the Clip property of the specified Graphics object.
public methodToString (inherited from Object)

Supported by the .NET Compact Framework.

Returns a String that represents the current Object.
public methodTransformPoints Overloaded. Transforms an array of points from one coordinate space to another using the current world and page transformations of this Graphics object.
public methodTranslateClip Overloaded. Translates the clipping region of this Graphics object by specified amounts in the horizontal and vertical directions.
public methodTranslateTransform Overloaded. Prepends the specified translation to the transformation matrix of this Graphics object.

Protected Methods

protected methodFinalize

Supported by the .NET Compact Framework.

Overridden. See Object.Finalize.

In C# and C++, finalizers are expressed using destructor syntax.

protected methodMemberwiseClone (inherited from Object)

Supported by the .NET Compact Framework.

Creates a shallow copy of the current Object.

See Also

Graphics Class | System.Drawing Namespace

Show: