Skip to main content

Graphics

Namespace: System.Drawing

Assembly: System.Drawing.Managed (4.0.0.0)

Encapsulates a GDI+ drawing surface.

public class Graphics : MarshalByRefObject, IDisposable

Properties

Instance member Clip

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

Instance member ClipBounds

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

Instance member CompositingMode

CompositingMode: Gets or sets a value that specifies how composited images are drawn to this Graphics.

Instance member CompositingQuality

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

Instance member DpiX

Single: Gets the horizontal resolution of this Graphics.

Instance member DpiY

Single: Gets the vertical resolution of this Graphics.

Instance member InterpolationMode

InterpolationMode: Gets or sets the interpolation mode associated with this Graphics.

Instance member IsClipEmpty

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

Instance member PageScale

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

Instance member PageUnit

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

Instance member PixelOffsetMode

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

Instance member RenderingOrigin

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

Instance member SmoothingMode

SmoothingMode: Gets or sets the rendering quality for this Graphics.

Instance member TextContrast

Int32: Gets or sets the gamma correction value for rendering text.

Instance member TextRenderingHint

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

Instance member Transform

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

GDI+ uses three coordinate spaces: world, page, and device. World coordinates are the coordinates used to model a particular graphic world and are the coordinates you pass to methods in the .NET Framework. Page coordinates refer to the coordinate system used by a drawing surface, such as a form or a control. Device coordinates are the coordinates used by the physical device being drawn on, such as a screen or a printer. The Transform property represents the world transformation, which maps world coordinates to page coordinates. Because the matrix returned and by the Transform property is a copy of the geometric transform, you should dispose of the matrix when you no longer need it.

Instance member VisibleClipBounds

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

Methods

Instance member BeginContainer()

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

Returns: GraphicsContainer. The GraphicsContainer.

Instance member BeginContainer(dstRect, srcRect, unit)

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

ParameterTypeDescription
dstRectRectangleRectangle structure that, together with the srcRect parameter, specifies a scale transformation for the container.
srcRectRectangleRectangle structure that, together with the dstRect parameter, specifies a scale transformation for the container.
unitGraphicsUnitMember of the GraphicsUnit enumeration that specifies the units of measure for the dstRect

Returns: GraphicsContainer. The GraphicsContainer.

Instance member BeginContainer(dstRect, srcRect, unit)

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

ParameterTypeDescription
dstRectRectangleFRectangleF structure that, together with the srcRect parameter, specifies a scale transformation for the container.
srcRectRectangleFRectangleF structure that, together with the dstRect parameter, specifies a scale transformation for the container.
unitGraphicsUnitMember of the GraphicsUnit enumeration that specifies the units of measure for the dstRect

Returns: GraphicsContainer. The GraphicsContainer.

Instance member Clear(color)

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

ParameterTypeDescription
colorColorColor structure that represents the background color of the drawing surface.

Instance member Dispose()

Instance member DrawArc(pen, x, y, width, height, startAngle, sweepAngle)

Draws an arc from the specified ellipse.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the arc.
xSingleThe x-coordinate of the upper-left corner of the rectangle that defines the ellipse.
ySingleThe y-coordinate of the upper-left corner of the rectangle that defines the ellipse.
widthSingleWidth of the rectangle that defines the ellipse.
heightSingleHeight of the rectangle that defines the ellipse.
startAngleSingleAngle in degrees measured clockwise from the x-axis to the starting point of the arc.
sweepAngleSingleAngle in degrees measured clockwise from the startAngle parameter to ending point of the arc.

Instance member DrawArc(pen, rect, startAngle, sweepAngle)

Draws an arc from the specified ellipse.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the arc.
rectRectangleFRectangleF structure that defines the boundaries of the ellipse.
startAngleSingleAngle in degrees measured clockwise from the x-axis to the starting point of the arc.
sweepAngleSingleAngle in degrees measured clockwise from the startAngle parameter to ending point of the arc.

Instance member DrawArc(pen, x, y, width, height, startAngle, sweepAngle)

Draws an arc from the specified ellipse.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the arc.
xInt32The x-coordinate of the upper-left corner of the rectangle that defines the ellipse.
yInt32The y-coordinate of the upper-left corner of the rectangle that defines the ellipse.
widthInt32Width of the rectangle that defines the ellipse.
heightInt32Height of the rectangle that defines the ellipse.
startAngleInt32Angle in degrees measured clockwise from the x-axis to the starting point of the arc.
sweepAngleInt32Angle in degrees measured clockwise from the startAngle parameter to ending point of the arc.

Throws:

Instance member DrawArc(pen, rect, startAngle, sweepAngle)

Draws an arc from the specified ellipse.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the arc.
rectRectangleRectangleF structure that defines the boundaries of the ellipse.
startAngleSingleAngle in degrees measured clockwise from the x-axis to the starting point of the arc.
sweepAngleSingleAngle in degrees measured clockwise from the startAngle parameter to ending point of the arc.

Instance member DrawBezier(pen, x1, y1, x2, y2, x3, y3, x4, y4)

Draws a Bezier spline defined by four ordered pairs of coordinates that represent points.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the curve.
x1SingleThe x-coordinate of the starting point of the curve.
y1SingleThe y-coordinate of the starting point of the curve.
x2SingleThe x-coordinate of the first control point of the curve.
y2SingleThe y-coordinate of the first control point of the curve.
x3SingleThe x-coordinate of the second control point of the curve.
y3SingleThe y-coordinate of the second control point of the curve.
x4SingleThe x-coordinate of the ending point of the curve.
y4SingleThe y-coordinate of the ending point of the curve.

