Graphics Methods

The Graphics type exposes the following members.

Methods
  NameDescription
Public methodBeginUpdate
Starts caching of the following graphics operations. The graphics effects applied afterwards will not be applied immediately instead the EndUpdate will cause applying all the effects at once.
Public methodCode exampleClear
Clears the graphics surface using the specified color.
Public methodCode exampleDrawArc(Pen, Rectangle, Single, Single)
Draws an arc representing a portion of an ellipse specified by a Rectangle structure.
Public methodDrawArc(Pen, RectangleF, Single, Single)
Draws an arc representing a portion of an ellipse specified by a RectangleF structure.
Public methodDrawArc(Pen, Int32, Int32, Int32, Int32, Int32, Int32)
Draws an arc representing a portion of an ellipse specified by a pair of coordinates, a width, and a height.
Public methodDrawArc(Pen, Single, Single, Single, Single, Single, Single)
Draws an arc representing a portion of an ellipse specified by a pair of coordinates, a width, and a height.
Public methodCode exampleDrawBezier(Pen, Point, Point, Point, Point)
Draws a Bézier spline defined by four Point structures.
Public methodDrawBezier(Pen, PointF, PointF, PointF, PointF)
Draws a Bézier spline defined by four PointF structures.
Public methodDrawBezier(Pen, Single, Single, Single, Single, Single, Single, Single, Single)
Draws a Bézier spline defined by four ordered pairs of coordinates that represent points.
Public methodDrawBeziers(Pen, Point)
Draws a series of Bézier splines from an array of Point structures.
Public methodDrawBeziers(Pen, PointF)
Draws a series of Bézier splines from an array of PointF structures.
Public methodDrawClosedCurve(Pen, Point)
Draws a closed cardinal spline defined by an array of Point structures. This method uses a default tension of 0.5 and Alternate fill mode.
Public methodDrawClosedCurve(Pen, PointF)
Draws a closed cardinal spline defined by an array of PointF structures. This method uses a default tension of 0.5 and Alternate fill mode.
Public methodDrawClosedCurve(Pen, Point, Single)
Draws a closed cardinal spline defined by an array of Point structures using a specified tension. This method uses a default Alternate fill mode.
Public methodDrawClosedCurve(Pen, PointF, Single)
Draws a closed cardinal spline defined by an array of PointF structures using a specified tension. This method uses a default Alternate fill mode.
Public methodCode exampleDrawCurve(Pen, Point)
Draws a cardinal spline through a specified array of Point structures.
Public methodDrawCurve(Pen, PointF)
Draws a cardinal spline through a specified array of PointF structures. This method uses a default tension of 0.5.
Public methodDrawCurve(Pen, Point, Single)
Draws a cardinal spline through a specified array of Point structures using a specified tension.
Public methodDrawCurve(Pen, PointF, Single)
Draws a cardinal spline through a specified array of PointF structures using a specified tension.
Public methodDrawCurve(Pen, PointF, Int32, Int32)
Draws a cardinal spline through a specified array of PointF structures. The drawing begins offset from the beginning of the array. This method uses a default tension of 0.5.
Public methodDrawCurve(Pen, Point, Int32, Int32, Single)
Draws a cardinal spline through a specified array of Point structures using a specified tension.
Public methodDrawCurve(Pen, PointF, Int32, Int32, Single)
Draws a cardinal spline through a specified array of PointF structures using a specified tension. The drawing begins offset from the beginning of the array.
Public methodCode exampleDrawEllipse(Pen, Rectangle)
Draws an ellipse specified by a bounding Rectangle structure.
Public methodDrawEllipse(Pen, RectangleF)
Draws an ellipse defined by a bounding RectangleF.
Public methodDrawEllipse(Pen, Int32, Int32, Int32, Int32)
Draws an ellipse defined by a bounding rectangle specified by a pair of coordinates, a height, and a width.
Public methodDrawEllipse(Pen, Single, Single, Single, Single)
Draws an ellipse defined by a bounding rectangle specified by a pair of coordinates, a height, and a width.
Public methodDrawImage(Image, Point)
Draws the specified Image, using its original physical size, at the specified location.
Public methodDrawImage(Image, Point)
Draws the specified portion of the specified image at the specified location and with the specified size.
Public methodDrawImage(Image, PointF)
Draws the specified Image, using its original physical size, at the specified location.
Public methodDrawImage(Image, PointF)
Draws the specified portion of the specified image at the specified location and with the specified size.
Public methodDrawImage(Image, Rectangle)
Draws the specified Image at the specified location and with the specified size.
Public methodDrawImage(Image, RectangleF)
Draws the specified Image at the specified location and with the specified size.
Public methodDrawImage(Image, Point, Rectangle)
Draws the specified portion of the specified image at the specified location and with the specified size.
Public methodDrawImage(Image, PointF, RectangleF)
Draws the specified portion of the specified image at the specified location and with the specified size.
Public methodDrawImage(Image, Rectangle, GraphicsUnit)
Draws the specified Image at the specified location and with the specified size.
Public methodDrawImage(Image, RectangleF, GraphicsUnit)
Draws the specified Image at the specified location and with the specified size.
Public methodDrawImage(Image, Int32, Int32)
Draws the specified image, using its original physical size, at the location specified by a coordinate pair.
Public methodDrawImage(Image, Single, Single)
Draws the specified Image, using its original physical size, at the specified location.
Public methodDrawImage(Image, Point, Rectangle, GraphicsUnit)
Draws the specified portion of the specified image at the specified location and with the specified size.
Public methodDrawImage(Image, PointF, RectangleF, GraphicsUnit)
Draws the specified portion of the specified image at the specified location and with the specified size.
Public methodDrawImage(Image, Rectangle, GraphicsUnit, ImageAttributes)
Draws the specified Image at the specified location and with the specified size.
Public methodDrawImage(Image, Rectangle, Rectangle, GraphicsUnit)
Draws the specified Image at the specified location and with the specified size.
Public methodDrawImage(Image, RectangleF, GraphicsUnit, ImageAttributes)
Draws the specified Image at the specified location and with the specified size.
Public methodDrawImage(Image, RectangleF, RectangleF, GraphicsUnit)
Draws the specified Image at the specified location and with the specified size.
Public methodDrawImage(Image, Point, Rectangle, GraphicsUnit, ImageAttributes)
Draws the specified portion of the specified image at the specified location and with the specified size.
Public methodDrawImage(Image, PointF, RectangleF, GraphicsUnit, ImageAttributes)
Draws the specified portion of the specified image at the specified location and with the specified size.
Public methodDrawImage(Image, Rectangle, Rectangle, GraphicsUnit, ImageAttributes)
Draws the specified Image at the specified location and with the specified size.
Public methodDrawImage(Image, RectangleF, RectangleF, GraphicsUnit, ImageAttributes)
Draws the specified Image at the specified location and with the specified size.
Public methodDrawImage(Image, Int32, Int32, Int32, Int32)
Draws the specified Image at the specified location and with the specified size.
Public methodDrawImage(Image, Single, Single, Single, Single)
Draws the specified Image at the specified location and with the specified size.
Public methodDrawImageUnscaled(Image, Point)
Draws a specified image using its original physical size at a specified location.
Public methodDrawImageUnscaled(Image, Rectangle)
Draws a specified image using its original physical size at a specified location.
Public methodDrawImageUnscaled(Image, Int32, Int32)
Draws the specified image using its original physical size at the location specified by a coordinate pair.
Public methodDrawImageUnscaled(Image, Int32, Int32, Int32, Int32)
Draws a specified image using its original physical size at a specified location.
Public methodDrawImageUnscaledAndClipped
Draws the specified image without scaling and clips it, if necessary, to fit in the specified rectangle.
Public methodCode exampleDrawLine(Pen, Point, Point)
Draws a line connecting two Point structures.
Public methodDrawLine(Pen, PointF, PointF)
Draws a line connecting two PointF structures.
Public methodDrawLine(Pen, Int32, Int32, Int32, Int32)
Draws a line connecting the two points specified by the coordinate pairs.
Public methodDrawLine(Pen, Single, Single, Single, Single)
Draws a line connecting the two points specified by the coordinate pairs.
Public methodDrawLines(Pen, Point)
Draws a series of line segments that connect an array of Point structures.
Public methodDrawLines(Pen, PointF)
Draws a series of line segments that connect an array of PointF structures.
Public methodCode exampleDrawPath
Draws a GraphicsPath.
Public methodCode exampleDrawPie(Pen, Rectangle, Single, Single)
Draws a pie shape defined by an ellipse specified by a Rectangle structure and two radial lines.
Public methodDrawPie(Pen, RectangleF, Single, Single)
Draws a pie shape defined by an ellipse specified by a RectangleF structure and two radial lines.
Public methodDrawPie(Pen, Int32, Int32, Int32, Int32, Int32, Int32)
Draws a pie shape defined by an ellipse specified by a coordinate pair, a width, a height, and two radial lines.
Public methodDrawPie(Pen, Single, Single, Single, Single, Single, Single)
Draws a pie shape defined by an ellipse specified by a coordinate pair, a width, a height, and two radial lines.
Public methodCode exampleDrawPolygon(Pen, Point)
Draws a polygon defined by an array of Point structures.
Public methodDrawPolygon(Pen, PointF)
Draws a polygon defined by an array of PointF structures.
Public methodCode exampleDrawRectangle(Pen, Rectangle)
Draws a rectangle specified by a Rectangle structure.
Public methodDrawRectangle(Pen, RectangleF)
Draws a rectangle specified by a RectangleF structure.
Public methodDrawRectangle(Pen, Int32, Int32, Int32, Int32)
Draws a rectangle specified by a coordinate pair, a width, and a height.
Public methodDrawRectangle(Pen, Single, Single, Single, Single)
Draws a rectangle specified by a coordinate pair, a width, and a height.
Public methodCode exampleDrawRectangles(Pen, Rectangle)
Draws a series of rectangles specified by Rectangle structures.
Public methodDrawRectangles(Pen, RectangleF)
Draws a series of rectangles specified by RectangleF structures.
Public methodCode exampleDrawString(String, Font, Brush, PointF)
Draws the specified text string at the specified location with the specified Brush and Font objects.
Public methodDrawString(String, Font, Brush, RectangleF)
Draws the specified text string in the specified rectangle with the specified Brush and Font objects.
Public methodDrawString(String, Font, Brush, PointF, StringFormat)
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 methodDrawString(String, Font, Brush, RectangleF, StringFormat)
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 methodDrawString(String, Font, Brush, Single, Single)
Draws the specified text string at the specified location with the specified Brush and Font objects.
Public methodDrawString(String, Font, Brush, Single, Single, StringFormat)
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 methodEndUpdate
Finishes caching of the graphics operations started after BeginUpdate was called. The preceding graphics operations will be applied at once when calling this method.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodFillClosedCurve(Brush, Point)
Fills the interior of a closed cardinal spline curve defined by an array of Point structures. This method uses a default tension of 0.5 and Alternate fill mode.
Public methodFillClosedCurve(Brush, PointF)
Fills the interior of a closed cardinal spline curve defined by an array of PointF structures. This method uses a default tension of 0.5 and Alternate fill mode.
Public methodFillClosedCurve(Brush, Point, FillMode)
Fills the interior of a closed cardinal spline curve defined by an array of Point structures using the specified fill mode. This method uses a default tension of 0.5.
Public methodFillClosedCurve(Brush, PointF, FillMode)
Fills the interior of a closed cardinal spline curve defined by an array of PointF structures using the specified fill mode. This method uses a default tension of 0.5.
Public methodFillClosedCurve(Brush, Point, FillMode, Single)
Fills the interior of a closed cardinal spline curve defined by an array of Point structures using the specified fill mode and tension.
Public methodFillClosedCurve(Brush, PointF, FillMode, Single)
Fills the interior of a closed cardinal spline curve defined by an array of PointF structures using the specified fill mode and tension.
Public methodFillEllipse(Brush, Rectangle)
Fills the interior of an ellipse defined by a bounding rectangle specified by a Rectangle structure.
Public methodFillEllipse(Brush, RectangleF)
Fills the interior of an ellipse defined by a bounding rectangle specified by a RectangleF structure.
Public methodFillEllipse(Brush, Int32, Int32, Int32, Int32)
Fills the interior of an ellipse defined by a bounding rectangle specified by a pair of coordinates, a width, and a height.
Public methodFillEllipse(Brush, Single, Single, Single, Single)
Fills the interior of an ellipse defined by a bounding rectangle specified by a pair of coordinates, a width, and a height.
Public methodFillPath
Fills the interior of a GraphicsPath.
Public methodCode exampleFillPie(Brush, Rectangle, Single, Single)
Fills the interior of a pie section defined by an ellipse specified by a RectangleF structure and two radial lines.
Public methodFillPie(Brush, RectangleF, Single, Single)
Fills the interior of a pie section defined by an ellipse specified by a RectangleF structure and two radial lines.
Public methodFillPie(Brush, Int32, Int32, Int32, Int32, Int32, Int32)
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 methodFillPie(Brush, Single, Single, Single, Single, Single, Single)
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 methodFillPolygon(Brush, Point)
Fills the interior of a polygon defined by an array of points specified by Point structures and Alternate.
Public methodFillPolygon(Brush, PointF)
Fills the interior of a polygon defined by an array of points specified by PointF structures and Alternate.
Public methodFillPolygon(Brush, Point, FillMode)
Fills the interior of a polygon defined by an array of points specified by Point structures using the specified fill mode.
Public methodFillPolygon(Brush, PointF, FillMode)
Fills the interior of a polygon defined by an array of points specified by PointF structures using the specified fill mode.
Public methodFillRectangle(Brush, Rectangle)
Fills the interior of a rectangle specified by a Rectangle structure.
Public methodFillRectangle(Brush, RectangleF)
Fills the interior of a rectangle specified by a RectangleF structure.
Public methodFillRectangle(Brush, Int32, Int32, Int32, Int32)
Fills the interior of a rectangle specified by a pair of coordinates, a width and a height.
Public methodFillRectangle(Brush, Single, Single, Single, Single)
Fills the interior of a rectangle specified by a pair of coordinates, a width and a height.
Public methodFillRectangles(Brush, Rectangle)
Fills the interiors of a series of rectangles specified by Rectangle structures.
Public methodFillRectangles(Brush, RectangleF)
Fills the interiors of a series of rectangles specified by RectangleF structures.
Public methodFillRegion
Fills the interior of a Region.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the type of the current instance.
(Inherited from Object.)
Public methodMultiplyTransform(Matrix)
Multiplies the Matrix that represents the local geometric transform of this Graphics by the specified Matrix by prepending the specified Matrix.
Public methodMultiplyTransform(Matrix, MatrixOrder)
Multiplies the Matrix that represents the local geometric transform of this Graphics by the specified Matrix in the specified order.
Public methodResetTransform
Resets the Transform property to identity.
Public methodRotateTransform(Single)
Rotates the local geometric transform by the specified amount. This method prepends the rotation to the transform.
Public methodRotateTransform(Single, MatrixOrder)
Rotates the local geometric transform by the specified amount in the specified order.
Public methodScaleTransform(Single, Single)
Scales the local geometric transform by the specified amounts. This method prepends the scaling matrix to the transform.
Public methodScaleTransform(Single, Single, MatrixOrder)
Scales the local geometric transform by the specified amounts in the specified order.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTranslateTransform(Single, Single)
Translates the local geometric transform by the specified dimensions. This method prepends the translation to the transform.
Public methodTranslateTransform(Single, Single, MatrixOrder)
Translates the local geometric transform by the specified dimensions in the specified order.
See Also