Table of Contents

Class XGraphics

Namespace
PdfSharp.Drawing
Assembly
PdfSharp.dll

Represents a drawing surface for a fixed size page.

public sealed class XGraphics : IDisposable
Inheritance
XGraphics
Implements
Inherited Members
Extension Methods

Properties

GraphicsStateLevel

Gets the current graphics state level. The default value is 0. Each call of Save or BeginContainer increased and each call of Restore or EndContainer decreased the value by 1.

public int GraphicsStateLevel { get; }

Property Value

int

Internals

Permits access to internal data.

public XGraphics.XGraphicsInternals Internals { get; }

Property Value

XGraphics.XGraphicsInternals

PageDirection

Gets or sets the value indicating in which direction y-value grow.

public XPageDirection PageDirection { get; set; }

Property Value

XPageDirection

PageOrigin

Gets the current page origin. Setting the origin is not yet implemented.

public XPoint PageOrigin { get; set; }

Property Value

XPoint

PageSize

Gets the current size of the page in the current page units.

public XSize PageSize { get; }

Property Value

XSize

PageUnit

Gets or sets the unit of measure used for page coordinates. CURRENTLY ONLY POINT IS IMPLEMENTED.

public XGraphicsUnit PageUnit { get; }

Property Value

XGraphicsUnit

PdfPage

Gets the PDF page that serves as drawing surface if PDF is rendered, or null if no such object exists.

public PdfPage? PdfPage { get; }

Property Value

PdfPage

SmoothingMode

Gets or sets the smoothing mode.

public XSmoothingMode SmoothingMode { get; set; }

Property Value

XSmoothingMode

The smoothing mode.

Transform

Gets the current transformation matrix. The transformation matrix cannot be set. Instead use Save/Restore or BeginContainer/EndContainer to save the state before Transform is called and later restore to the previous transform.

public XMatrix Transform { get; }

Property Value

XMatrix

Transformer

(Under construction. May change in future versions.)

public XGraphics.SpaceTransformer Transformer { get; }

Property Value

XGraphics.SpaceTransformer

Methods

BeginContainer()

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

public XGraphicsContainer BeginContainer()

Returns

XGraphicsContainer

BeginContainer(XRect, XRect, XGraphicsUnit)

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

public XGraphicsContainer BeginContainer(XRect dstrect, XRect srcrect, XGraphicsUnit unit)

Parameters

dstrect XRect
srcrect XRect
unit XGraphicsUnit

Returns

XGraphicsContainer

CreateMeasureContext(XSize, XGraphicsUnit, XPageDirection, RenderEvents?)

Creates the measure context. This is a graphics context created only for querying measures of text. Drawing on a measure context has no effect. Commit renderEvents to allow RenderTextEvent calls.

public static XGraphics CreateMeasureContext(XSize size, XGraphicsUnit pageUnit, XPageDirection pageDirection, RenderEvents? renderEvents = null)

Parameters

size XSize
pageUnit XGraphicsUnit
pageDirection XPageDirection
renderEvents RenderEvents

Returns

XGraphics

Dispose()

Releases all resources used by this object.

public void Dispose()

DrawArc(XPen, XRect, double, double)

Draws an arc representing a portion of an ellipse.

public void DrawArc(XPen pen, XRect rect, double startAngle, double sweepAngle)

Parameters

pen XPen
rect XRect
startAngle double
sweepAngle double

DrawArc(XPen, double, double, double, double, double, double)

Draws an arc representing a portion of an ellipse.

public void DrawArc(XPen pen, double x, double y, double width, double height, double startAngle, double sweepAngle)

Parameters

pen XPen
x double
y double
width double
height double
startAngle double
sweepAngle double

DrawBarCode(BarCode, XBrush, XFont, XPoint)

Draws the specified bar code.

public void DrawBarCode(BarCode barcode, XBrush brush, XFont font, XPoint position)

Parameters

barcode BarCode
brush XBrush
font XFont
position XPoint

DrawBarCode(BarCode, XBrush, XPoint)

Draws the specified bar code.

public void DrawBarCode(BarCode barcode, XBrush brush, XPoint position)

Parameters

barcode BarCode
brush XBrush
position XPoint

DrawBarCode(BarCode, XPoint)

Draws the specified bar code.

public void DrawBarCode(BarCode barcode, XPoint position)

Parameters

barcode BarCode
position XPoint