Throws:

Instance member DrawBezier(pen, pt1, pt2, pt3, pt4)

Draws a Bezier spline defined by four PointF structures.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the curve.
pt1PointFPointF structure that represents the starting point of the curve.
pt2PointFPointF structure that represents the first control point for the curve.
pt3PointFPointF structure that represents the second control point for the curve.
pt4PointFPointF structure that represents the ending point of the curve.

Instance member DrawBezier(pen, pt1, pt2, pt3, pt4)

Draws a Bezier spline defined by four Point structures.

ParameterTypeDescription
penPenPen structure that determines the color, width, and style of the curve.
pt1PointPoint structure that represents the starting point of the curve.
pt2PointPoint structure that represents the first control point for the curve.
pt3PointPoint structure that represents the second control point for the curve.
pt4PointPoint structure that represents the ending point of the curve.

Instance member DrawBeziers(pen, points)

Draws a series of cubic Bezier curves from an array of points.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the curve.
pointsPointF[]Array of PointF structures that represent the points that determine the curve. The number of points in the array should be a multiple of 3 plus 1, such as 4, 7, or 10.

Instance member DrawBeziers(pen, points)

Draws a series of cubic Bezier curves from an array of points.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the curve.
pointsPoint[]Array of PointF structures that represent the points that determine the curve. The number of points in the array should be a multiple of 3 plus 1, such as 4, 7, or 10.

Instance member DrawClosedCurve(pen, points)

Draws a closed curve defined by an array of points.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the curve.
pointsPointF[]Array of PointF structures that define the spline.

Instance member DrawClosedCurve(pen, points, tension)

Draws a closed curve defined by an array of points.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the curve.
pointsPointF[]Array of PointF structures that define the spline.
tensionSingleValue greater than or equal to 0.0F that specifies the tension of the curve.

Instance member DrawClosedCurve(pen, points)

Draws a closed curve defined by an array of points.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the curve.
pointsPoint[]Array of Point structures that define the spline.

Instance member DrawClosedCurve(pen, points, tension)

Draws a closed curve defined by an array of points.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the curve.
pointsPoint[]Array of Point structures that define the spline.
tensionSingleValue greater than or equal to 0.0F that specifies the tension of the curve.

Instance member DrawCurve(pen, points)

Draws a curve defined by an array of points.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the curve.
pointsPointF[]An array of PointF structures that represents the points that define the curve.

Instance member DrawCurve(pen, points, tension)

Draws a curve defined by an array of points.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the curve.
pointsPointF[]An array of PointF structures that represents the points that define the curve.
tensionSingleA value that specifies the amount that the curve bends between control points. Values greater than 1 produce unpredictable results.

Instance member DrawCurve(pen, points, offset, numberOfSegments)

Draws a curve defined by an array of points.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the curve.
pointsPointF[]An array of PointF structures that represents the points that define the curve.
offsetInt32The index of the element in the points array that is used as the first point in the curve.
numberOfSegmentsInt32The number of segments used to draw the curve. A segment can be thought of as a line connecting two points.

Instance member DrawCurve(pen, points, offset, numberOfSegments, tension)

Draws a curve defined by an array of points.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the curve.
pointsPointF[]An array of PointF structures that represents the points that define the curve.
offsetInt32The index of the element in the points array that is used as the first point in the curve.
numberOfSegmentsInt32The number of segments used to draw the curve. A segment can be thought of as a line connecting two points.
tensionSingleA value that specifies the amount that the curve bends between control points. Values greater than 1 produce unpredictable results.

Instance member DrawCurve(pen, points)

Draws a curve defined by an array of points.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the curve.
pointsPoint[]An array of Point structures that represents the points that define the curve.

Instance member DrawCurve(pen, points, tension)

Draws a curve defined by an array of points.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the curve.
pointsPoint[]An array of Point structures that represents the points that define the curve.
tensionSingleA value that specifies the amount that the curve bends between control points. Values greater than 1 produce unpredictable results.

Instance member DrawCurve(pen, points, offset, numberOfSegments)

Draws a curve defined by an array of points.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the curve.
pointsPoint[]An array of PointF structures that represents the points that define the curve.
offsetInt32The index of the element in the points array that is used as the first point in the curve.
numberOfSegmentsInt32The number of segments used to draw the curve. A segment can be thought of as a line connecting two points.

Instance member DrawCurve(pen, points, offset, numberOfSegments, tension)

Draws a curve defined by an array of points.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the curve.
pointsPoint[]An array of Point structures that represents the points that define the curve.
offsetInt32The index of the element in the points array that is used as the first point in the curve.
numberOfSegmentsInt32The number of segments used to draw the curve. A segment can be thought of as a line connecting two points.
tensionSingleA value that specifies the amount that the curve bends between control points. Values greater than 1 produce unpredictable results.

Instance member DrawEllipse(pen, rect)

Draws the outline of an ellipse defined by a bounding rectangle.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the ellipse.
rectRectangleFRectangleF structure that defines the boundaries of the ellipse.

Instance member DrawEllipse(pen, x, y, width, height)

Draws the outline of an ellipse defined by a bounding rectangle.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the ellipse.
xSingleThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
ySingleThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
widthSingleWidth of the bounding rectangle that defines the ellipse.
heightSingleHeight of the bounding rectangle that defines the ellipse.

