<PackageReference Include="System.Drawing.Common" Version="10.0.0-preview.1.25080.3" />

Graphics

Encapsulates a GDI+ drawing surface. This class cannot be inherited.
public sealed delegate DrawImageAbort : MulticastDelegate

Provides a callback method for deciding when the DrawImage method should prematurely cancel execution and stop drawing an image.

public sealed delegate EnumerateMetafileProc : MulticastDelegate

Provides a callback method for the EnumerateMetafile method.

public Region Clip { get; set; }

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

public RectangleF ClipBounds { get; }

Gets a RectangleF structure that bounds the clipping region of this Graphics.

public CompositingMode CompositingMode { get; set; }

Gets a value that specifies how composited images are drawn to this Graphics.

Gets or sets the rendering quality of composited images drawn to this Graphics.

public float DpiX { get; }

Gets the horizontal resolution of this Graphics.

public float DpiY { get; }

Gets the vertical resolution of this Graphics.

public InterpolationMode InterpolationMode { get; set; }

Gets or sets the interpolation mode associated with this Graphics.

public bool IsClipEmpty { get; }

Gets a value indicating whether the clipping region of this Graphics is empty.

public bool IsVisibleClipEmpty { get; }

Gets a value indicating whether the visible clipping region of this Graphics is empty.

public float PageScale { get; set; }

Gets or sets the scaling between world units and page units for this Graphics.

public GraphicsUnit PageUnit { get; set; }

Gets or sets the unit of measure used for page coordinates in this Graphics.

public PixelOffsetMode PixelOffsetMode { get; set; }

Gets or sets a value specifying how pixels are offset during rendering of this Graphics.

public Point RenderingOrigin { get; set; }

Gets or sets the rendering origin of this Graphics for dithering and for hatch brushes.

public SmoothingMode SmoothingMode { get; set; }

Gets or sets the rendering quality for this Graphics.

public int TextContrast { get; set; }

Gets or sets the gamma correction value for rendering text.

public TextRenderingHint TextRenderingHint { get; set; }

Gets or sets the rendering mode for text associated with this Graphics.

public Matrix Transform { get; set; }

Gets or sets a copy of the geometric world transformation for this Graphics.

public RectangleF VisibleClipBounds { get; }

Gets the bounding rectangle of the visible clipping region of this Graphics.

public static Graphics FromHdc(IntPtr hdc)

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

public static Graphics FromHdc(IntPtr hdc, IntPtr hdevice)

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

public static Graphics FromHdcInternal(IntPtr hdc)

Returns a Graphics for the specified device context.

public static Graphics FromHwnd(IntPtr hwnd)

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

public static Graphics FromHwndInternal(IntPtr hwnd)

Creates a new Graphics for the specified windows handle.

public static Graphics FromImage(Image image)

Creates a new Graphics from the specified Image.

public static IntPtr GetHalftonePalette()

Gets a handle to the current Windows halftone palette.

public void AddMetafileComment(byte[] data)

Adds a comment to the current Metafile.

Saves a graphics container with the current state of this Graphics and opens and uses a new graphics container.

Saves a graphics container with the current state of this Graphics and opens and uses a new graphics container with the specified scale transformation.

Saves a graphics container with the current state of this Graphics and opens and uses a new graphics container with the specified scale transformation.

public void Clear(Color color)

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

public void CopyFromScreen(Point upperLeftSource, Point upperLeftDestination, Size blockRegionSize)

Performs a bit-block transfer of color data, corresponding to a rectangle of pixels, from the screen to the drawing surface of the Graphics.

public void CopyFromScreen(Point upperLeftSource, Point upperLeftDestination, Size blockRegionSize, CopyPixelOperation copyPixelOperation)

Performs a bit-block transfer of color data, corresponding to a rectangle of pixels, from the screen to the drawing surface of the Graphics.

public void CopyFromScreen(int sourceX, int sourceY, int destinationX, int destinationY, Size blockRegionSize)

Performs a bit-block transfer of the color data, corresponding to a rectangle of pixels, from the screen to the drawing surface of the Graphics.