DrawBezier(XPen, XPoint, XPoint, XPoint, XPoint)

Draws a Bézier spline defined by four points.

public void DrawBezier(XPen pen, XPoint pt1, XPoint pt2, XPoint pt3, XPoint pt4)

Parameters

pen XPen
pt1 XPoint
pt2 XPoint
pt3 XPoint
pt4 XPoint

DrawBezier(XPen, double, double, double, double, double, double, double, double)

Draws a Bézier spline defined by four points.

public void DrawBezier(XPen pen, double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4)

Parameters

pen XPen
x1 double
y1 double
x2 double
y2 double
x3 double
y3 double
x4 double
y4 double

DrawBeziers(XPen, XPoint[])

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

public void DrawBeziers(XPen pen, XPoint[] points)

Parameters

pen XPen
points XPoint[]

DrawClosedCurve(XBrush, XPoint[])

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

public void DrawClosedCurve(XBrush brush, XPoint[] points)

Parameters

brush XBrush
points XPoint[]

DrawClosedCurve(XBrush, XPoint[], XFillMode)

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

public void DrawClosedCurve(XBrush brush, XPoint[] points, XFillMode fillMode)

Parameters

brush XBrush
points XPoint[]
fillMode XFillMode

DrawClosedCurve(XBrush, XPoint[], XFillMode, double)

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

public void DrawClosedCurve(XBrush brush, XPoint[] points, XFillMode fillMode, double tension)

Parameters

brush XBrush
points XPoint[]
fillMode XFillMode
tension double

DrawClosedCurve(XPen?, XBrush?, XPoint[])

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

public void DrawClosedCurve(XPen? pen, XBrush? brush, XPoint[] points)

Parameters

pen XPen
brush XBrush
points XPoint[]

DrawClosedCurve(XPen?, XBrush?, XPoint[], XFillMode)

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

public void DrawClosedCurve(XPen? pen, XBrush? brush, XPoint[] points, XFillMode fillMode)

Parameters

pen XPen
brush XBrush
points XPoint[]
fillMode XFillMode

DrawClosedCurve(XPen?, XBrush?, XPoint[], XFillMode, double)

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

public void DrawClosedCurve(XPen? pen, XBrush? brush, XPoint[] points, XFillMode fillMode, double tension)

Parameters

pen XPen
brush XBrush
points XPoint[]
fillMode XFillMode
tension double

DrawClosedCurve(XPen, XPoint[])

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

public void DrawClosedCurve(XPen pen, XPoint[] points)

Parameters

pen XPen
points XPoint[]

DrawClosedCurve(XPen, XPoint[], double)

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

public void DrawClosedCurve(XPen pen, XPoint[] points, double tension)

Parameters

pen XPen
points XPoint[]
tension double

DrawCurve(XPen, XPoint[])

Draws a cardinal spline through a specified array of points.

public void DrawCurve(XPen pen, XPoint[] points)

Parameters

pen XPen
points XPoint[]

DrawCurve(XPen, XPoint[], double)

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

public void DrawCurve(XPen pen, XPoint[] points, double tension)

Parameters

pen XPen
points XPoint[]
tension double

DrawCurve(XPen, XPoint[], int, int, double)

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

public void DrawCurve(XPen pen, XPoint[] points, int offset, int numberOfSegments, double tension)

Parameters

pen XPen
points XPoint[]
offset int
numberOfSegments int
tension double

DrawEllipse(XBrush, XRect)

Draws an ellipse defined by a bounding rectangle.

public void DrawEllipse(XBrush brush, XRect rect)

Parameters

brush XBrush
rect XRect

DrawEllipse(XBrush, double, double, double, double)

Draws an ellipse defined by a bounding rectangle.

public void DrawEllipse(XBrush brush, double x, double y, double width, double height)

Parameters

brush XBrush
x double
y double
width double
height double

DrawEllipse(XPen?, XBrush?, XRect)

Draws an ellipse defined by a bounding rectangle.

public void DrawEllipse(XPen? pen, XBrush? brush, XRect rect)

Parameters

pen XPen
brush XBrush
rect XRect

DrawEllipse(XPen?, XBrush?, double, double, double, double)

Draws an ellipse defined by a bounding rectangle.

public void DrawEllipse(XPen? pen, XBrush? brush, double x, double y, double width, double height)

Parameters