Instance member DrawEllipse(pen, rect)

Draws the outline of an ellipse specified by a bounding Rectangle structure.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the ellipse.
rectRectangleRectangle structure that defines the boundaries of the ellipse.

Instance member DrawEllipse(pen, x, y, width, height)

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

ParameterTypeDescription
penPenPen that determines the color, width, and style of the ellipse.
xInt32The x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
yInt32The y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
widthInt32Width of the bounding rectangle that defines the ellipse.
heightInt32Height of the bounding rectangle that defines the ellipse.

Instance member DrawImage(image, point)

Draws the specified image at the specified location.

ParameterTypeDescription
imageImageImage to draw.
pointPointFPoint structure that represents the location of the upper-left corner of the drawn image.

Throws:

Instance member DrawImage(image, x, y)

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

ParameterTypeDescription
imageImageImage to draw.
xSingleThe x-coordinate of the upper-left corner of the drawn image.
ySingleThe y-coordinate of the upper-left corner of the drawn image.

Throws:

Instance member DrawImage(image, rect)

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

ParameterTypeDescription
imageImageImage to draw.
rectRectangleFRectangle structure that specifies the location and size of the drawn image.

Throws:

Instance member DrawImage(image, x, y, width, height)

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

ParameterTypeDescription
imageImageImage to draw.
xSingleThe x-coordinate of the upper-left corner of the drawn image.
ySingleThe y-coordinate of the upper-left corner of the drawn image.
widthSingleWidth of the drawn image.
heightSingleHeight of the drawn image.

Throws:

Instance member DrawImage(image, point)

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

ParameterTypeDescription
imageImageImage to draw.
pointPointPoint structure that represents the location of the upper-left corner of the drawn image.

Throws:

Instance member DrawImage(image, x, y)

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

ParameterTypeDescription
imageImageImage to draw.
xInt32The x-coordinate of the upper-left corner of the drawn image.
yInt32The y-coordinate of the upper-left corner of the drawn image.

Throws:

Instance member DrawImage(image, rect)

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

ParameterTypeDescription
imageImageImage to draw.
rectRectangleRectangle structure that specifies the location and size of the drawn image.

Throws:

Instance member DrawImage(image, x, y, width, height)

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

ParameterTypeDescription
imageImageImage to draw.
xInt32The x-coordinate of the upper-left corner of the drawn image.
yInt32The y-coordinate of the upper-left corner of the drawn image.
widthInt32Width of the drawn image.
heightInt32Height of the drawn image.

Throws:

Instance member DrawImage(image, destPoints)

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

ParameterTypeDescription
imageImageImage to draw.
destPointsPointF[]Array of three PointF structures that define a parallelogram.

Throws:

Instance member DrawImage(image, destPoints)

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

ParameterTypeDescription
imageImageImage to draw.
destPointsPoint[]Array of three PointF structures that define a parallelogram.

Throws:

Instance member DrawImage(image, x, y, srcRect, srcUnit)

Draws a portion of an image at a specified location.

ParameterTypeDescription
imageImageImage to draw.
xSingleThe x-coordinate of the upper-left corner of the drawn image.
ySingleThe y-coordinate of the upper-left corner of the drawn image.
srcRectRectangleFRectangleF structure that specifies the portion of the image object to draw.
srcUnitGraphicsUnitMember of the GraphicsUnit enumeration that specifies the units of measure used by the srcRect parameter.

Throws:

Instance member DrawImage(image, x, y, srcRect, srcUnit)

Draws a portion of an image at a specified location.

ParameterTypeDescription
imageImageImage to draw.
xInt32The x-coordinate of the upper-left corner of the drawn image.
yInt32The y-coordinate of the upper-left corner of the drawn image.
srcRectRectangleRectangleF structure that specifies the portion of the image object to draw.
srcUnitGraphicsUnitMember of the GraphicsUnit enumeration that specifies the units of measure used by the srcRect parameter.

Throws:

Instance member DrawImage(image, destRect, srcRect, srcUnit)

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

ParameterTypeDescription
imageImageImage to draw.
destRectRectangleFRectangleF structure that specifies the location and size of the drawn image. The image is scaled to fit the rectangle.
srcRectRectangleFRectangleF structure that specifies the portion of the image object to draw.
srcUnitGraphicsUnitMember of the GraphicsUnit enumeration that specifies the units of measure used by the srcRect parameter.

Throws:

Instance member DrawImage(image, destRect, srcRect, srcUnit)

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

ParameterTypeDescription
imageImageImage to draw.
destRectRectangleRectangle structure that specifies the location and size of the drawn image. The image is scaled to fit the rectangle.
srcRectRectangleRectangle structure that specifies the portion of the image object to draw.
srcUnitGraphicsUnitMember of the GraphicsUnit enumeration that specifies the units of measure used by the srcRect parameter.

Throws:

Instance member DrawImage(image, destPoints, srcRect, srcUnit)

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

ParameterTypeDescription
imageImageImage to draw.
destPointsPointF[]Array of three PointF structures that define a parallelogram.
srcRectRectangleFRectangle structure that specifies the portion of the image object to draw.
srcUnitGraphicsUnitMember of the GraphicsUnit enumeration that specifies the units of measure used to determine the source rectangle.

Throws:

Instance member DrawImage(image, destPoints, srcRect, srcUnit, imageAttr)

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