public void CopyFromScreen(int sourceX, int sourceY, int destinationX, int destinationY, Size blockRegionSize, CopyPixelOperation copyPixelOperation)

Performs a bit-block transfer of the color data, corresponding to a rectangle of pixels, from the screen to the drawing surface of the Graphics.

public void Dispose()

Releases all resources used by this Graphics.

public void DrawArc(Pen pen, Rectangle rect, float startAngle, float sweepAngle)

Draws an arc representing a portion of an ellipse specified by a Rectangle structure.

public void DrawArc(Pen pen, RectangleF rect, float startAngle, float sweepAngle)

Draws an arc representing a portion of an ellipse specified by a RectangleF structure.

public void DrawArc(Pen pen, int x, int y, int width, int height, int startAngle, int sweepAngle)

Draws an arc representing a portion of an ellipse specified by a pair of coordinates, a width, and a height.

public void DrawArc(Pen pen, float x, float y, float width, float height, float startAngle, float sweepAngle)

Draws an arc representing a portion of an ellipse specified by a pair of coordinates, a width, and a height.

public void DrawBezier(Pen pen, Point pt1, Point pt2, Point pt3, Point pt4)

Draws a Bézier spline defined by four Point structures.

public void DrawBezier(Pen pen, PointF pt1, PointF pt2, PointF pt3, PointF pt4)

Draws a Bézier spline defined by four PointF structures.

public void DrawBezier(Pen pen, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)

Draws a Bézier spline defined by four ordered pairs of coordinates that represent points.

public void DrawBeziers(Pen pen, PointF[] points)

Draws a series of Bézier splines from an array of structures.

public void DrawBeziers(Pen pen, Point[] points)

Draws a series of Bézier splines from an array of Point structures.

public void DrawClosedCurve(Pen pen, PointF[] points)

Draws a closed cardinal spline defined by an array of structures.

public void DrawClosedCurve(Pen pen, PointF[] points, float tension, FillMode fillmode)

Draws a closed cardinal spline defined by an array of PointF structures using a specified tension.

public void DrawClosedCurve(Pen pen, Point[] points)

Draws a closed cardinal spline defined by an array of structures.

public void DrawClosedCurve(Pen pen, Point[] points, float tension, FillMode fillmode)

Draws a closed cardinal spline defined by an array of structures using a specified tension.

public void DrawCurve(Pen pen, PointF[] points)

Draws a cardinal spline through a specified array of structures.

public void DrawCurve(Pen pen, PointF[] points, int offset, int numberOfSegments)

Draws a cardinal spline through a specified array of structures. The drawing begins offset from the beginning of the array.

public void DrawCurve(Pen pen, PointF[] points, int offset, int numberOfSegments, float tension)

Draws a cardinal spline through a specified array of structures using a specified tension. The drawing begins offset from the beginning of the array.

public void DrawCurve(Pen pen, PointF[] points, float tension)

Draws a cardinal spline through a specified array of structures using a specified tension.

public void DrawCurve(Pen pen, Point[] points)

Draws a cardinal spline through a specified array of structures.

public void DrawCurve(Pen pen, Point[] points, int offset, int numberOfSegments, float tension)

Draws a cardinal spline through a specified array of Point structures using a specified tension.

public void DrawCurve(Pen pen, Point[] points, float tension)

Draws a cardinal spline through a specified array of structures using a specified tension.

public void DrawEllipse(Pen pen, Rectangle rect)

Draws an ellipse specified by a bounding Rectangle structure.

public void DrawEllipse(Pen pen, RectangleF rect)

Draws an ellipse defined by a bounding RectangleF.

public void DrawEllipse(Pen pen, int x, int y, int width, int height)

Draws an ellipse defined by a bounding rectangle specified by coordinates for the upper-left corner of the rectangle, a height, and a width.

public void DrawEllipse(Pen pen, float x, float y, float width, float height)

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

public void DrawIcon(Icon icon, Rectangle targetRect)

Draws the image represented by the specified Icon within the area specified by a Rectangle structure.