pen XPen
brush XBrush
x double
y double
width double
height double

DrawEllipse(XPen, XRect)

Draws an ellipse defined by a bounding rectangle.

public void DrawEllipse(XPen pen, XRect rect)

Parameters

pen XPen
rect XRect

DrawEllipse(XPen, double, double, double, double)

Draws an ellipse defined by a bounding rectangle.

public void DrawEllipse(XPen pen, double x, double y, double width, double height)

Parameters

pen XPen
x double
y double
width double
height double

DrawImage(XImage, XPoint)

Draws the specified image.

public void DrawImage(XImage image, XPoint point)

Parameters

image XImage
point XPoint

DrawImage(XImage, XRect)

Draws the specified image.

public void DrawImage(XImage image, XRect rect)

Parameters

image XImage
rect XRect

DrawImage(XImage, XRect, XRect, XGraphicsUnit)

Draws the specified image.

public void DrawImage(XImage image, XRect destRect, XRect srcRect, XGraphicsUnit srcUnit)

Parameters

image XImage
destRect XRect
srcRect XRect
srcUnit XGraphicsUnit

DrawImage(XImage, double, double)

Draws the specified image.

public void DrawImage(XImage image, double x, double y)

Parameters

image XImage
x double
y double

DrawImage(XImage, double, double, double, double)

Draws the specified image.

public void DrawImage(XImage image, double x, double y, double width, double height)

Parameters

image XImage
x double
y double
width double
height double

DrawLine(XPen, XPoint, XPoint)

Draws a line connecting two XPoint structures.

public void DrawLine(XPen pen, XPoint pt1, XPoint pt2)

Parameters

pen XPen
pt1 XPoint
pt2 XPoint

DrawLine(XPen, double, double, double, double)

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

public void DrawLine(XPen pen, double x1, double y1, double x2, double y2)

Parameters

pen XPen
x1 double
y1 double
x2 double
y2 double

DrawLines(XPen, XPoint[])

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

public void DrawLines(XPen pen, XPoint[] points)

Parameters

pen XPen
points XPoint[]

DrawLines(XPen, double, double, params double[])

Draws a series of line segments that connect an array of x and y pairs.

public void DrawLines(XPen pen, double x, double y, params double[] value)

Parameters

pen XPen
x double
y double
value double[]

DrawMatrixCode(MatrixCode, XBrush, XPoint)

Draws the specified data matrix code.

public void DrawMatrixCode(MatrixCode matrixcode, XBrush brush, XPoint position)

Parameters

matrixcode MatrixCode
brush XBrush
position XPoint

DrawMatrixCode(MatrixCode, XPoint)

Draws the specified data matrix code.

public void DrawMatrixCode(MatrixCode matrixcode, XPoint position)

Parameters

matrixcode MatrixCode
position XPoint

DrawPath(XBrush, XGraphicsPath)

Draws a graphical path.

public void DrawPath(XBrush brush, XGraphicsPath path)

Parameters

brush XBrush
path XGraphicsPath

DrawPath(XPen?, XBrush?, XGraphicsPath)

Draws a graphical path.

public void DrawPath(XPen? pen, XBrush? brush, XGraphicsPath path)

Parameters

pen XPen
brush XBrush
path XGraphicsPath

DrawPath(XPen, XGraphicsPath)

Draws a graphical path.

public void DrawPath(XPen pen, XGraphicsPath path)

Parameters

pen XPen
path XGraphicsPath

DrawPie(XBrush, XRect, double, double)

Draws a pie defined by an ellipse.

public void DrawPie(XBrush brush, XRect rect, double startAngle, double sweepAngle)

Parameters

brush XBrush
rect XRect
startAngle double
sweepAngle double

DrawPie(XBrush, double, double, double, double, double, double)

Draws a pie defined by an ellipse.

public void DrawPie(XBrush brush, double x, double y, double width, double height, double startAngle, double sweepAngle)

Parameters

brush XBrush
x double
y double
width double
height double
startAngle double
sweepAngle double

DrawPie(XPen?, XBrush?, XRect, double, double)

Draws a pie defined by an ellipse.

public void DrawPie(XPen? pen, XBrush? brush, XRect rect, double startAngle, double sweepAngle)

Parameters

pen XPen
brush XBrush
rect XRect
startAngle double
sweepAngle double

DrawPie(XPen?, XBrush?, double, double, double, double, double, double)