ParameterTypeDescription
imageImageImage to draw.
destPointsPointF[]Array of three PointF structures that define a parallelogram.
srcRectRectangleFRectangle structure that specifies the portion of the image object to draw.
srcUnitGraphicsUnitMember of the GraphicsUnit enumeration that specifies the units of measure used to determine the source rectangle.
imageAttrImageAttributesImageAttributes that specifies recoloring and gamma information for the image object.

Throws:

Instance member DrawImage(image, destPoints, srcRect, srcUnit)

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

ParameterTypeDescription
imageImageImage to draw.
destPointsPoint[]Array of three Point structures that define a parallelogram.
srcRectRectangleRectangle structure that specifies the portion of the image object to draw.
srcUnitGraphicsUnitMember of the GraphicsUnit enumeration that specifies the units of measure used to determine the source rectangle.

Throws:

Instance member DrawImage(image, destPoints, srcRect, srcUnit, imageAttr)

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

ParameterTypeDescription
imageImageImage to draw.
destPointsPoint[]Array of three Point structures that define a parallelogram.
srcRectRectangleRectangle structure that specifies the portion of the image object to draw.
srcUnitGraphicsUnitMember of the GraphicsUnit enumeration that specifies the units of measure used to determine the source rectangle.
imageAttrImageAttributesImageAttributes that specifies recoloring and gamma information for the image object.

Throws:

Instance member DrawImage(image, destRect, srcX, srcY, srcWidth, srcHeight, srcUnit)

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

ParameterTypeDescription
imageImageImage to draw.
destRectRectangleRectangle structure that specifies the location and size of the drawn image. The image is scaled to fit the rectangle.
srcXSingleThe x-coordinate of the upper-left corner of the portion of the source image to draw.
srcYSingleThe y-coordinate of the upper-left corner of the portion of the source image to draw.
srcWidthSingleWidth of the portion of the source image to draw.
srcHeightSingleHeight of the portion of the source image to draw.
srcUnitGraphicsUnitMember of the GraphicsUnit enumeration that specifies the units of measure used to determine the source rectangle.

Throws:

Instance member DrawImage(image, destRect, srcX, srcY, srcWidth, srcHeight, srcUnit, imageAttr)

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

ParameterTypeDescription
imageImageImage to draw.
destRectRectangleRectangle structure that specifies the location and size of the drawn image. The image is scaled to fit the rectangle.
srcXSingleThe x-coordinate of the upper-left corner of the portion of the source image to draw.
srcYSingleThe y-coordinate of the upper-left corner of the portion of the source image to draw.
srcWidthSingleWidth of the portion of the source image to draw.
srcHeightSingleHeight of the portion of the source image to draw.
srcUnitGraphicsUnitMember of the GraphicsUnit enumeration that specifies the units of measure used to determine the source rectangle.
imageAttrImageAttributesImageAttributes that specifies recoloring and gamma information for the image object.

Throws:

Instance member DrawImage(image, destRect, srcX, srcY, srcWidth, srcHeight, srcUnit)

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

ParameterTypeDescription
imageImageImage to draw.
destRectRectangleRectangle structure that specifies the location and size of the drawn image. The image is scaled to fit the rectangle.
srcXInt32The x-coordinate of the upper-left corner of the portion of the source image to draw.
srcYInt32The y-coordinate of the upper-left corner of the portion of the source image to draw.
srcWidthInt32Width of the portion of the source image to draw.
srcHeightInt32Height of the portion of the source image to draw.
srcUnitGraphicsUnitMember of the GraphicsUnit enumeration that specifies the units of measure used to determine the source rectangle.

Throws:

Instance member DrawImage(image, destRect, srcX, srcY, srcWidth, srcHeight, srcUnit, imageAttr)

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

ParameterTypeDescription
imageImageImage to draw.
destRectRectangleRectangle structure that specifies the location and size of the drawn image. The image is scaled to fit the rectangle.
srcXInt32The x-coordinate of the upper-left corner of the portion of the source image to draw.
srcYInt32The y-coordinate of the upper-left corner of the portion of the source image to draw.
srcWidthInt32Width of the portion of the source image to draw.
srcHeightInt32Height of the portion of the source image to draw.
srcUnitGraphicsUnitMember of the GraphicsUnit enumeration that specifies the units of measure used to determine the source rectangle.
imageAttrImageAttributesImageAttributes that specifies recoloring and gamma information for the image object.

Throws:

Instance member DrawImageUnscaled(image, x, y)

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

ParameterTypeDescription
imageImageImage to draw.
xInt32The x-coordinate of the upper-left corner of the drawn image.
yInt32The y-coordinate of the upper-left corner of the drawn image.

Throws:

Instance member DrawImageUnscaled(image, x, y, width, height)

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

ParameterTypeDescription
imageImageImage to draw.
xInt32The x-coordinate of the upper-left corner of the drawn image.
yInt32The y-coordinate of the upper-left corner of the drawn image.
widthInt32Not used.
heightInt32Not used

Throws:

Instance member DrawImageUnscaled(image, point)

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

ParameterTypeDescription
imageImageImage to draw.
pointPointPoint structure that specifies the upper-left corner of the drawn image.

Throws:

Instance member DrawImageUnscaled(image, rect)

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

ParameterTypeDescription
imageImageImage to draw.
rectRectangleRectangle that specifies the upper-left corner of the drawn image. The X and Y properties of the rectangle specify the upper-left corner. The Width and Height properties are ignored.