public void DrawIcon(Icon icon, int x, int y)

Draws the image represented by the specified Icon at the specified coordinates.

public void DrawIconUnstretched(Icon icon, Rectangle targetRect)

Draws the image represented by the specified Icon without scaling the image.

public void DrawImage(Image image, Point point)

Draws the specified Image, using its original physical size, at the specified location.

public void DrawImage(Image image, PointF point)

Draws the specified Image, using its original physical size, at the specified location.

public void DrawImage(Image image, PointF[] destPoints)

Draws the specified Image at the specified location and with the specified shape and size.

public void DrawImage(Image image, PointF[] destPoints, RectangleF srcRect, GraphicsUnit srcUnit)

Draws the specified portion of the specified Image at the specified location and with the specified size.

public void DrawImage(Image image, PointF[] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr)

Draws the specified portion of the specified Image at the specified location and with the specified size.

public void DrawImage(Image image, PointF[] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback)

Draws the specified portion of the specified Image at the specified location and with the specified size.

public void DrawImage(Image image, PointF[] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback, int callbackData)

Draws the specified portion of the specified Image at the specified location and with the specified size.

public void DrawImage(Image image, Point[] destPoints)

Draws the specified Image at the specified location and with the specified shape and size.

public void DrawImage(Image image, Point[] destPoints, Rectangle srcRect, GraphicsUnit srcUnit)

Draws the specified portion of the specified Image at the specified location and with the specified size.

public void DrawImage(Image image, Point[] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr)

Draws the specified portion of the specified Image at the specified location.

public void DrawImage(Image image, Point[] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback)

Draws the specified portion of the specified Image at the specified location and with the specified size.

public void DrawImage(Image image, Point[] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback, int callbackData)

Draws the specified portion of the specified Image at the specified location and with the specified size.

public void DrawImage(Image image, Rectangle rect)

Draws the specified Image at the specified location and with the specified size.

public void DrawImage(Image image, Rectangle destRect, Rectangle srcRect, GraphicsUnit srcUnit)

Draws the specified portion of the specified Image at the specified location and with the specified size.

public void DrawImage(Image image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit)

Draws the specified portion of the specified Image at the specified location and with the specified size.

public void DrawImage(Image image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr)

Draws the specified portion of the specified Image at the specified location and with the specified size.

public void DrawImage(Image image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback)

Draws the specified portion of the specified Image at the specified location and with the specified size.

public void DrawImage(Image image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttrs, DrawImageAbort callback, IntPtr callbackData)

Draws the specified portion of the specified Image at the specified location and with the specified size.

public void DrawImage(Image image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit)

Draws the specified portion of the specified Image at the specified location and with the specified size.

public void DrawImage(Image image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttrs)

Draws the specified portion of the specified Image at the specified location and with the specified size.

public void DrawImage(Image image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttrs, DrawImageAbort callback)

Draws the specified portion of the specified Image at the specified location and with the specified size.

public void DrawImage(Image image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttrs, DrawImageAbort callback, IntPtr callbackData)

Draws the specified portion of the specified Image at the specified location and with the specified size.

public void DrawImage(Image image, RectangleF rect)

Draws the specified Image at the specified location and with the specified size.

public void DrawImage(Image image, RectangleF destRect, RectangleF srcRect, GraphicsUnit srcUnit)

Draws the specified portion of the specified Image at the specified location and with the specified size.

public void DrawImage(Image image, int x, int y)

Draws the specified image, using its original physical size, at the location specified by a coordinate pair.

public void DrawImage(Image image, int x, int y, Rectangle srcRect, GraphicsUnit srcUnit)

Draws a portion of an image at a specified location.

public void DrawImage(Image image, int x, int y, int width, int height)

Draws the specified Image at the specified location and with the specified size.

public void DrawImage(Image image, float x, float y)

Draws the specified Image, using its original physical size, at the specified location.

public void DrawImage(Image image, float x, float y, RectangleF srcRect, GraphicsUnit srcUnit)

Draws a portion of an image at a specified location.