Draws a pie defined by an ellipse.

public void DrawPie(XPen? pen, XBrush? brush, double x, double y, double width, double height, double startAngle, double sweepAngle)

Parameters

pen XPen
brush XBrush
x double
y double
width double
height double
startAngle double
sweepAngle double

DrawPie(XPen, XRect, double, double)

Draws a pie defined by an ellipse.

public void DrawPie(XPen pen, XRect rect, double startAngle, double sweepAngle)

Parameters

pen XPen
rect XRect
startAngle double
sweepAngle double

DrawPie(XPen, double, double, double, double, double, double)

Draws a pie defined by an ellipse.

public void DrawPie(XPen pen, double x, double y, double width, double height, double startAngle, double sweepAngle)

Parameters

pen XPen
x double
y double
width double
height double
startAngle double
sweepAngle double

DrawPolygon(XBrush, XPoint[], XFillMode)

Draws a polygon defined by an array of points.

public void DrawPolygon(XBrush brush, XPoint[] points, XFillMode fillMode)

Parameters

brush XBrush
points XPoint[]
fillMode XFillMode

DrawPolygon(XPen?, XBrush?, XPoint[], XFillMode)

Draws a polygon defined by an array of points.

public void DrawPolygon(XPen? pen, XBrush? brush, XPoint[] points, XFillMode fillMode)

Parameters

pen XPen
brush XBrush
points XPoint[]
fillMode XFillMode

DrawPolygon(XPen, XPoint[])

Draws a polygon defined by an array of points.

public void DrawPolygon(XPen pen, XPoint[] points)

Parameters

pen XPen
points XPoint[]

DrawRectangle(XBrush, XRect)

Draws a rectangle.

public void DrawRectangle(XBrush brush, XRect rect)

Parameters

brush XBrush
rect XRect

DrawRectangle(XBrush, double, double, double, double)

Draws a rectangle.

public void DrawRectangle(XBrush brush, double x, double y, double width, double height)

Parameters

brush XBrush
x double
y double
width double
height double

DrawRectangle(XPen?, XBrush?, XRect)

Draws a rectangle.

public void DrawRectangle(XPen? pen, XBrush? brush, XRect rect)

Parameters

pen XPen
brush XBrush
rect XRect

DrawRectangle(XPen?, XBrush?, double, double, double, double)

Draws a rectangle.

public void DrawRectangle(XPen? pen, XBrush? brush, double x, double y, double width, double height)

Parameters

pen XPen
brush XBrush
x double
y double
width double
height double

DrawRectangle(XPen, XRect)

Draws a rectangle.

public void DrawRectangle(XPen pen, XRect rect)

Parameters

pen XPen
rect XRect

DrawRectangle(XPen, double, double, double, double)

Draws a rectangle.

public void DrawRectangle(XPen pen, double x, double y, double width, double height)

Parameters

pen XPen
x double
y double
width double
height double

DrawRectangles(XBrush, XRect[])

Draws a series of rectangles.

public void DrawRectangles(XBrush brush, XRect[] rectangles)

Parameters

brush XBrush
rectangles XRect[]

DrawRectangles(XPen?, XBrush?, XRect[])

Draws a series of rectangles.

public void DrawRectangles(XPen? pen, XBrush? brush, XRect[] rectangles)

Parameters

pen XPen
brush XBrush
rectangles XRect[]

DrawRectangles(XPen, XRect[])

Draws a series of rectangles.

public void DrawRectangles(XPen pen, XRect[] rectangles)

Parameters

pen XPen
rectangles XRect[]

DrawRoundedRectangle(XBrush, XRect, XSize)

Draws a rectangle with rounded corners.

public void DrawRoundedRectangle(XBrush brush, XRect rect, XSize ellipseSize)

Parameters

brush XBrush
rect XRect
ellipseSize XSize

DrawRoundedRectangle(XBrush, double, double, double, double, double, double)

Draws a rectangle with rounded corners.

public void DrawRoundedRectangle(XBrush brush, double x, double y, double width, double height, double ellipseWidth, double ellipseHeight)

Parameters

brush XBrush
x double
y double
width double
height double
ellipseWidth double
ellipseHeight double

DrawRoundedRectangle(XPen?, XBrush?, XRect, XSize)

Draws a rectangle with rounded corners.

public void DrawRoundedRectangle(XPen? pen, XBrush? brush, XRect rect, XSize ellipseSize)