Throws:

Instance member DrawImageUnscaledAndClipped(image, rect)

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

ParameterTypeDescription
imageImageThe Image to draw
rectRectangleThe Rectangle in which to draw the image.

Throws:

Instance member DrawLine(pen, x1, y1, x2, y2)

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

ParameterTypeDescription
penPenPen that determines the color, width, and style of the line.
x1Int32The x-coordinate of the first point.
y1Int32The y-coordinate of the first point.
x2Int32The x-coordinate of the second point.
y2Int32The y-coordinate of the second point.

Throws:

Instance member DrawLine(pen, x1, y1, x2, y2)

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

ParameterTypeDescription
penPenPen that determines the color, width, and style of the line.
x1SingleThe x-coordinate of the first point.
y1SingleThe y-coordinate of the first point.
x2SingleThe x-coordinate of the second point.
y2SingleThe y-coordinate of the second point.

Throws:

Instance member DrawLine(pen, pt1, pt2)

Draws a line connecting two PointF structures.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the line.
pt1PointPoint structure that represents the first point to connect.
pt2PointPoint structure that represents the second point to connect.

Instance member DrawLine(pen, pt1, pt2)

Draws a line connecting two PointF structures.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the line.
pt1PointFPointF structure that represents the first point to connect.
pt2PointFPointF structure that represents the second point to connect.

Instance member DrawLines(pen, points)

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

ParameterTypeDescription
penPenPen that determines the color, width, and style of the line.
pointsPoint[]Array of Point structures that represent the points to connect.

Instance member DrawLines(pen, points)

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

ParameterTypeDescription
penPenPen that determines the color, width, and style of the line.
pointsPointF[]Array of PointF structures that represent the points to connect.

Instance member DrawPath(pen, path)

Draws a GraphicsPath.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the path.
pathGraphicsPathGraphicsPath to draw.

Throws:

Instance member DrawPie(pen, rect, startAngle, sweepAngle)

Draws the outline of a pie shape. The pie shape is a section of an ellipse. The ellipse is specified by a RectangleF structure. Two radial lines indicate the start and end of the pie slice.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the pie shape.
rectRectangleFRectangleF structure that represents the bounding rectangle that defines the ellipse from which the pie shape comes.
startAngleSingleAngle measured in degrees clockwise from the x-axis to the first side of the pie shape.
sweepAngleSingleAngle measured in degrees clockwise from the startAngle parameter to the second side of the pie shape.

Instance member DrawPie(pen, x, y, width, height, startAngle, sweepAngle)

Draws the outline of a pie shape. The pie shape is a section of an ellipse. The ellipse is specified by a coordinate pair, a width, and a height. Two radial lines indicate the start and end of the pie slice.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the pie shape.
xSingleThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.
ySingleThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.
widthSingleWidth of the bounding rectangle that defines the ellipse from which the pie shape comes.
heightSingleHeight of the bounding rectangle that defines the ellipse from which the pie shape comes.
startAngleSingleAngle measured in degrees clockwise from the x-axis to the first side of the pie shape.
sweepAngleSingleAngle measured in degrees clockwise from the startAngle parameter to the second side of the pie shape.

Throws:

Instance member DrawPie(pen, rect, startAngle, sweepAngle)

Draws the outline of a pie shape. The pie shape is a section of an ellipse. The ellipse is specified by a Rectangle structure. Two radial lines indicate the start and end of the pie slice.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the pie shape.
rectRectangleRectangle structure that represents the bounding rectangle that defines the ellipse from which the pie shape comes.
startAngleSingleAngle measured in degrees clockwise from the x-axis to the first side of the pie shape.
sweepAngleSingleAngle measured in degrees clockwise from the startAngle parameter to the second side of the pie shape.

Instance member DrawPie(pen, x, y, width, height, startAngle, sweepAngle)

Draws the outline of a pie shape. The pie shape is a section of an ellipse. The ellipse is specified by a coordinate pair, a width, and a height. Two radial lines indicate the start and end of the pie slice.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the pie shape.
xInt32The x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.
yInt32The y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.
widthInt32Width of the bounding rectangle that defines the ellipse from which the pie shape comes.
heightInt32Height of the bounding rectangle that defines the ellipse from which the pie shape comes.
startAngleInt32Angle measured in degrees clockwise from the x-axis to the first side of the pie shape.
sweepAngleInt32Angle measured in degrees clockwise from the startAngle parameter to the second side of the pie shape.

Instance member DrawPolygon(pen, points)

Draws the outline of a polygon defined by an array of points.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the polygon.
pointsPointF[]Array of PointF points that represent the coordinates of the corners of the polygon

Instance member DrawPolygon(pen, points)

Draws the outline of a polygon defined by an array of points.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the polygon.
pointsPoint[]Array of Point points that represent the coordinates of the corners of the polygon

Instance member DrawRectangle(pen, x, y, width, height)

Draws the outline of a RectangleF rectangle specified by rect .

ParameterTypeDescription
penPenA Pen that determines the color, width, and style of the rectangle.
xSingle
ySingle
widthSingle
heightSingle

Instance member DrawRectangle(pen, x, y, width, height)

Draws the outline of a Rectangle rectangle specified by rect .

ParameterTypeDescription
penPenA Pen that determines the color, width, and style of the rectangle.
xInt32
yInt32
widthInt32
heightInt32

Instance member DrawRectangle(pen, rect)

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

