Class Graphics
Represents the graphics according to the graphics engine used in the current assembly.
public sealed class Graphics
- Inheritance
-
Graphics
- Inherited Members
Constructors
Graphics(Image)
Initializes a new instance of the Graphics class.
public Graphics(Image sourceImage)
Parameters
sourceImage
ImageThe source image.
Properties
Clip
Gets or sets the clip region.
public Region Clip { get; set; }
Property Value
- Region
The clip region.
CompositingQuality
Gets or sets the compositing quality.
public CompositingQuality CompositingQuality { get; set; }
Property Value
- CompositingQuality
The compositing quality.
DpiX
Gets the horizontal resolution of this Aspose.Imaging.Graphics.
public float DpiX { get; }
Property Value
- float
The value, in dots per inch, for the horizontal resolution supported by this Aspose.Imaging.Graphics.
DpiY
Gets the vertical resolution of this Aspose.Imaging.Graphics.
public float DpiY { get; }
Property Value
- float
The value, in dots per inch, for the vertical resolution supported by this Aspose.Imaging.Graphics.
Image
Gets the image.
public Image Image { get; }
Property Value
- Image
The graphics image.
InterpolationMode
Gets or sets the interpolation mode.
public InterpolationMode InterpolationMode { get; set; }
Property Value
- InterpolationMode
The interpolation mode.
IsInBeginUpdateCall
Gets a value indicating whether graphics is in BeginUpdate call state.
public bool IsInBeginUpdateCall { get; }
Property Value
- bool
True
if graphics is in BeginUpdate call state; otherwise,false
.
PageScale
Gets or sets the scaling between world units and page units for this Aspose.Imaging.Graphics.
public float PageScale { get; set; }
Property Value
- float
The scaling between world units and page units for this Aspose.Imaging.Graphics.
PageUnit
Gets or sets the unit of measure used for page coordinates in this Aspose.Imaging.Graphics.
public GraphicsUnit PageUnit { get; set; }
Property Value
- GraphicsUnit
The unit of measure used for page coordinates in this Aspose.Imaging.Graphics.
PaintableImageOptions
Gets or sets image options, used to create paintable vactor images to draw.
public ImageOptionsBase PaintableImageOptions { get; set; }
Property Value
- ImageOptionsBase
The image options, used to create paintable vactor images to draw.
SmoothingMode
Gets or sets the smoothing mode.
public SmoothingMode SmoothingMode { get; set; }
Property Value
- SmoothingMode
The smoothing mode.
TextRenderingHint
Gets or sets the text rendering hint.
public TextRenderingHint TextRenderingHint { get; set; }
Property Value
- TextRenderingHint
The text rendering hint.
Transform
Gets or sets a copy of the geometric world transformation for this Graphics.
public Matrix Transform { get; set; }
Property Value
Methods
BeginUpdate()
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 void BeginUpdate()
Remarks
Note the effects after BeginUpdate is called will not be applied in case EndUpdate is not called.
Clear(Color)
Clears the graphics surface using the specified color.
public void Clear(Color color)
Parameters
color
ColorThe color to clear the graphics surface by.
DrawArc(Pen, Rectangle, float, float)
Draws an arc representing a portion of an ellipse specified by a Rectangle structure.
public void DrawArc(Pen pen, Rectangle rect, float startAngle, float sweepAngle)
Parameters
pen
PenPen that determines the color, width, and style of the arc.
rect
RectangleRectangleF structure that defines the boundaries of the ellipse.
startAngle
floatAngle in degrees measured clockwise from the x-axis to the starting point of the arc.
sweepAngle
floatAngle in degrees measured clockwise from the
startAngle
parameter to ending point of the arc.
Exceptions
- ArgumentNullException
pen
is null.
DrawArc(Pen, RectangleF, float, float)
Draws an arc representing a portion of an ellipse specified by a RectangleF structure.
public void DrawArc(Pen pen, RectangleF rect, float startAngle, float sweepAngle)
Parameters
pen
PenPen that determines the color, width, and style of the arc.
rect
RectangleFRectangleF structure that defines the boundaries of the ellipse.
startAngle
floatAngle in degrees measured clockwise from the x-axis to the starting point of the arc.
sweepAngle
floatAngle in degrees measured clockwise from the
startAngle
parameter to ending point of the arc.
Exceptions
- ArgumentNullException
pen
is null
DrawArc(Pen, int, int, int, int, int, int)
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, int x, int y, int width, int height, int startAngle, int sweepAngle)
Parameters
pen
PenPen that determines the color, width, and style of the arc.
x
intThe x-coordinate of the upper-left corner of the rectangle that defines the ellipse.
y
intThe y-coordinate of the upper-left corner of the rectangle that defines the ellipse.
width
intWidth of the rectangle that defines the ellipse.
height
intHeight of the rectangle that defines the ellipse.
startAngle
intAngle in degrees measured clockwise from the x-axis to the starting point of the arc.
sweepAngle
intAngle in degrees measured clockwise from the
startAngle
parameter to ending point of the arc.
Exceptions
- ArgumentNullException
pen
is null.
DrawArc(Pen, float, float, float, float, float, float)
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)
Parameters
pen
PenPen that determines the color, width, and style of the arc.
x
floatThe x-coordinate of the upper-left corner of the rectangle that defines the ellipse.
y
floatThe y-coordinate of the upper-left corner of the rectangle that defines the ellipse.
width
floatWidth of the rectangle that defines the ellipse.
height
floatHeight of the rectangle that defines the ellipse.
startAngle
floatAngle in degrees measured clockwise from the x-axis to the starting point of the arc.
sweepAngle
floatAngle in degrees measured clockwise from the
startAngle
parameter to ending point of the arc.
Exceptions
- ArgumentNullException
pen
is null.
DrawBezier(Pen, Point, Point, Point, Point)
Draws a Bézier spline defined by four Point structures.
public void DrawBezier(Pen pen, Point pt1, Point pt2, Point pt3, Point pt4)
Parameters
pen
PenPen structure that determines the color, width, and style of the curve.
pt1
PointPoint structure that represents the starting point of the curve.
pt2
PointPoint structure that represents the first control point for the curve.
pt3
PointPoint structure that represents the second control point for the curve.
pt4
PointPoint structure that represents the ending point of the curve.
Exceptions
- ArgumentNullException
pen
is null.
DrawBezier(Pen, PointF, PointF, PointF, PointF)
Draws a Bézier spline defined by four PointF structures.
public void DrawBezier(Pen pen, PointF pt1, PointF pt2, PointF pt3, PointF pt4)
Parameters
pen
PenPen that determines the color, width, and style of the curve.
pt1
PointFPointF structure that represents the starting point of the curve.
pt2
PointFPointF structure that represents the first control point for the curve.
pt3
PointFPointF structure that represents the second control point for the curve.
pt4
PointFPointF structure that represents the ending point of the curve.
Exceptions
- ArgumentNullException
pen
is null.
DrawBezier(Pen, float, float, float, float, float, float, float, float)
Draws a Bézier spline defined by four ordered pairs of coordinates that represent points.
public void DrawBezier(Pen pen, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)
Parameters
pen
PenPen that determines the color, width, and style of the curve.
x1
floatThe x-coordinate of the starting point of the curve.
y1
floatThe y-coordinate of the starting point of the curve.
x2
floatThe x-coordinate of the first control point of the curve.
y2
floatThe y-coordinate of the first control point of the curve.
x3
floatThe x-coordinate of the second control point of the curve.
y3
floatThe y-coordinate of the second control point of the curve.
x4
floatThe x-coordinate of the ending point of the curve.
y4
floatThe y-coordinate of the ending point of the curve.
Exceptions
- ArgumentNullException
pen
is null.
DrawBeziers(Pen, PointF[])
Draws a series of Bézier splines from an array of PointF structures.
public void DrawBeziers(Pen pen, PointF[] points)
Parameters
pen
PenPen that determines the color, width, and style of the curve.
points
PointF[]Array of PointF structures that represent the points that determine the curve.
Exceptions
- ArgumentNullException
pen
is null. -or-points
is null.
DrawBeziers(Pen, Point[])
Draws a series of Bézier splines from an array of Point structures.
public void DrawBeziers(Pen pen, Point[] points)
Parameters
pen
PenPen that determines the color, width, and style of the curve.
points
Point[]Array of Point structures that represent the points that determine the curve.
Exceptions
- ArgumentNullException
pen
is null. -or-points
is null.
DrawClosedCurve(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 void DrawClosedCurve(Pen pen, PointF[] points)
Parameters
pen
PenPen that determines the color, width, and height of the curve.
points
PointF[]Array of PointF structures that define the spline.
Exceptions
- ArgumentNullException
pen
is null. -or-points
is null.
DrawClosedCurve(Pen, PointF[], float)
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 void DrawClosedCurve(Pen pen, PointF[] points, float tension)
Parameters
pen
PenPen that determines the color, width, and height of the curve.
points
PointF[]Array of PointF structures that define the spline.
tension
floatValue greater than or equal to 0.0F that specifies the tension of the curve.
Exceptions
- ArgumentNullException
pen
is null. -or-points
is null.
DrawClosedCurve(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 void DrawClosedCurve(Pen pen, Point[] points)
Parameters
pen
PenPen that determines the color, width, and height of the curve.
points
Point[]Array of Point structures that define the spline.
Exceptions
- ArgumentNullException
pen
is null. -or-points
is null.
DrawClosedCurve(Pen, Point[], float)
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 void DrawClosedCurve(Pen pen, Point[] points, float tension)
Parameters
pen
PenPen that determines the color, width, and height of the curve.
points
Point[]Array of Point structures that define the spline.
tension
floatValue greater than or equal to 0.0F that specifies the tension of the curve.
Exceptions
- ArgumentNullException
pen
is null. -or-points
is null.
DrawCurve(Pen, PointF[])
Draws a cardinal spline through a specified array of PointF structures. This method uses a default tension of 0.5.
public void DrawCurve(Pen pen, PointF[] points)
Parameters
pen
PenPen that determines the color, width, and height of the curve.
points
PointF[]Array of PointF structures that define the spline.
Exceptions
- ArgumentNullException
pen
is null. -or-points
is null.
DrawCurve(Pen, PointF[], int, int)
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 void DrawCurve(Pen pen, PointF[] points, int offset, int numberOfSegments)
Parameters
pen
PenPen that determines the color, width, and height of the curve.
points
PointF[]Array of PointF structures that define the spline.
offset
intOffset from the first element in the array of the
points
parameter to the starting point in the curve.numberOfSegments
intNumber of segments after the starting point to include in the curve.
Exceptions
- ArgumentNullException
pen
is null. -or-points
is null.
DrawCurve(Pen, PointF[], int, int, float)
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 void DrawCurve(Pen pen, PointF[] points, int offset, int numberOfSegments, float tension)
Parameters
pen
PenPen that determines the color, width, and height of the curve.
points
PointF[]Array of PointF structures that define the spline.
offset
intOffset from the first element in the array of the
points
parameter to the starting point in the curve.numberOfSegments
intNumber of segments after the starting point to include in the curve.
tension
floatValue greater than or equal to 0.0F that specifies the tension of the curve.
Exceptions
- ArgumentNullException
pen
is null. -or-points
is null.
DrawCurve(Pen, PointF[], float)
Draws a cardinal spline through a specified array of PointF structures using a specified tension.
public void DrawCurve(Pen pen, PointF[] points, float tension)
Parameters
pen
PenPen that determines the color, width, and height of the curve.
points
PointF[]Array of PointF structures that represent the points that define the curve.
tension
floatValue greater than or equal to 0.0F that specifies the tension of the curve.
Exceptions
- ArgumentNullException
pen
is null. -or-points
is null.
DrawCurve(Pen, Point[])
Draws a cardinal spline through a specified array of Point structures.
public void DrawCurve(Pen pen, Point[] points)
Parameters
pen
PenPen that determines the color, width, and height of the curve.
points
Point[]Array of Point structures that define the spline.
Exceptions
- ArgumentNullException
pen
is null. -or-points
is null.
DrawCurve(Pen, Point[], int, int, float)
Draws a cardinal spline through a specified array of Point structures using a specified tension.
public void DrawCurve(Pen pen, Point[] points, int offset, int numberOfSegments, float tension)
Parameters
pen
PenPen that determines the color, width, and height of the curve.
points
Point[]Array of Point structures that define the spline.
offset
intOffset from the first element in the array of the
points
parameter to the starting point in the curve.numberOfSegments
intNumber of segments after the starting point to include in the curve.
tension
floatValue greater than or equal to 0.0F that specifies the tension of the curve.
Exceptions
- ArgumentNullException
pen
is null. -or-points
is null.
DrawCurve(Pen, Point[], float)
Draws a cardinal spline through a specified array of Point structures using a specified tension.
public void DrawCurve(Pen pen, Point[] points, float tension)
Parameters
pen
PenPen that determines the color, width, and height of the curve.
points
Point[]Array of Point structures that define the spline.
tension
floatValue greater than or equal to 0.0F that specifies the tension of the curve.
Exceptions
- ArgumentNullException
pen
is null. -or-points
is null.
DrawEllipse(Pen, Rectangle)
Draws an ellipse specified by a bounding Rectangle structure.
public void DrawEllipse(Pen pen, Rectangle rect)
Parameters
pen
PenPen that determines the color, width, and style of the ellipse.
rect
RectangleRectangle structure that defines the boundaries of the ellipse.
Exceptions
- ArgumentNullException
pen
is null.
DrawEllipse(Pen, RectangleF)
Draws an ellipse defined by a bounding RectangleF.
public void DrawEllipse(Pen pen, RectangleF rect)
Parameters
pen
PenPen that determines the color, width, and style of the ellipse.
rect
RectangleFRectangleF structure that defines the boundaries of the ellipse.
Exceptions
- ArgumentNullException
pen
is null.
DrawEllipse(Pen, int, int, int, int)
Draws an ellipse defined by a bounding rectangle specified by a pair of coordinates, a height, and a width.
public void DrawEllipse(Pen pen, int x, int y, int width, int height)
Parameters
pen
PenPen that determines the color, width, and style of the ellipse.
x
intThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
y
intThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
width
intWidth of the bounding rectangle that defines the ellipse.
height
intHeight of the bounding rectangle that defines the ellipse.
Exceptions
- ArgumentNullException
pen
is null.
DrawEllipse(Pen, float, float, float, float)
Draws an ellipse defined by a bounding rectangle specified by a pair of coordinates, a height, and a width.
public void DrawEllipse(Pen pen, float x, float y, float width, float height)
Parameters
pen
PenPen that determines the color, width, and style of the ellipse.
x
floatThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
y
floatThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
width
floatWidth of the bounding rectangle that defines the ellipse.
height
floatHeight of the bounding rectangle that defines the ellipse.
Exceptions
- ArgumentNullException
pen
is null.
DrawImage(Image, Point)
Draws the specified Image, using its original physical size, at the specified location.
public void DrawImage(Image sourceImage, Point point)
Parameters
sourceImage
ImageThe image to draw with.
point
PointPoint structure that represents the location of the upper-left corner of the drawn image.
Exceptions
- ArgumentNullException
sourceImage
is null.
DrawImage(Image, PointF)
Draws the specified Image, using its original physical size, at the specified location.
public void DrawImage(Image sourceImage, PointF point)
Parameters
sourceImage
ImageThe image to draw with.
point
PointFPointF structure that represents the upper-left corner of the drawn image.
Exceptions
- ArgumentNullException
sourceImage
is null.
DrawImage(Image, PointF[])
Draws the specified portion of the specified image
at the specified location and with the specified size.
public void DrawImage(Image image, PointF[] destPoints)
Parameters
image
ImageThe image to draw.
destPoints
PointF[]Array of three PointF structures that define a parallelogram.
Exceptions
- ArgumentNullException
image
DrawImage(Image, PointF[], RectangleF)
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)
Parameters
image
ImageThe image to draw.
destPoints
PointF[]Array of three PointF structures that define a parallelogram.
srcRect
RectangleFThe source rectangle.
DrawImage(Image, PointF[], RectangleF, GraphicsUnit)
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)
Parameters
image
ImageThe image to draw.
destPoints
PointF[]Array of three PointF structures that define a parallelogram.
srcRect
RectangleFThe source rectangle.
srcUnit
GraphicsUnitThe units of measure.
DrawImage(Image, PointF[], RectangleF, GraphicsUnit, ImageAttributes)
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 imageAttributes)
Parameters
image
ImageThe image to draw.
destPoints
PointF[]Array of three PointF structures that define a parallelogram.
srcRect
RectangleFThe source rectangle.
srcUnit
GraphicsUnitThe units of measure.
imageAttributes
ImageAttributesThe image attributes.
DrawImage(Image, Point[])
Draws the specified portion of the specified image
at the specified location and with the specified size.
public void DrawImage(Image image, Point[] destPoints)
Parameters
image
ImageThe image to draw.
destPoints
Point[]Array of three PointF structures that define a parallelogram.
DrawImage(Image, Point[], Rectangle)
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)
Parameters
image
ImageThe image to draw.
destPoints
Point[]Array of three PointF structures that define a parallelogram.
srcRect
RectangleThe source rectangle.
DrawImage(Image, Point[], Rectangle, GraphicsUnit)
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)
Parameters
image
ImageThe image to draw.
destPoints
Point[]Array of three PointF structures that define a parallelogram.
srcRect
RectangleThe source rectangle.
srcUnit
GraphicsUnitThe units of measure.
DrawImage(Image, Point[], Rectangle, GraphicsUnit, ImageAttributes)
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 imageAttributes)
Parameters
image
ImageThe image to draw.
destPoints
Point[]Array of three PointF structures that define a parallelogram.
srcRect
RectangleThe source rectangle.
srcUnit
GraphicsUnitThe units of measure.
imageAttributes
ImageAttributesThe image attributes.
DrawImage(Image, Rectangle)
Draws the specified Image at the specified location and with the specified size.
public void DrawImage(Image sourceImage, Rectangle rect)
Parameters
sourceImage
ImageThe image to draw with.
rect
RectangleRectangle structure that specifies the location and size of the drawn image.
Exceptions
- ArgumentNullException
sourceImage
is null.
DrawImage(Image, Rectangle, GraphicsUnit)
Draws the specified Image at the specified location and with the specified size.
public void DrawImage(Image sourceImage, Rectangle rectDestination, GraphicsUnit graphicsUnit)
Parameters
sourceImage
ImageThe image to draw with.
rectDestination
RectangleThe destination rectangle.
graphicsUnit
GraphicsUnitThe graphics unit.
Exceptions
- ArgumentNullException
sourceImage
is null.
DrawImage(Image, Rectangle, GraphicsUnit, ImageAttributes)
Draws the specified Image at the specified location and with the specified size.
public void DrawImage(Image sourceImage, Rectangle rectDestination, GraphicsUnit graphicsUnit, ImageAttributes imageAttributes)
Parameters
sourceImage
ImageThe image to draw with.
rectDestination
RectangleThe destination rectangle.
graphicsUnit
GraphicsUnitThe graphics unit.
imageAttributes
ImageAttributesThe image attributes.
Exceptions
- ArgumentNullException
sourceImage
is null.
DrawImage(Image, Rectangle, Rectangle, GraphicsUnit)
Draws the specified Image at the specified location and with the specified size.
public void DrawImage(Image sourceImage, Rectangle rectSource, Rectangle rectDestination, GraphicsUnit graphicsUnit)
Parameters
sourceImage
ImageThe image to draw with.
rectSource
RectangleThe rect source.
rectDestination
RectangleThe rect destination.
graphicsUnit
GraphicsUnitThe graphics unit.
Exceptions
- ArgumentNullException
sourceImage
is null.
DrawImage(Image, Rectangle, Rectangle, GraphicsUnit, ImageAttributes)
Draws the specified Image at the specified location and with the specified size.
public void DrawImage(Image sourceImage, Rectangle rectSource, Rectangle rectDestination, GraphicsUnit graphicsUnit, ImageAttributes imageAttributes)
Parameters
sourceImage
ImageThe image to draw with.
rectSource
RectangleThe rect source.
rectDestination
RectangleThe rect destination.
graphicsUnit
GraphicsUnitThe graphics unit.
imageAttributes
ImageAttributesThe image attributes.
Exceptions
- ArgumentNullException
sourceImage
is null.
DrawImage(Image, RectangleF)
Draws the specified Image at the specified location and with the specified size.
public void DrawImage(Image sourceImage, RectangleF rect)
Parameters
sourceImage
ImageThe image to draw with.
rect
RectangleFRectangleF structure that specifies the location and size of the drawn image.
Exceptions
- ArgumentNullException
sourceImage
is null.
DrawImage(Image, RectangleF, GraphicsUnit)
Draws the specified Image at the specified location and with the specified size.
public void DrawImage(Image sourceImage, RectangleF rectDestination, GraphicsUnit graphicsUnit)
Parameters
sourceImage
ImageThe image to draw with.
rectDestination
RectangleFThe destination rectangle.
graphicsUnit
GraphicsUnitThe graphics unit.
Exceptions
- ArgumentNullException
sourceImage
is null.
DrawImage(Image, RectangleF, GraphicsUnit, ImageAttributes)
Draws the specified Image at the specified location and with the specified size.
public void DrawImage(Image sourceImage, RectangleF rectDestination, GraphicsUnit graphicsUnit, ImageAttributes imageAttributes)
Parameters
sourceImage
ImageThe image to draw with.
rectDestination
RectangleFThe destination rectangle to draw in.
graphicsUnit
GraphicsUnitThe graphics unit.
imageAttributes
ImageAttributesThe image attributes.
Exceptions
- ArgumentNullException
sourceImage
is null.
DrawImage(Image, RectangleF, RectangleF, GraphicsUnit)
Draws the specified Image at the specified location and with the specified size.
public void DrawImage(Image sourceImage, RectangleF rectSource, RectangleF rectDestination, GraphicsUnit graphicsUnit)
Parameters
sourceImage
ImageThe image to draw with.
rectSource
RectangleFThe rect source.
rectDestination
RectangleFThe rect destination.
graphicsUnit
GraphicsUnitThe graphics unit.
Exceptions
- ArgumentNullException
sourceImage
is null.
DrawImage(Image, RectangleF, RectangleF, GraphicsUnit, ImageAttributes)
Draws the specified Image at the specified location and with the specified size.
public void DrawImage(Image sourceImage, RectangleF rectSource, RectangleF rectDestination, GraphicsUnit graphicsUnit, ImageAttributes imageAttributes)
Parameters
sourceImage
ImageThe image to draw with.
rectSource
RectangleFThe source rectangle.
rectDestination
RectangleFThe destination rectangle.
graphicsUnit
GraphicsUnitThe graphics unit to use.
imageAttributes
ImageAttributesThe image attributes to use.
Exceptions
- ArgumentNullException
sourceImage
is null.
DrawImage(Image, int, int)
Draws the specified image, using its original physical size, at the location specified by a coordinate pair.
public void DrawImage(Image sourceImage, int x, int y)
Parameters
sourceImage
ImageThe image to draw with.
x
intThe x-coordinate of the upper-left corner of the drawn image.
y
intThe y-coordinate of the upper-left corner of the drawn image.
Exceptions
- ArgumentNullException
sourceImage
is null.
DrawImage(Image, int, int, int, int)
Draws the specified Image at the specified location and with the specified size.
public void DrawImage(Image sourceImage, int x, int y, int width, int height)
Parameters
sourceImage
ImageThe image to draw with.
x
intThe x-coordinate of the upper-left corner of the drawn image.
y
intThe y-coordinate of the upper-left corner of the drawn image.
width
intWidth of the drawn image.
height
intHeight of the drawn image.
Exceptions
- ArgumentNullException
sourceImage
is null.
DrawImage(Image, float, float)
Draws the specified Image, using its original physical size, at the specified location.
public void DrawImage(Image sourceImage, float x, float y)
Parameters
sourceImage
ImageThe image to draw with.
x
floatThe x-coordinate of the upper-left corner of the drawn image.
y
floatThe y-coordinate of the upper-left corner of the drawn image.
Exceptions
- ArgumentNullException
sourceImage
is null.
DrawImage(Image, float, float, float, float)
Draws the specified Image at the specified location and with the specified size.
public void DrawImage(Image sourceImage, float x, float y, float width, float height)
Parameters
sourceImage
ImageThe image to draw with.
x
floatThe x-coordinate of the upper-left corner of the drawn image.
y
floatThe y-coordinate of the upper-left corner of the drawn image.
width
floatWidth of the drawn image.
height
floatHeight of the drawn image.
Exceptions
- ArgumentNullException
sourceImage
is null.
DrawImageUnscaled(Image, Point)
Draws a specified image using its original physical size at a specified location.
public void DrawImageUnscaled(Image sourceImage, Point point)
Parameters
sourceImage
ImageThe image to draw with.
point
PointPoint structure that specifies the upper-left corner of the drawn image.
Exceptions
- ArgumentNullException
sourceImage
is null.
DrawImageUnscaled(Image, Rectangle)
Draws a specified image using its original physical size at a specified location.
public void DrawImageUnscaled(Image sourceImage, Rectangle rect)
Parameters
sourceImage
ImageThe image to draw with.
rect
RectangleRectangle 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.
Exceptions
- ArgumentNullException
sourceImage
is null.
DrawImageUnscaled(Image, int, int)
Draws the specified image using its original physical size at the location specified by a coordinate pair.
public void DrawImageUnscaled(Image sourceImage, int x, int y)
Parameters
sourceImage
ImageThe image to draw with.
x
intThe x-coordinate of the upper-left corner of the drawn image.
y
intThe y-coordinate of the upper-left corner of the drawn image.
Exceptions
- ArgumentNullException
sourceImage
is null.
DrawImageUnscaled(Image, int, int, int, int)
Draws a specified image using its original physical size at a specified location.
public void DrawImageUnscaled(Image sourceImage, int x, int y, int width, int height)
Parameters
sourceImage
ImageThe image to draw with.
x
intThe x-coordinate of the upper-left corner of the drawn image.
y
intThe y-coordinate of the upper-left corner of the drawn image.
width
intThe parameter is not used.
height
intThe parameter is not used.
Exceptions
- ArgumentNullException
sourceImage
is null.
DrawImageUnscaledAndClipped(Image, Rectangle)
Draws the specified image without scaling and clips it, if necessary, to fit in the specified rectangle.
public void DrawImageUnscaledAndClipped(Image sourceImage, Rectangle rect)
Parameters
Exceptions
- ArgumentNullException
sourceImage
is null.
DrawLine(Pen, Point, Point)
Draws a line connecting two Point structures.
public void DrawLine(Pen pen, Point point1, Point point2)
Parameters
pen
PenPen that determines the color, width, and style of the line.
point1
PointPoint structure that represents the first point to connect.
point2
PointPoint structure that represents the second point to connect.
Exceptions
- ArgumentNullException
pen
is null.
DrawLine(Pen, PointF, PointF)
Draws a line connecting two PointF structures.
public void DrawLine(Pen pen, PointF point1, PointF point2)
Parameters
pen
PenPen that determines the color, width, and style of the line.
point1
PointFPointF structure that represents the first point to connect.
point2
PointFPointF structure that represents the second point to connect.
Exceptions
- ArgumentNullException
pen
is null.
DrawLine(Pen, int, int, int, int)
Draws a line connecting the two points specified by the coordinate pairs.
public void DrawLine(Pen pen, int x1, int y1, int x2, int y2)
Parameters
pen
PenPen that determines the color, width, and style of the line.
x1
intThe x-coordinate of the first point.
y1
intThe y-coordinate of the first point.
x2
intThe x-coordinate of the second point.
y2
intThe y-coordinate of the second point.
Exceptions
- ArgumentNullException
pen
is null.
DrawLine(Pen, float, float, float, float)
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)
Parameters
pen
PenPen that determines the color, width, and style of the line.
x1
floatThe x-coordinate of the first point.
y1
floatThe y-coordinate of the first point.
x2
floatThe x-coordinate of the second point.
y2
floatThe y-coordinate of the second point.
Exceptions
- ArgumentNullException
pen
is null.
DrawLines(Pen, PointF[])
Draws a series of line segments that connect an array of PointF structures.
public void DrawLines(Pen pen, PointF[] points)
Parameters
pen
PenPen that determines the color, width, and style of the line segments.
points
PointF[]Array of PointF structures that represent the points to connect.
Exceptions
- ArgumentNullException
pen
is null. -or-points
is null.- ArgumentException
The
points
array contains less than 2 points.
DrawLines(Pen, Point[])
Draws a series of line segments that connect an array of Point structures.
public void DrawLines(Pen pen, Point[] points)
Parameters
pen
PenPen that determines the color, width, and style of the line segments.
points
Point[]Array of Point structures that represent the points to connect.
Exceptions
- ArgumentNullException
pen
is null. -or-points
is null.- ArgumentException
The
points
array contains less than 2 points.
DrawPath(Pen, GraphicsPath)
Draws a GraphicsPath.
public void DrawPath(Pen pen, GraphicsPath path)
Parameters
pen
PenPen that determines the color, width, and style of the path.
path
GraphicsPathGraphicsPath to draw.
Exceptions
- ArgumentNullException
pen
is null. -or-path
is null.
DrawPie(Pen, Rectangle, float, float)
Draws a pie shape defined by an ellipse specified by a Rectangle structure and two radial lines.
public void DrawPie(Pen pen, Rectangle rect, float startAngle, float sweepAngle)
Parameters
pen
PenPen that determines the color, width, and style of the pie shape.
rect
RectangleRectangle structure that represents the bounding rectangle that defines the ellipse from which the pie shape comes.
startAngle
floatAngle measured in degrees clockwise from the x-axis to the first side of the pie shape.
sweepAngle
floatAngle measured in degrees clockwise from the
startAngle
parameter to the second side of the pie shape.
Exceptions
- ArgumentNullException
pen
is null.
DrawPie(Pen, RectangleF, float, float)
Draws a pie shape defined by an ellipse specified by a RectangleF structure and two radial lines.
public void DrawPie(Pen pen, RectangleF rect, float startAngle, float sweepAngle)
Parameters
pen
PenPen that determines the color, width, and style of the pie shape.
rect
RectangleFRectangleF structure that represents the bounding rectangle that defines the ellipse from which the pie shape comes.
startAngle
floatAngle measured in degrees clockwise from the x-axis to the first side of the pie shape.
sweepAngle
floatAngle measured in degrees clockwise from the
startAngle
parameter to the second side of the pie shape.
Exceptions
- ArgumentNullException
pen
is null.
DrawPie(Pen, int, int, int, int, int, int)
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, int x, int y, int width, int height, int startAngle, int sweepAngle)
Parameters
pen
PenPen that determines the color, width, and style of the pie shape.
x
intThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.
y
intThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.
width
intWidth of the bounding rectangle that defines the ellipse from which the pie shape comes.
height
intHeight of the bounding rectangle that defines the ellipse from which the pie shape comes.
startAngle
intAngle measured in degrees clockwise from the x-axis to the first side of the pie shape.
sweepAngle
intAngle measured in degrees clockwise from the
startAngle
parameter to the second side of the pie shape.
Exceptions
- ArgumentNullException
pen
is null.
DrawPie(Pen, float, float, float, float, float, float)
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)
Parameters
pen
PenPen that determines the color, width, and style of the pie shape.
x
floatThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.
y
floatThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie shape comes.
width
floatWidth of the bounding rectangle that defines the ellipse from which the pie shape comes.
height
floatHeight of the bounding rectangle that defines the ellipse from which the pie shape comes.
startAngle
floatAngle measured in degrees clockwise from the x-axis to the first side of the pie shape.
sweepAngle
floatAngle measured in degrees clockwise from the
startAngle
parameter to the second side of the pie shape.
Exceptions
- ArgumentNullException
pen
is null.
DrawPolygon(Pen, PointF[])
Draws a polygon defined by an array of PointF structures.
public void DrawPolygon(Pen pen, PointF[] points)
Parameters
pen
PenPen that determines the color, width, and style of the polygon.
points
PointF[]Array of PointF structures that represent the vertices of the polygon.
Exceptions
- ArgumentNullException
pen
is null. -or-points
is null.
DrawPolygon(Pen, Point[])
Draws a polygon defined by an array of Point structures.
public void DrawPolygon(Pen pen, Point[] points)
Parameters
pen
PenPen that determines the color, width, and style of the polygon.
points
Point[]Array of Point structures that represent the vertices of the polygon.
Exceptions
- ArgumentNullException
pen
is null.
DrawRectangle(Pen, Rectangle)
Draws a rectangle specified by a Rectangle structure.
public void DrawRectangle(Pen pen, Rectangle rect)
Parameters
pen
PenA Pen that determines the color, width, and style of the rectangle.
rect
RectangleA Rectangle structure that represents the rectangle to draw.
Exceptions
- ArgumentNullException
pen
is null.
DrawRectangle(Pen, RectangleF)
Draws a rectangle specified by a RectangleF structure.
public void DrawRectangle(Pen pen, RectangleF rect)
Parameters
pen
PenA Pen that determines the color, width, and style of the rectangle.
rect
RectangleFA RectangleF structure that represents the rectangle to draw.
Exceptions
- ArgumentNullException
pen
is null.
DrawRectangle(Pen, int, int, int, int)
Draws a rectangle specified by a coordinate pair, a width, and a height.
public void DrawRectangle(Pen pen, int x, int y, int width, int height)
Parameters
pen
PenPen that determines the color, width, and style of the rectangle.
x
intThe x-coordinate of the upper-left corner of the rectangle to draw.
y
intThe y-coordinate of the upper-left corner of the rectangle to draw.
width
intWidth of the rectangle to draw.
height
intHeight of the rectangle to draw.
Exceptions
- ArgumentNullException
pen
is null.
DrawRectangle(Pen, float, float, float, float)
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)
Parameters
pen
PenA Pen that determines the color, width, and style of the rectangle.
x
floatThe x-coordinate of the upper-left corner of the rectangle to draw.
y
floatThe y-coordinate of the upper-left corner of the rectangle to draw.
width
floatThe width of the rectangle to draw.
height
floatThe height of the rectangle to draw.
Exceptions
- ArgumentNullException
pen
is null.
DrawRectangles(Pen, RectangleF[])
Draws a series of rectangles specified by RectangleF structures.
public void DrawRectangles(Pen pen, RectangleF[] rects)
Parameters
pen
PenPen that determines the color, width, and style of the outlines of the rectangles.
rects
RectangleF[]Array of RectangleF structures that represent the rectangles to draw.
Exceptions
- ArgumentNullException
pen
is null. -or-rects
is null.
DrawRectangles(Pen, Rectangle[])
Draws a series of rectangles specified by Rectangle structures.
public void DrawRectangles(Pen pen, Rectangle[] rects)
Parameters
pen
PenPen that determines the color, width, and style of the outlines of the rectangles.
rects
Rectangle[]Array of Rectangle structures that represent the rectangles to draw.
Exceptions
- ArgumentNullException
pen
is null. -or-rects
is null.
DrawString(string, Font, Brush, PointF)
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)
Parameters
s
stringString to draw.
font
FontFont that defines the text format of the string.
brush
BrushBrush that determines the color and texture of the drawn text.
point
PointFPointF structure that specifies the upper-left corner of the drawn text.
Exceptions
- ArgumentNullException
brush
is null. -or-s
is null.
DrawString(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 void DrawString(string s, Font font, Brush brush, PointF point, StringFormat format)
Parameters
s
stringString to draw.
font
FontFont that defines the text format of the string.
brush
BrushBrush that determines the color and texture of the drawn text.
point
PointFPointF structure that specifies the upper-left corner of the drawn text.
format
StringFormatStringFormat that specifies formatting attributes, such as line spacing and alignment, that are applied to the drawn text.
Exceptions
- ArgumentNullException
brush
is null. -or-s
is null.
DrawString(string, Font, Brush, RectangleF)
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)
Parameters
s
stringString to draw.
font
FontFont that defines the text format of the string.
brush
BrushBrush that determines the color and texture of the drawn text.
layoutRectangle
RectangleFRectangleF structure that specifies the location of the drawn text.
Exceptions
- ArgumentNullException
brush
is null. -or-s
is null.
DrawString(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 void DrawString(string s, Font font, Brush brush, RectangleF layoutRectangle, StringFormat format)
Parameters
s
stringString to draw.
font
FontFont that defines the text format of the string.
brush
BrushBrush that determines the color and texture of the drawn text.
layoutRectangle
RectangleFRectangleF structure that specifies the location of the drawn text.
format
StringFormatStringFormat that specifies formatting attributes, such as line spacing and alignment, that are applied to the drawn text.
Exceptions
- ArgumentNullException
brush
is null. -or-s
is null. -or-brush
is null.
DrawString(string, Font, Brush, float, float)
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)
Parameters
s
stringString to draw.
font
FontFont that defines the text format of the string.
brush
BrushBrush that determines the color and texture of the drawn text.
x
floatThe x-coordinate of the upper-left corner of the drawn text.
y
floatThe y-coordinate of the upper-left corner of the drawn text.
Exceptions
- ArgumentNullException
brush
is null. -or-s
is null.
DrawString(string, Font, Brush, float, float, 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 void DrawString(string s, Font font, Brush brush, float x, float y, StringFormat format)
Parameters
s
stringString to draw.
font
FontFont that defines the text format of the string.
brush
BrushBrush that determines the color and texture of the drawn text.
x
floatThe x-coordinate of the upper-left corner of the drawn text.
y
floatThe y-coordinate of the upper-left corner of the drawn text.
format
StringFormatStringFormat that specifies formatting attributes, such as line spacing and alignment, that are applied to the drawn text.
Exceptions
- ArgumentNullException
brush
is null. -or-s
is null.
EndUpdate()
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 void EndUpdate()
FillClosedCurve(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 void FillClosedCurve(Brush brush, PointF[] points)
Parameters
brush
BrushBrush that determines the characteristics of the fill.
points
PointF[]Array of PointF structures that define the spline.
Exceptions
- ArgumentNullException
brush
is null. -or-points
is null.
FillClosedCurve(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 void FillClosedCurve(Brush brush, PointF[] points, FillMode fillmode)
Parameters
brush
BrushBrush that determines the characteristics of the fill.
points
PointF[]Array of PointF structures that define the spline.
fillmode
FillModeMember of the FillMode enumeration that determines how the curve is filled.
Exceptions
- ArgumentNullException
brush
is null. -or-points
is null.
FillClosedCurve(Brush, PointF[], FillMode, float)
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, PointF[] points, FillMode fillmode, float tension)
Parameters
brush
BrushA Brush that determines the characteristics of the fill.
points
PointF[]Array of PointF structures that define the spline.
fillmode
FillModeMember of the FillMode enumeration that determines how the curve is filled.
tension
floatValue greater than or equal to 0.0F that specifies the tension of the curve.
Exceptions
- ArgumentNullException
brush
is null. -or-points
is null.
FillClosedCurve(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 void FillClosedCurve(Brush brush, Point[] points)
Parameters
brush
BrushBrush that determines the characteristics of the fill.
points
Point[]Array of Point structures that define the spline.
Exceptions
- ArgumentNullException
brush
is null. -or-points
is null.
FillClosedCurve(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 void FillClosedCurve(Brush brush, Point[] points, FillMode fillmode)
Parameters
brush
BrushBrush that determines the characteristics of the fill.
points
Point[]Array of Point structures that define the spline.
fillmode
FillModeMember of the FillMode enumeration that determines how the curve is filled.
Exceptions
- ArgumentNullException
brush
is null. -or-points
is null.
FillClosedCurve(Brush, Point[], FillMode, float)
Fills the interior of a closed cardinal spline curve defined by an array of Point structures using the specified fill mode and tension.
public void FillClosedCurve(Brush brush, Point[] points, FillMode fillmode, float tension)
Parameters
brush
BrushBrush that determines the characteristics of the fill.
points
Point[]Array of Point structures that define the spline.
fillmode
FillModeMember of the FillMode enumeration that determines how the curve is filled.
tension
floatValue greater than or equal to 0.0F that specifies the tension of the curve.
Exceptions
- ArgumentNullException
brush
is null. -or-points
is null.
FillEllipse(Brush, Rectangle)
Fills the interior of an ellipse defined by a bounding rectangle specified by a Rectangle structure.
public void FillEllipse(Brush brush, Rectangle rect)
Parameters
brush
BrushBrush that determines the characteristics of the fill.
rect
RectangleRectangle structure that represents the bounding rectangle that defines the ellipse.
Exceptions
- ArgumentNullException
brush
is null.
FillEllipse(Brush, RectangleF)
Fills the interior of an ellipse defined by a bounding rectangle specified by a RectangleF structure.
public void FillEllipse(Brush brush, RectangleF rect)
Parameters
brush
BrushBrush that determines the characteristics of the fill.
rect
RectangleFRectangleF structure that represents the bounding rectangle that defines the ellipse.
Exceptions
- ArgumentNullException
brush
is null.
FillEllipse(Brush, int, int, int, int)
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, int x, int y, int width, int height)
Parameters
brush
BrushBrush that determines the characteristics of the fill.
x
intThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
y
intThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
width
intWidth of the bounding rectangle that defines the ellipse.
height
intHeight of the bounding rectangle that defines the ellipse.
Exceptions
- ArgumentNullException
brush
is null.
FillEllipse(Brush, float, float, float, float)
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)
Parameters
brush
BrushBrush that determines the characteristics of the fill.
x
floatThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
y
floatThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
width
floatWidth of the bounding rectangle that defines the ellipse.
height
floatHeight of the bounding rectangle that defines the ellipse.
Exceptions
- ArgumentNullException
brush
is null.
FillPath(Brush, GraphicsPath)
Fills the interior of a GraphicsPath.
public void FillPath(Brush brush, GraphicsPath path)
Parameters
brush
BrushBrush that determines the characteristics of the fill.
path
GraphicsPathGraphicsPath that represents the path to fill.
Exceptions
- ArgumentNullException
brush
is null. -or-path
is null.
FillPie(Brush, Rectangle, float, float)
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, Rectangle rect, float startAngle, float sweepAngle)
Parameters
brush
BrushBrush that determines the characteristics of the fill.
rect
RectangleRectangle structure that represents the bounding rectangle that defines the ellipse from which the pie section comes.
startAngle
floatAngle in degrees measured clockwise from the x-axis to the first side of the pie section.
sweepAngle
floatAngle in degrees measured clockwise from the
startAngle
parameter to the second side of the pie section.
Exceptions
- ArgumentNullException
brush
is null.
FillPie(Brush, RectangleF, float, float)
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, RectangleF rect, float startAngle, float sweepAngle)
Parameters
brush
BrushBrush that determines the characteristics of the fill.
rect
RectangleFRectangleF structure that represents the bounding rectangle that defines the ellipse from which the pie section comes.
startAngle
floatAngle in degrees measured clockwise from the x-axis to the first side of the pie section.
sweepAngle
floatAngle in degrees measured clockwise from the
startAngle
parameter to the second side of the pie section.
Exceptions
- ArgumentNullException
brush
is null.
FillPie(Brush, int, int, int, int, int, int)
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, int x, int y, int width, int height, int startAngle, int sweepAngle)
Parameters
brush
BrushBrush that determines the characteristics of the fill.
x
intThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.
y
intThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.
width
intWidth of the bounding rectangle that defines the ellipse from which the pie section comes.
height
intHeight of the bounding rectangle that defines the ellipse from which the pie section comes.
startAngle
intAngle in degrees measured clockwise from the x-axis to the first side of the pie section.
sweepAngle
intAngle in degrees measured clockwise from the
startAngle
parameter to the second side of the pie section.
Exceptions
- ArgumentNullException
brush
is null.
FillPie(Brush, float, float, float, float, float, float)
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)
Parameters
brush
BrushBrush that determines the characteristics of the fill.
x
floatThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.
y
floatThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.
width
floatWidth of the bounding rectangle that defines the ellipse from which the pie section comes.
height
floatHeight of the bounding rectangle that defines the ellipse from which the pie section comes.
startAngle
floatAngle in degrees measured clockwise from the x-axis to the first side of the pie section.
sweepAngle
floatAngle in degrees measured clockwise from the
startAngle
parameter to the second side of the pie section.
Exceptions
- ArgumentNullException
brush
is null.
FillPolygon(Brush, PointF[])
Fills the interior of a polygon defined by an array of points specified by PointF structures and Alternate.
public void FillPolygon(Brush brush, PointF[] points)
Parameters
brush
BrushBrush that determines the characteristics of the fill.
points
PointF[]Array of PointF structures that represent the vertices of the polygon to fill.
Exceptions
- ArgumentNullException
brush
is null. -or-points
is null.
FillPolygon(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 void FillPolygon(Brush brush, PointF[] points, FillMode fillMode)
Parameters
brush
BrushBrush that determines the characteristics of the fill.
points
PointF[]Array of PointF structures that represent the vertices of the polygon to fill.
fillMode
FillModeMember of the FillMode enumeration that determines the style of the fill.
Exceptions
- ArgumentNullException
brush
is null. -or-points
is null.
FillPolygon(Brush, Point[])
Fills the interior of a polygon defined by an array of points specified by Point structures and Alternate.
public void FillPolygon(Brush brush, Point[] points)
Parameters
brush
BrushBrush that determines the characteristics of the fill.
points
Point[]Array of Point structures that represent the vertices of the polygon to fill.
Exceptions
- ArgumentNullException
brush
is null. -or-points
is null.
FillPolygon(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 void FillPolygon(Brush brush, Point[] points, FillMode fillMode)
Parameters
brush
BrushBrush that determines the characteristics of the fill.
points
Point[]Array of Point structures that represent the vertices of the polygon to fill.
fillMode
FillModeMember of the FillMode enumeration that determines the style of the fill.
Exceptions
- ArgumentNullException
brush
is null. -or-points
is null.
FillRectangle(Brush, Rectangle)
Fills the interior of a rectangle specified by a Rectangle structure.
public void FillRectangle(Brush brush, Rectangle rect)
Parameters
brush
BrushBrush that determines the characteristics of the fill.
rect
RectangleRectangle structure that represents the rectangle to fill.
Exceptions
- ArgumentNullException
brush
is null.
FillRectangle(Brush, RectangleF)
Fills the interior of a rectangle specified by a RectangleF structure.
public void FillRectangle(Brush brush, RectangleF rect)
Parameters
brush
BrushBrush that determines the characteristics of the fill.
rect
RectangleFRectangleF structure that represents the rectangle to fill.
Exceptions
- ArgumentNullException
brush
is null.
FillRectangle(Brush, int, int, int, int)
Fills the interior of a rectangle specified by a pair of coordinates, a width and a height.
public void FillRectangle(Brush brush, int x, int y, int width, int height)
Parameters
brush
BrushBrush that determines the characteristics of the fill.
x
intThe x-coordinate of the upper-left corner of the rectangle to fill.
y
intThe y-coordinate of the upper-left corner of the rectangle to fill.
width
intWidth of the rectangle to fill.
height
intHeight of the rectangle to fill.
Exceptions
- ArgumentNullException
brush
is null.
FillRectangle(Brush, float, float, float, float)
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)
Parameters
brush
BrushBrush that determines the characteristics of the fill.
x
floatThe x-coordinate of the upper-left corner of the rectangle to fill.
y
floatThe y-coordinate of the upper-left corner of the rectangle to fill.
width
floatWidth of the rectangle to fill.
height
floatHeight of the rectangle to fill.
Exceptions
- ArgumentNullException
brush
is null.
FillRectangles(Brush, RectangleF[])
Fills the interiors of a series of rectangles specified by RectangleF structures.
public void FillRectangles(Brush brush, RectangleF[] rects)
Parameters
brush
BrushBrush that determines the characteristics of the fill.
rects
RectangleF[]Array of Rectangle structures that represent the rectangles to fill.
Exceptions
- ArgumentNullException
brush
is null orrects
is null.
FillRectangles(Brush, Rectangle[])
Fills the interiors of a series of rectangles specified by Rectangle structures.
public void FillRectangles(Brush brush, Rectangle[] rects)
Parameters
brush
BrushBrush that determines the characteristics of the fill.
rects
Rectangle[]Array of Rectangle structures that represent the rectangles to fill.
Exceptions
- ArgumentNullException
brush
is null orrects
is null.
FillRegion(Brush, Region)
Fills the interior of a Region.
public void FillRegion(Brush brush, Region region)
Parameters
brush
BrushBrush that determines the characteristics of the fill.
region
RegionRegion that represents the area to fill.
Exceptions
- ArgumentNullException
brush
is null. -or-region
is null.
MeasureString(string, Font, SizeF, StringFormat)
Measures the specified text string with specified parameters
public SizeF MeasureString(string text, Font font, SizeF layoutArea, StringFormat stringFormat)
Parameters
text
stringThe text to measure.
font
FontThe font to measure.
layoutArea
SizeFThe layout area.
stringFormat
StringFormatThe string format.
Returns
- SizeF
Size in pixels of measured text string
MultiplyTransform(Matrix)
Multiplies the Matrix that represents the local geometric transform of this Graphics by the specified Matrix by prepending the specified Matrix.
public void MultiplyTransform(Matrix matrix)
Parameters
MultiplyTransform(Matrix, MatrixOrder)
Multiplies the Matrix that represents the local geometric transform of this Graphics by the specified Matrix in the specified order.
public void MultiplyTransform(Matrix matrix, MatrixOrder order)
Parameters
matrix
MatrixThe Matrix by which to multiply the geometric transform.
order
MatrixOrderA MatrixOrder that specifies in which order to multiply the two matrices.
ResetTransform()
Resets the Transform property to identity.
public void ResetTransform()
RotateTransform(float)
Rotates the local geometric transform by the specified amount. This method prepends the rotation to the transform.
public void RotateTransform(float angle)
Parameters
angle
floatThe angle of rotation.
RotateTransform(float, MatrixOrder)
Rotates the local geometric transform by the specified amount in the specified order.
public void RotateTransform(float angle, MatrixOrder order)
Parameters
angle
floatThe angle of rotation.
order
MatrixOrderA MatrixOrder that specifies whether to append or prepend the rotation matrix.
ScaleTransform(float, float)
Scales the local geometric transform by the specified amounts. This method prepends the scaling matrix to the transform.
public void ScaleTransform(float sx, float sy)
Parameters
sx
floatThe amount by which to scale the transform in the x-axis direction.
sy
floatThe amount by which to scale the transform in the y-axis direction.
ScaleTransform(float, float, MatrixOrder)
Scales the local geometric transform by the specified amounts in the specified order.
public void ScaleTransform(float sx, float sy, MatrixOrder order)
Parameters
sx
floatThe amount by which to scale the transform in the x-axis direction.
sy
floatThe amount by which to scale the transform in the y-axis direction.
order
MatrixOrderA MatrixOrder that specifies whether to append or prepend the scaling matrix.
TranslateTransform(float, float)
Translates the local geometric transform by the specified dimensions. This method prepends the translation to the transform.
public void TranslateTransform(float dx, float dy)
Parameters
TranslateTransform(float, float, MatrixOrder)
Translates the local geometric transform by the specified dimensions in the specified order.
public void TranslateTransform(float dx, float dy, MatrixOrder order)
Parameters
dx
floatThe value of the translation in x.
dy
floatThe value of the translation in y.
order
MatrixOrderThe order (prepend or append) in which to apply the translation.