Parameters

pen XPen
brush XBrush
rect XRect
ellipseSize XSize

DrawRoundedRectangle(XPen?, XBrush?, double, double, double, double, double, double)

Draws a rectangle with rounded corners.

public void DrawRoundedRectangle(XPen? pen, XBrush? brush, double x, double y, double width, double height, double ellipseWidth, double ellipseHeight)

Parameters

pen XPen
brush XBrush
x double
y double
width double
height double
ellipseWidth double
ellipseHeight double

DrawRoundedRectangle(XPen, XRect, XSize)

Draws a rectangle with rounded corners.

public void DrawRoundedRectangle(XPen pen, XRect rect, XSize ellipseSize)

Parameters

pen XPen
rect XRect
ellipseSize XSize

DrawRoundedRectangle(XPen, double, double, double, double, double, double)

Draws a rectangle with rounded corners.

public void DrawRoundedRectangle(XPen pen, double x, double y, double width, double height, double ellipseWidth, double ellipseHeight)

Parameters

pen XPen
x double
y double
width double
height double
ellipseWidth double
ellipseHeight double

DrawString(string, XFont, XBrush, XPoint)

Draws the specified text string.

public void DrawString(string s, XFont font, XBrush brush, XPoint point)

Parameters

s string
font XFont
brush XBrush
point XPoint

DrawString(string, XFont, XBrush, XPoint, XStringFormat)

Draws the specified text string.

public void DrawString(string s, XFont font, XBrush brush, XPoint point, XStringFormat format)

Parameters

s string
font XFont
brush XBrush
point XPoint
format XStringFormat

DrawString(string, XFont, XBrush, XRect)

Draws the specified text string.

public void DrawString(string s, XFont font, XBrush brush, XRect layoutRectangle)

Parameters

s string
font XFont
brush XBrush
layoutRectangle XRect

DrawString(string, XFont, XBrush, XRect, XStringFormat)

Draws the specified text string.

public void DrawString(string text, XFont font, XBrush brush, XRect layoutRectangle, XStringFormat format)

Parameters

text string
font XFont
brush XBrush
layoutRectangle XRect
format XStringFormat

DrawString(string, XFont, XBrush, double, double)

Draws the specified text string.

public void DrawString(string s, XFont font, XBrush brush, double x, double y)

Parameters

s string
font XFont
brush XBrush
x double
y double

DrawString(string, XFont, XBrush, double, double, XStringFormat)

Draws the specified text string.

public void DrawString(string s, XFont font, XBrush brush, double x, double y, XStringFormat format)

Parameters

s string
font XFont
brush XBrush
x double
y double
format XStringFormat

EndContainer(XGraphicsContainer)

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

public void EndContainer(XGraphicsContainer container)

Parameters

container XGraphicsContainer

FromForm(XForm)

Creates a new instance of the XGraphics class from a PdfSharp.Drawing.XForm object.

public static XGraphics FromForm(XForm form)

Parameters

form XForm

Returns

XGraphics

FromImage(XImage, XGraphicsUnit, RenderEvents)

Creates a new instance of the XGraphics class from a PdfSharp.Drawing.XImage object.

public static XGraphics? FromImage(XImage image, XGraphicsUnit unit, RenderEvents renderEvents)

Parameters

image XImage
unit XGraphicsUnit
renderEvents RenderEvents

Returns

XGraphics

FromImage(XImage, RenderEvents)

Creates a new instance of the XGraphics class from a PdfSharp.Drawing.XForm object.

public static XGraphics? FromImage(XImage image, RenderEvents renderEvents)

Parameters

image XImage
renderEvents RenderEvents

Returns

XGraphics

FromPdfForm(XPdfForm)

Creates a new instance of the XGraphics class from a PdfSharp.Drawing.XPdfForm object.

public static XGraphics FromPdfForm(XPdfForm form)

Parameters

form XPdfForm

Returns

XGraphics

FromPdfPage(PdfPage)

Creates a new instance of the XGraphics class from a PdfSharp.Pdf.PdfPage object.

public static XGraphics FromPdfPage(PdfPage page)

Parameters

page PdfPage

Returns

XGraphics

FromPdfPage(PdfPage, XGraphicsPdfPageOptions)

Creates a new instance of the XGraphics class from a PdfSharp.Pdf.PdfPage object.