ParameterTypeDescription
penPenA Pen that determines the color, width, and style of the rectangle.
rectRectangleF

Instance member DrawRectangle(pen, rect)

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

ParameterTypeDescription
penPenPen that determines the color, width, and style of the rectangle.
rectRectangle

Instance member DrawRectangles(pen, rects)

Draws a series of rectangles specified by RectangleF structures.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the rectangles.
rectsRectangleF[]Array of RectangleF structures that represent the rectangles to draw.

Instance member DrawRectangles(pen, rects)

Draws a series of rectangles specified by Rectangle structures.

ParameterTypeDescription
penPenPen that determines the color, width, and style of the rectangles.
rectsRectangle[]Array of Rectangle structures that represent the rectangles to draw.

Instance member DrawString(s, font, brush, x, y)

Draws the specified text string at the specified x and y coordinates with the specified Brush and Font objects.

ParameterTypeDescription
sStringString to draw.
fontFontFont that defines the text format of the string.
brushBrushBrush that determines the color and texture of the drawn text.
xSingleThe x-coordinate of the upper-left corner of the drawn text.
ySingleThe y-coordinate of the upper-left corner of the drawn text.

Instance member DrawString(s, font, brush, point)

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

ParameterTypeDescription
sStringString to draw.
fontFontFont that defines the text format of the string.
brushBrushBrush that determines the color and texture of the drawn text.
pointPointFPointF structure that specifies the upper-left corner of the drawn text.