public void DrawImage(Image image, float x, float y, float width, float height)

Draws the specified Image at the specified location and with the specified size.

public void DrawImageUnscaled(Image image, Point point)

Draws a specified image using its original physical size at a specified location.

public void DrawImageUnscaled(Image image, Rectangle rect)

Draws a specified image using its original physical size at a specified location.

public void DrawImageUnscaled(Image image, int x, int y)

Draws the specified image using its original physical size at the location specified by a coordinate pair.

public void DrawImageUnscaled(Image image, int x, int y, int width, int height)

Draws a specified image using its original physical size at a specified location.

public void DrawImageUnscaledAndClipped(Image image, Rectangle rect)

Draws the specified image without scaling and clips it, if necessary, to fit in the specified rectangle.

public void DrawLine(Pen pen, Point pt1, Point pt2)

Draws a line connecting two Point structures.

public void DrawLine(Pen pen, PointF pt1, PointF pt2)

Draws a line connecting two PointF structures.

public void DrawLine(Pen pen, int x1, int y1, int x2, int y2)

Draws a line connecting the two points specified by the coordinate pairs.

public void DrawLine(Pen pen, float x1, float y1, float x2, float y2)

Draws a line connecting the two points specified by the coordinate pairs.

public void DrawLines(Pen pen, PointF[] points)

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

public void DrawLines(Pen pen, Point[] points)

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

public void DrawPath(Pen pen, GraphicsPath path)

Draws a GraphicsPath.

public void DrawPie(Pen pen, Rectangle rect, float startAngle, float sweepAngle)

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

public void DrawPie(Pen pen, RectangleF rect, float startAngle, float sweepAngle)

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

public void DrawPie(Pen pen, int x, int y, int width, int height, int startAngle, int sweepAngle)

Draws a pie shape defined by an ellipse specified by a coordinate pair, a width, a height, and two radial lines.

public void DrawPie(Pen pen, float x, float y, float width, float height, float startAngle, float sweepAngle)

Draws a pie shape defined by an ellipse specified by a coordinate pair, a width, a height, and two radial lines.

public void DrawPolygon(Pen pen, PointF[] points)

Draws a polygon defined by an array of structures.

public void DrawPolygon(Pen pen, Point[] points)

Draws a polygon defined by an array of Point structures.

public void DrawRectangle(Pen pen, Rectangle rect)

Draws a rectangle specified by a Rectangle structure.

public void DrawRectangle(Pen pen, int x, int y, int width, int height)

Draws a rectangle specified by a coordinate pair, a width, and a height.

public void DrawRectangle(Pen pen, float x, float y, float width, float height)

Draws a rectangle specified by a coordinate pair, a width, and a height.

public void DrawRectangles(Pen pen, RectangleF[] rects)

Draws a series of rectangles specified by structures.

public void DrawRectangles(Pen pen, Rectangle[] rects)

Draws a series of rectangles specified by Rectangle structures.

public void DrawString(string s, Font font, Brush brush, PointF point)

Draws the specified text string at the specified location with the specified Brush and Font objects.

public void DrawString(string s, Font font, Brush brush, PointF point, StringFormat format)

Draws the specified text string at the specified location with the specified Brush and Font objects using the formatting attributes of the specified StringFormat.

public void DrawString(string s, Font font, Brush brush, RectangleF layoutRectangle)

Draws the specified text string in the specified rectangle with the specified Brush and Font objects.

public void DrawString(string s, Font font, Brush brush, RectangleF layoutRectangle, StringFormat format)

Draws the specified text string in the specified rectangle with the specified Brush and Font objects using the formatting attributes of the specified StringFormat.

public void DrawString(string s, Font font, Brush brush, float x, float y)

Draws the specified text string at the specified location with the specified Brush and Font objects.

public void DrawString(string s, Font font, Brush brush, float x, float y, StringFormat format)

Draws the specified text string at the specified location with the specified Brush and Font objects using the formatting attributes of the specified StringFormat.

public void EndContainer(GraphicsContainer container)