public static XGraphics FromPdfPage(PdfPage page, XGraphicsPdfPageOptions options)

Parameters

page PdfPage
options XGraphicsPdfPageOptions

Returns

XGraphics

FromPdfPage(PdfPage, XGraphicsPdfPageOptions, XGraphicsUnit)

Creates a new instance of the XGraphics class from a PdfSharp.Pdf.PdfPage object.

public static XGraphics FromPdfPage(PdfPage page, XGraphicsPdfPageOptions options, XGraphicsUnit unit)

Parameters

page PdfPage
options XGraphicsPdfPageOptions
unit XGraphicsUnit

Returns

XGraphics

FromPdfPage(PdfPage, XGraphicsPdfPageOptions, XGraphicsUnit, XPageDirection)

Creates a new instance of the XGraphics class from a PdfSharp.Pdf.PdfPage object.

public static XGraphics FromPdfPage(PdfPage page, XGraphicsPdfPageOptions options, XGraphicsUnit unit, XPageDirection pageDirection)

Parameters

page PdfPage
options XGraphicsPdfPageOptions
unit XGraphicsUnit
pageDirection XPageDirection

Returns

XGraphics

FromPdfPage(PdfPage, XGraphicsPdfPageOptions, XPageDirection)

Creates a new instance of the XGraphics class from a PdfSharp.Pdf.PdfPage object.

public static XGraphics FromPdfPage(PdfPage page, XGraphicsPdfPageOptions options, XPageDirection pageDirection)

Parameters

page PdfPage
options XGraphicsPdfPageOptions
pageDirection XPageDirection

Returns

XGraphics

FromPdfPage(PdfPage, XGraphicsUnit)

Creates a new instance of the XGraphics class from a PdfSharp.Pdf.PdfPage object.

public static XGraphics FromPdfPage(PdfPage page, XGraphicsUnit unit)

Parameters

page PdfPage
unit XGraphicsUnit

Returns

XGraphics

FromPdfPage(PdfPage, XPageDirection)

Creates a new instance of the XGraphics class from a PdfSharp.Pdf.PdfPage object.

public static XGraphics FromPdfPage(PdfPage page, XPageDirection pageDirection)

Parameters

page PdfPage
pageDirection XPageDirection

Returns

XGraphics

IntersectClip(XGraphicsPath)

Updates the clip region of this XGraphics to the intersection of the current clip region and the specified graphical path.

public void IntersectClip(XGraphicsPath path)

Parameters

path XGraphicsPath

IntersectClip(XRect)

Updates the clip region of this XGraphics to the intersection of the current clip region and the specified rectangle.

public void IntersectClip(XRect rect)

Parameters

rect XRect

MeasureString(string, XFont)

Measures the specified string when drawn with the specified font.

public XSize MeasureString(string text, XFont font)

Parameters

text string
font XFont

Returns

XSize

MeasureString(string, XFont, XStringFormat)

Measures the specified string when drawn with the specified font.

public XSize MeasureString(string text, XFont font, XStringFormat stringFormat)

Parameters

text string
font XFont
stringFormat XStringFormat

Returns

XSize

MultiplyTransform(XMatrix)

Multiplies the transformation matrix of this object and specified matrix.

public void MultiplyTransform(XMatrix matrix)

Parameters

matrix XMatrix

MultiplyTransform(XMatrix, XMatrixOrder)

Multiplies the transformation matrix of this object and specified matrix in the specified order.

public void MultiplyTransform(XMatrix matrix, XMatrixOrder order)

Parameters

matrix XMatrix
order XMatrixOrder

Restore()

Restores the state of this XGraphics object to the state before the most recently call of Save.

public void Restore()

Restore(XGraphicsState)

Restores the state of this XGraphics object to the state represented by the specified XGraphicsState object.

public void Restore(XGraphicsState state)

Parameters

state XGraphicsState

RotateAtTransform(double, XPoint)

Applies the specified rotation operation to the transformation matrix of this object by prepending it to the object’s transformation matrix.

public void RotateAtTransform(double angle, XPoint point)

Parameters

angle double
point XPoint

RotateAtTransform(double, XPoint, XMatrixOrder)

Applies the specified rotation operation to the transformation matrix of this object by prepending it to the object’s transformation matrix.

public void RotateAtTransform(double angle, XPoint point, XMatrixOrder order)

Parameters

angle double
point XPoint
order XMatrixOrder