Instance member DrawString(s, font, brush, x, y, 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.

ParameterTypeDescription
sStringString to draw.
fontFontFont that defines the text format of the string.
brushBrushBrush that determines the color and texture of the drawn text.
xSingleThe x-coordinate of the upper-left corner of the drawn text.
ySingleThe y-coordinate of the upper-left corner of the drawn text.
formatStringFormatStringFormat that specifies formatting attributes, such as line spacing and alignment, that are applied to the drawn text.

Instance member DrawString(s, font, brush, point, 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.

ParameterTypeDescription
sStringString to draw.
fontFontFont that defines the text format of the string.
brushBrushBrush that determines the color and texture of the drawn text.
pointPointFPointF structure that specifies the upper-left corner of the drawn text.
formatStringFormatStringFormat that specifies formatting attributes, such as line spacing and alignment, that are applied to the drawn text.

Instance member DrawString(s, font, brush, layoutRectangle)

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

ParameterTypeDescription
sStringString to draw.
fontFontFont that defines the text format of the string.
brushBrushBrush that determines the color and texture of the drawn text.
layoutRectangleRectangleFRectangleF structure that specifies the location of the drawn text.

Instance member DrawString(s, font, brush, layoutRectangle, 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.

ParameterTypeDescription
sStringString to draw.
fontFontFont that defines the text format of the string.
brushBrushBrush that determines the color and texture of the drawn text.
layoutRectangleRectangleFRectangleF structure that specifies the location of the drawn text.
formatStringFormatStringFormat that specifies formatting attributes, such as line spacing and alignment, that are applied to the drawn text.

Instance member EndContainer(container)

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

ParameterTypeDescription
containerGraphicsContainerGraphicsContainer that represents the container this method restores.

Instance member ExcludeClip(rect)

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

ParameterTypeDescription
rectRectangleRectangle structure that specifies the rectangle to exclude from the clip region.

Instance member FillClosedCurve(brush, points)

Fills the interior of a closed curve defined by an array of points.

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
pointsPointF[]Array of PointF structures that define the spline.

Instance member FillClosedCurve(brush, points, tension)

Fills the interior of a closed curve defined by an array of points.

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
pointsPointF[]Array of PointF structures that define the spline.
tensionSingleValue greater than or equal to 0.0F that specifies the tension of the curve.

Instance member FillClosedCurve(brush, points, fillMode)

Fills the interior of a closed curve defined by an array of points.

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
pointsPointF[]Array of PointF structures that define the spline.
fillModeFillModeMember of the FillMode enumeration that determines how the curve is filled.

Instance member FillClosedCurve(brush, points, fillMode, tension)

Fills the interior of a closed curve defined by an array of points.

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
pointsPointF[]Array of PointF structures that define the spline.
fillModeFillModeMember of the FillMode enumeration that determines how the curve is filled.
tensionSingleValue greater than or equal to 0.0F that specifies the tension of the curve.

Instance member FillClosedCurve(brush, points)

Fills the interior of a closed curve defined by an array of points.

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
pointsPoint[]Array of Point structures that define the spline.

Instance member FillClosedCurve(brush, points, tension)

Fills the interior of a closed curve defined by an array of points.

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
pointsPoint[]Array of Point structures that define the spline.
tensionSingleValue greater than or equal to 0.0F that specifies the tension of the curve.

Instance member FillClosedCurve(brush, points, fillMode)

Fills the interior of a closed curve defined by an array of points.

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
pointsPoint[]Array of Point structures that define the spline.
fillModeFillModeMember of the FillMode enumeration that determines how the curve is filled.

Instance member FillClosedCurve(brush, points, fillMode, tension)

Fills the interior of a closed curve defined by an array of points.

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
pointsPoint[]Array of Point structures that define the spline.
fillModeFillModeMember of the FillMode enumeration that determines how the curve is filled.
tensionSingleValue greater than or equal to 0.0F that specifies the tension of the curve.

Instance member FillEllipse(brush, rect)

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

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
rectRectangleRectangle structure that represents the bounding rectangle that defines the ellipse.

Instance member FillEllipse(brush, rect)

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

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
rectRectangleFRectangleF structure that represents the bounding rectangle that defines the ellipse.

Instance member FillEllipse(brush, x, y, width, height)

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

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
xInt32The x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
yInt32The y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
widthInt32Width of the bounding rectangle that defines the ellipse.
heightInt32Height of the bounding rectangle that defines the ellipse.

Instance member FillEllipse(brush, x, y, width, height)

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

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
xSingleThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
ySingleThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
widthSingleWidth of the bounding rectangle that defines the ellipse.
heightSingleHeight of the bounding rectangle that defines the ellipse.

Instance member FillPath(brush, path)

Fills the interior of a GraphicsPath.

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
pathGraphicsPathGraphicsPath that represents the path to fill.

Throws:

Instance member FillPie(brush, rect, startAngle, sweepAngle)

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

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
rectRectangleRectangle structure that represents the bounding rectangle that defines the ellipse from which the pie section comes.
startAngleSingleAngle in degrees measured clockwise from the x-axis to the first side of the pie section.
sweepAngleSingleAngle in degrees measured clockwise from the startAngle parameter to the second side of the pie section.

Instance member FillPie(brush, rect, startAngle, sweepAngle)

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

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
rectRectangleFRectangleF structure that represents the bounding rectangle that defines the ellipse from which the pie section comes.
startAngleSingleAngle in degrees measured clockwise from the x-axis to the first side of the pie section.
sweepAngleSingleAngle in degrees measured clockwise from the startAngle parameter to the second side of the pie section.

Instance member FillPie(brush, x, y, width, height, startAngle, 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.

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
xSingleThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.
ySingleThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.
widthSingleWidth of the bounding rectangle that defines the ellipse from which the pie section comes.
heightSingleHeight of the bounding rectangle that defines the ellipse from which the pie section comes.
startAngleSingleAngle in degrees measured clockwise from the x-axis to the first side of the pie section.
sweepAngleSingleAngle in degrees measured clockwise from the startAngle parameter to the second side of the pie section.

Instance member FillPie(brush, x, y, width, height, startAngle, 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.

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
xInt32The x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.
yInt32The y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.
widthInt32Width of the bounding rectangle that defines the ellipse from which the pie section comes.
heightInt32Height of the bounding rectangle that defines the ellipse from which the pie section comes.
startAngleInt32Angle in degrees measured clockwise from the x-axis to the first side of the pie section.
sweepAngleInt32Angle in degrees measured clockwise from the startAngle parameter to the second side of the pie section.

Instance member FillPolygon(brush, points)

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

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
pointsPointF[]Array of PointF points that represent the coordinates of the corners of the polygon

Instance member FillPolygon(brush, points)

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

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
pointsPoint[]Array of PointF points that represent the coordinates of the corners of the polygon

Instance member FillRectangle(brush, rect)

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

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
rectRectangleFRectangle structure that represents the rectangle to fill.

Instance member FillRectangle(brush, rect)

Fills the interior of a rectangle specified by a Rectangle structure with a Brush,

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
rectRectangleRectangle structure that represents the rectangle to fill.

Instance member FillRectangle(brush, x, y, width, height)

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

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
xInt32The x-coordinate of the upper-left corner of the rectangle to fill.
yInt32The y-coordinate of the upper-left corner of the rectangle to fill.
widthInt32Width of the rectangle to fill.
heightInt32Height of the rectangle to fill.

Instance member FillRectangle(brush, x, y, width, height)

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

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
xSingleThe x-coordinate of the upper-left corner of the rectangle to fill.
ySingleThe y-coordinate of the upper-left corner of the rectangle to fill.
widthSingleWidth of the rectangle to fill.
heightSingleHeight of the rectangle to fill.

Throws:

Instance member FillRectangles(brush, rects)

Fills the interiors of a series of rectangles with a Brush.

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
rectsRectangleF[]An array of RectangleF rectangles to be filled.

Instance member FillRectangles(brush, rects)

Fills the interiors of a series of rectangles with a Brush.

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
rectsRectangle[]An array of Rectangle rectangles to be filled.

Instance member FillRegion(brush, region)

Fills the interior of a Region.

ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
regionRegionRegion that represents the area to fill.

Throws:

Protected member Finalize()

Finalizes an instance of the Graphics class.

Static member FromHdc(hdc)

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

ParameterTypeDescription
hdcIntPtrHandle to a device context.

Returns: Graphics. Returns a new Graphics for the specified device context.

Static member FromImage(image)

Creates an instance of the Graphics class from an existing Image.

ParameterTypeDescription
imageImageImage from which to create the new Graphics.

Returns: Graphics. This method returns a new Graphics for the specified Image.

Instance member MeasureString(text, font, width, format)

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

ParameterTypeDescription
textStringString to measure.
fontFontFont that defines the text format of the string.
widthInt32Maximum width of the string.
formatStringFormatStringFormat that represents formatting information, such as line spacing, for the string.

Returns: SizeF. This method returns a SizeF structure that represents the size, in the units specified by the PageUnit property, of the string specified in the text parameter as drawn with the font parameter and the format parameter.

Throws:

Instance member MeasureString(text, font, layoutArea)

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

ParameterTypeDescription
textStringString to measure.
fontFontFont defines the text format of the string.
layoutAreaSizeFSizeF structure that specifies the maximum layout area for the text.

Returns: SizeF. This method returns a SizeF structure that represents the size, in the units specified by the PageUnit property, of the string specified by the text parameter as drawn with the font parameter.

Instance member MeasureString(text, font, layoutArea, stringFormat)

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

ParameterTypeDescription
textStringString to measure.
fontFontFont defines the text format of the string.
layoutAreaSizeFSizeF structure that specifies the maximum layout area for the text.
stringFormatStringFormatStringFormat that represents formatting information, such as line spacing, for the string.

Returns: SizeF. This method returns a SizeF structure that represents the size, in the units specified by the PageUnit property, of the string specified in the text parameter as drawn with the font parameter and the stringFormat parameter.

Throws:

Instance member MeasureString(text, font, origin, stringFormat)

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

ParameterTypeDescription
textStringString to measure.
fontFontFont defines the text format of the string.
originPointFPointF structure that represents the upper-left corner of the string.
stringFormatStringFormatStringFormat that represents formatting information, such as line spacing, for the string.

Returns: SizeF. This method returns a SizeF structure that represents the size, in the units specified by the PageUnit property, of the string specified in the text parameter as drawn with the font parameter and the stringFormat parameter.

Throws:

Instance member MeasureString(text, font, width)

Measures the specified string when drawn with the specified Font.

ParameterTypeDescription
textStringString to measure.
fontFontFont that defines the format of the string.
widthInt32Maximum width of the string in pixels.

Returns: SizeF. This method returns a SizeF structure that represents the size, in the units specified by the PageUnit property, of the string specified in the text parameter as drawn with the font parameter.

Throws:

Instance member MeasureString(text, font)

Measures the specified string when drawn with the specified Font.

ParameterTypeDescription
textStringString to measure.
fontFontFont that defines the format of the string.

Returns: SizeF. This method returns a SizeF structure that represents the size, in the units specified by the PageUnit property, of the string specified in the text parameter as drawn with the font parameter.

Throws:

Instance member MeasureString(text, font, layoutArea, stringFormat, charactersFitted, linesFilled)

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

ParameterTypeDescription
textStringString to measure.
fontFontFont defines the text format of the string.
layoutAreaSizeFSizeF structure that specifies the maximum layout area for the text.
stringFormatStringFormatStringFormat that represents formatting information, such as line spacing, for the string.
charactersFitted by referenceInt32Number of characters in the string.
linesFilled by referenceInt32Number of text lines in the string.

Returns: SizeF. This method returns a SizeF structure that represents the size of the string, in the units specified by the PageUnit property, of the text parameter as drawn with the font parameter and the stringFormat parameter.

Instance member RotateTransform(angle)

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

ParameterTypeDescription
angleSingleAngle of rotation in degrees.

Instance member RotateTransform(angle, order)

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

ParameterTypeDescription
angleSingleAngle of rotation in degrees.
orderMatrixOrderMember of the MatrixOrder enumeration that specifies whether the rotation is prepended or appended to the transformation matrix.

Instance member ScaleTransform(sx, sy)

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

ParameterTypeDescription
sxSingleScale factor in the x direction.
sySingleScale factor in the y direction.

Instance member ScaleTransform(sx, sy, order)

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

ParameterTypeDescription
sxSingleScale factor in the x direction.
sySingleScale factor in the y direction.
orderMatrixOrderMember of the MatrixOrder enumeration that specifies whether the scaling operation is prepended or appended to the transformation matrix.

Instance member SetClip(rect)

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

ParameterTypeDescription
rectRectangleFRectangleF structure that represents the new clip region.

Instance member SetClip(rect)

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

ParameterTypeDescription
rectRectangleRectangle structure that represents the new clip region.

Instance member SetClip(graphicsPath)

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

ParameterTypeDescription
graphicsPathGraphicsPathGraphicsPath that represents the new clip region.

Instance member SetClip(g)

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

ParameterTypeDescription
gGraphicsGraphics from which to take the new clip region.

Instance member SetClip(rect, 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.

ParameterTypeDescription
rectRectangleFRectangleF structure to combine.
combineModeCombineModeMember from the CombineMode enumeration that specifies the combining operation to use.

Instance member SetClip(rect, 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.

ParameterTypeDescription
rectRectangleRectangle structure to combine.
combineModeCombineModeMember from the CombineMode enumeration that specifies the combining operation to use.

Instance member SetClip(graphicsPath, 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 GraphicsPath.

ParameterTypeDescription
graphicsPathGraphicsPathGraphicsPath to combine.
combineModeCombineModeMember from the CombineMode enumeration that specifies the combining operation to use.

Instance member SetClip(g, 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.

ParameterTypeDescription
gGraphicsGraphics that specifies the clip region to combine.
combineModeCombineModeMember from the CombineMode enumeration that specifies the combining operation to use.

Instance member SetClip(region, combineMode)

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

ParameterTypeDescription
regionRegionRegion to combine.
combineModeCombineModeMember from the CombineMode enumeration that specifies the combining operation to use.

Instance member TranslateTransform(dx, dy)

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

ParameterTypeDescription
dxSingleThe x-coordinate of the translation.
dySingleThe y-coordinate of the translation.

Instance member TranslateTransform(dx, dy, order)

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

ParameterTypeDescription
dxSingleThe x-coordinate of the translation.
dySingleThe y-coordinate of the translation.
orderMatrixOrderMember of the MatrixOrder enumeration that specifies whether the translation is prepended or appended to the transformation matrix.