Closes the current graphics container and restores the state of this Graphics to the state saved by a call to the BeginContainer method.

public void EnumerateMetafile(Metafile metafile, Point destPoint, EnumerateMetafileProc callback)

Sends the records in the specified Metafile, one at a time, to a callback method for display at a specified point.

public void EnumerateMetafile(Metafile metafile, Point destPoint, EnumerateMetafileProc callback, IntPtr callbackData)

Sends the records in the specified Metafile, one at a time, to a callback method for display at a specified point.

public void EnumerateMetafile(Metafile metafile, Point destPoint, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)

Sends the records in the specified Metafile, one at a time, to a callback method for display at a specified point using specified image attributes.

public void EnumerateMetafile(Metafile metafile, Point destPoint, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback)

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display at a specified point.

public void EnumerateMetafile(Metafile metafile, Point destPoint, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData)

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display at a specified point.

public void EnumerateMetafile(Metafile metafile, Point destPoint, Rectangle srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display at a specified point using specified image attributes.

public void EnumerateMetafile(Metafile metafile, PointF destPoint, EnumerateMetafileProc callback)

Sends the records in the specified Metafile, one at a time, to a callback method for display at a specified point.

public void EnumerateMetafile(Metafile metafile, PointF destPoint, EnumerateMetafileProc callback, IntPtr callbackData)

Sends the records in the specified Metafile, one at a time, to a callback method for display at a specified point.

public void EnumerateMetafile(Metafile metafile, PointF destPoint, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)

Sends the records in the specified Metafile, one at a time, to a callback method for display at a specified point using specified image attributes.

public void EnumerateMetafile(Metafile metafile, PointF destPoint, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback)

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display at a specified point.

public void EnumerateMetafile(Metafile metafile, PointF destPoint, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData)

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display at a specified point.

public void EnumerateMetafile(Metafile metafile, PointF destPoint, RectangleF srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display at a specified point using specified image attributes.

public void EnumerateMetafile(Metafile metafile, PointF[] destPoints, EnumerateMetafileProc callback)

Sends the records in the specified Metafile, one at a time, to a callback method for display in a specified parallelogram.

public void EnumerateMetafile(Metafile metafile, PointF[] destPoints, EnumerateMetafileProc callback, IntPtr callbackData)

Sends the records in the specified Metafile, one at a time, to a callback method for display in a specified parallelogram.

public void EnumerateMetafile(Metafile metafile, PointF[] destPoints, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)

Sends the records in the specified Metafile, one at a time, to a callback method for display in a specified parallelogram using specified image attributes.

public void EnumerateMetafile(Metafile metafile, PointF[] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback)

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified parallelogram.

public void EnumerateMetafile(Metafile metafile, PointF[] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData)

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified parallelogram.

public void EnumerateMetafile(Metafile metafile, PointF[] destPoints, RectangleF srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified parallelogram using specified image attributes.

public void EnumerateMetafile(Metafile metafile, Point[] destPoints, EnumerateMetafileProc callback)

Sends the records in the specified Metafile, one at a time, to a callback method for display in a specified parallelogram.

public void EnumerateMetafile(Metafile metafile, Point[] destPoints, EnumerateMetafileProc callback, IntPtr callbackData)

Sends the records in the specified Metafile, one at a time, to a callback method for display in a specified parallelogram.

public void EnumerateMetafile(Metafile metafile, Point[] destPoints, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)

Sends the records in the specified Metafile, one at a time, to a callback method for display in a specified parallelogram using specified image attributes.

public void EnumerateMetafile(Metafile metafile, Point[] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback)

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified parallelogram.

public void EnumerateMetafile(Metafile metafile, Point[] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData)

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified parallelogram.

public void EnumerateMetafile(Metafile metafile, Point[] destPoints, Rectangle srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)

Sends the records in a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified parallelogram using specified image attributes.

public void EnumerateMetafile(Metafile metafile, Rectangle destRect, EnumerateMetafileProc callback)

Sends the records of the specified Metafile, one at a time, to a callback method for display in a specified rectangle.

public void EnumerateMetafile(Metafile metafile, Rectangle destRect, EnumerateMetafileProc callback, IntPtr callbackData)

Sends the records of the specified Metafile, one at a time, to a callback method for display in a specified rectangle.

public void EnumerateMetafile(Metafile metafile, Rectangle destRect, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)

Sends the records of the specified Metafile, one at a time, to a callback method for display in a specified rectangle using specified image attributes.

public void EnumerateMetafile(Metafile metafile, Rectangle destRect, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback)

Sends the records of a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified rectangle.

public void EnumerateMetafile(Metafile metafile, Rectangle destRect, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData)

Sends the records of a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified rectangle.

public void EnumerateMetafile(Metafile metafile, Rectangle destRect, Rectangle srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)

Sends the records of a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified rectangle using specified image attributes.

public void EnumerateMetafile(Metafile metafile, RectangleF destRect, EnumerateMetafileProc callback)

Sends the records of the specified Metafile, one at a time, to a callback method for display in a specified rectangle.

public void EnumerateMetafile(Metafile metafile, RectangleF destRect, EnumerateMetafileProc callback, IntPtr callbackData)

Sends the records of the specified Metafile, one at a time, to a callback method for display in a specified rectangle.

public void EnumerateMetafile(Metafile metafile, RectangleF destRect, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)

Sends the records of the specified Metafile, one at a time, to a callback method for display in a specified rectangle using specified image attributes.

public void EnumerateMetafile(Metafile metafile, RectangleF destRect, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback)

Sends the records of a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified rectangle.

public void EnumerateMetafile(Metafile metafile, RectangleF destRect, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData)

Sends the records of a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified rectangle.

public void EnumerateMetafile(Metafile metafile, RectangleF destRect, RectangleF srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)

Sends the records of a selected rectangle from a Metafile, one at a time, to a callback method for display in a specified rectangle using specified image attributes.

public void ExcludeClip(Rectangle rect)

Updates the clip region of this Graphics to exclude the area specified by a Rectangle structure.

public void ExcludeClip(Region region)

Updates the clip region of this Graphics to exclude the area specified by a Region.

public void FillClosedCurve(Brush brush, PointF[] points)

Fills the interior of a closed cardinal spline curve defined by an array of structures.

public void FillClosedCurve(Brush brush, PointF[] points, FillMode fillmode)

Fills the interior of a closed cardinal spline curve defined by an array of structures using the specified fill mode.

public void FillClosedCurve(Brush brush, PointF[] points, FillMode fillmode, float tension)

Fills the interior of a closed cardinal spline curve defined by an array of PointF structures using the specified fill mode and tension.

public void FillClosedCurve(Brush brush, Point[] points)

Fills the interior of a closed cardinal spline curve defined by an array of structures.

public void FillClosedCurve(Brush brush, Point[] points, FillMode fillmode)

Fills the interior of a closed cardinal spline curve defined by an array of structures using the specified fill mode.

public void FillClosedCurve(Brush brush, Point[] points, FillMode fillmode, float tension)

Fills the interior of a closed cardinal spline curve defined by an array of structures using the specified fill mode and tension.

public void FillEllipse(Brush brush, Rectangle rect)

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

public void FillEllipse(Brush brush, RectangleF rect)

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

public void FillEllipse(Brush brush, int x, int y, int width, int height)

Fills the interior of an ellipse defined by a bounding rectangle specified by a pair of coordinates, a width, and a height.

public void FillEllipse(Brush brush, float x, float y, float width, float height)

Fills the interior of an ellipse defined by a bounding rectangle specified by a pair of coordinates, a width, and a height.

public void FillPath(Brush brush, GraphicsPath path)

Fills the interior of a GraphicsPath.

public void FillPie(Brush brush, Rectangle rect, float startAngle, float sweepAngle)

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

public void FillPie(Brush brush, int x, int y, int width, int height, int startAngle, int sweepAngle)

Fills the interior of a pie section defined by an ellipse specified by a pair of coordinates, a width, a height, and two radial lines.

public void FillPie(Brush brush, float x, float y, float width, float height, float startAngle, float sweepAngle)

Fills the interior of a pie section defined by an ellipse specified by a pair of coordinates, a width, a height, and two radial lines.

public void FillPolygon(Brush brush, PointF[] points)

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

public void FillPolygon(Brush brush, PointF[] points, FillMode fillMode)

Fills the interior of a polygon defined by an array of points specified by structures using the specified fill mode.

public void FillPolygon(Brush brush, Point[] points)

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

public void FillPolygon(Brush brush, Point[] points, FillMode fillMode)

Fills the interior of a polygon defined by an array of points specified by Point structures using the specified fill mode.

public void FillRectangle(Brush brush, Rectangle rect)

Fills the interior of a rectangle specified by a Rectangle structure.

public void FillRectangle(Brush brush, RectangleF rect)

Fills the interior of a rectangle specified by a RectangleF structure.

public void FillRectangle(Brush brush, int x, int y, int width, int height)

Fills the interior of a rectangle specified by a pair of coordinates, a width, and a height.

public void FillRectangle(Brush brush, float x, float y, float width, float height)

Fills the interior of a rectangle specified by a pair of coordinates, a width, and a height.

public void FillRectangles(Brush brush, RectangleF[] rects)

Fills the interiors of a series of rectangles specified by RectangleF structures.

public void FillRectangles(Brush brush, Rectangle[] rects)

Fills the interiors of a series of rectangles specified by structures.

public void FillRegion(Brush brush, Region region)

Fills the interior of a Region.

public void Flush()

Forces execution of all pending graphics operations and returns immediately without waiting for the operations to finish.

public void Flush(FlushIntention intention)

Forces execution of all pending graphics operations with the method waiting or not waiting, as specified, to return before the operations finish.

public object GetContextInfo()

Gets the cumulative graphics context.

public IntPtr GetHdc()

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

public Color GetNearestColor(Color color)

Gets the nearest color to the specified Color structure.

public void IntersectClip(Rectangle rect)

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

public void IntersectClip(RectangleF rect)

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

public void IntersectClip(Region region)

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

public bool IsVisible(Point point)

Indicates whether the specified Point structure is contained within the visible clip region of this Graphics.

public bool IsVisible(PointF point)

Indicates whether the specified PointF structure is contained within the visible clip region of this Graphics.

public bool IsVisible(Rectangle rect)

Indicates whether the rectangle specified by a Rectangle structure is contained within the visible clip region of this Graphics.

public bool IsVisible(RectangleF rect)

Indicates whether the rectangle specified by a RectangleF structure is contained within the visible clip region of this Graphics.

public bool IsVisible(int x, int y)

Indicates whether the point specified by a pair of coordinates is contained within the visible clip region of this Graphics.

public bool IsVisible(int x, int y, int width, int height)

Indicates whether the rectangle specified by a pair of coordinates, a width, and a height is contained within the visible clip region of this Graphics.

public bool IsVisible(float x, float y)

Indicates whether the point specified by a pair of coordinates is contained within the visible clip region of this Graphics.

public bool IsVisible(float x, float y, float width, float height)

Indicates whether the rectangle specified by a pair of coordinates, a width, and a height is contained within the visible clip region of this Graphics.

public Region[] MeasureCharacterRanges(string text, Font font, RectangleF layoutRect, StringFormat stringFormat)

Gets an array of Region objects, each of which bounds a range of character positions within the specified string.

public SizeF MeasureString(string text, Font font)

Measures the specified string when drawn with the specified Font.

public SizeF MeasureString(string text, Font font, PointF origin, StringFormat stringFormat)

Measures the specified string when drawn with the specified and formatted with the specified .

public SizeF MeasureString(string text, Font font, SizeF layoutArea)

Measures the specified string when drawn with the specified within the specified layout area.

public SizeF MeasureString(string text, Font font, SizeF layoutArea, StringFormat stringFormat)

Measures the specified string when drawn with the specified and formatted with the specified .

public SizeF MeasureString(string text, Font font, SizeF layoutArea, StringFormat stringFormat, out int charactersFitted, out int linesFilled)

Measures the specified string when drawn with the specified and formatted with the specified .

public SizeF MeasureString(string text, Font font, int width)

Measures the specified string when drawn with the specified .

public SizeF MeasureString(string text, Font font, int width, StringFormat format)

Measures the specified string when drawn with the specified and formatted with the specified .

public void MultiplyTransform(Matrix matrix)

Multiplies the world transformation of this Graphics and specified the Matrix.

public void MultiplyTransform(Matrix matrix, MatrixOrder order)

Multiplies the world transformation of this Graphics and specified the Matrix in the specified order.

public void ReleaseHdc()

Releases a device context handle obtained by a previous call to the GetHdc method of this Graphics.

public void ReleaseHdc(IntPtr hdc)

Releases a device context handle obtained by a previous call to the GetHdc method of this Graphics.

public void ReleaseHdcInternal(IntPtr hdc)

Releases a handle to a device context.

public void ResetClip()

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

public void ResetTransform()

Resets the world transformation matrix of this Graphics to the identity matrix.

public void Restore(GraphicsState gstate)

Restores the state of this Graphics to the state represented by a GraphicsState.

public void RotateTransform(float angle)

Applies the specified rotation to the transformation matrix of this Graphics.

public void RotateTransform(float angle, MatrixOrder order)

Applies the specified rotation to the transformation matrix of this Graphics in the specified order.

Saves the current state of this Graphics and identifies the saved state with a GraphicsState.

public void ScaleTransform(float sx, float sy)

Applies the specified scaling operation to the transformation matrix of this Graphics by prepending it to the object's transformation matrix.

public void ScaleTransform(float sx, float sy, MatrixOrder order)

Applies the specified scaling operation to the transformation matrix of this Graphics in the specified order.

public void SetClip(GraphicsPath path)

Sets the clipping region of this Graphics to the specified GraphicsPath.

public void SetClip(GraphicsPath path, CombineMode combineMode)

Sets the clipping region of this Graphics to the result of the specified operation combining the current clip region and the specified GraphicsPath.

public void SetClip(Graphics g)

Sets the clipping region of this Graphics to the Clip property of the specified Graphics.

public void SetClip(Graphics g, CombineMode combineMode)

Sets the clipping region of this Graphics to the result of the specified combining operation of the current clip region and the Clip property of the specified Graphics.

public void SetClip(Rectangle rect)

Sets the clipping region of this Graphics to the rectangle specified by a Rectangle structure.

public void SetClip(Rectangle rect, CombineMode combineMode)

Sets the clipping region of this Graphics to the result of the specified operation combining the current clip region and the rectangle specified by a Rectangle structure.

public void SetClip(RectangleF rect)

Sets the clipping region of this Graphics to the rectangle specified by a RectangleF structure.

public void SetClip(RectangleF rect, CombineMode combineMode)

Sets the clipping region of this Graphics to the result of the specified operation combining the current clip region and the rectangle specified by a RectangleF structure.

public void SetClip(Region region, CombineMode combineMode)

Sets the clipping region of this Graphics to the result of the specified operation combining the current clip region and the specified Region.

public void TransformPoints(CoordinateSpace destSpace, CoordinateSpace srcSpace, PointF[] pts)

Transforms an array of points from one coordinate space to another using the current world and page transformations of this Graphics.

public void TransformPoints(CoordinateSpace destSpace, CoordinateSpace srcSpace, Point[] pts)

Transforms an array of points from one coordinate space to another using the current world and page transformations of this .

public void TranslateClip(int dx, int dy)

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

public void TranslateClip(float dx, float dy)

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

public void TranslateTransform(float dx, float dy)

Changes the origin of the coordinate system by prepending the specified translation to the transformation matrix of this Graphics.

public void TranslateTransform(float dx, float dy, MatrixOrder order)

Changes the origin of the coordinate system by applying the specified translation to the transformation matrix of this Graphics in the specified order.