RotateTransform(double)

Applies the specified rotation operation to the transformation matrix of this object by prepending it to the object’s transformation matrix.

public void RotateTransform(double angle)

Parameters

angle double

RotateTransform(double, XMatrixOrder)

Applies the specified rotation operation to the transformation matrix of this object in the specified order. The angle unit of measure is degree.

public void RotateTransform(double angle, XMatrixOrder order)

Parameters

angle double
order XMatrixOrder

Save()

Saves the current state of this XGraphics object and identifies the saved state with the returned XGraphicsState object.

public XGraphicsState Save()

Returns

XGraphicsState

ScaleAtTransform(double, double, XPoint)

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

public void ScaleAtTransform(double scaleX, double scaleY, XPoint center)

Parameters

scaleX double
scaleY double
center XPoint

ScaleAtTransform(double, double, double, double)

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

public void ScaleAtTransform(double scaleX, double scaleY, double centerX, double centerY)

Parameters

scaleX double
scaleY double
centerX double
centerY double

ScaleTransform(double)

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

public void ScaleTransform(double scaleXY)

Parameters

scaleXY double

ScaleTransform(double, XMatrixOrder)

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

public void ScaleTransform(double scaleXY, XMatrixOrder order)

Parameters

scaleXY double
order XMatrixOrder

ScaleTransform(double, double)

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

public void ScaleTransform(double scaleX, double scaleY)

Parameters

scaleX double
scaleY double

ScaleTransform(double, double, XMatrixOrder)

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

public void ScaleTransform(double scaleX, double scaleY, XMatrixOrder order)

Parameters

scaleX double
scaleY double
order XMatrixOrder

ShearTransform(double, double)

Applies the specified shearing operation to the transformation matrix of this object by prepending it to the object’s transformation matrix. ShearTransform is a synonym for SkewAtTransform. Parameter shearX specifies the horizontal skew which is measured in degrees counterclockwise from the y-axis. Parameter shearY specifies the vertical skew which is measured in degrees counterclockwise from the x-axis.

public void ShearTransform(double shearX, double shearY)

Parameters

shearX double
shearY double

ShearTransform(double, double, XMatrixOrder)

Applies the specified shearing operation to the transformation matrix of this object in the specified order. ShearTransform is a synonym for SkewAtTransform. Parameter shearX specifies the horizontal skew which is measured in degrees counterclockwise from the y-axis. Parameter shearY specifies the vertical skew which is measured in degrees counterclockwise from the x-axis.

public void ShearTransform(double shearX, double shearY, XMatrixOrder order)

Parameters

shearX double
shearY double
order XMatrixOrder

SkewAtTransform(double, double, XPoint)

Applies the specified shearing operation to the transformation matrix of this object by prepending it to the object’s transformation matrix. ShearTransform is a synonym for SkewAtTransform. Parameter shearX specifies the horizontal skew which is measured in degrees counterclockwise from the y-axis. Parameter shearY specifies the vertical skew which is measured in degrees counterclockwise from the x-axis.

public void SkewAtTransform(double shearX, double shearY, XPoint center)

Parameters

shearX double
shearY double
center XPoint

SkewAtTransform(double, double, double, double)

Applies the specified shearing operation to the transformation matrix of this object by prepending it to the object’s transformation matrix. ShearTransform is a synonym for SkewAtTransform. Parameter shearX specifies the horizontal skew which is measured in degrees counterclockwise from the y-axis. Parameter shearY specifies the vertical skew which is measured in degrees counterclockwise from the x-axis.

public void SkewAtTransform(double shearX, double shearY, double centerX, double centerY)

Parameters

shearX double
shearY double
centerX double
centerY double

TranslateTransform(double, double)

Applies the specified translation operation to the transformation matrix of this object by prepending it to the object’s transformation matrix.

public void TranslateTransform(double dx, double dy)

Parameters

dx double
dy double

TranslateTransform(double, double, XMatrixOrder)

Applies the specified translation operation to the transformation matrix of this object in the specified order.

public void TranslateTransform(double dx, double dy, XMatrixOrder order)

Parameters

dx double
dy double
order XMatrixOrder

WriteComment(string)

Writes a comment to the output stream. Comments have no effect on the rendering of the output. They may be useful to mark a position in a content stream of a page in a PDF document.

public void WriteComment(string comment)

Parameters

comment string