CGContextPDF Class

Definition

PDF Rendering CGContext class. Use this class to create a CGContext that will output the results to a PDF file.

public class CGContextPDF : CoreGraphics.CGContext
type CGContextPDF = class
    inherit CGContext
Inheritance
CGContextPDF

Remarks

You can use all of the regular CGContext methods, the

result, instead of being rendered into the screen or an image, the

commands are turned into PDF commands and stored in a PDF

file.

Constructors

CGContextPDF(CGDataConsumer)
CGContextPDF(CGDataConsumer, CGPDFInfo)
CGContextPDF(CGDataConsumer, CGRect)
CGContextPDF(CGDataConsumer, CGRect, CGPDFInfo)
CGContextPDF(NSUrl)

Creates a new CGContext that records its commands into a PDF file with the mediaBox dimensions stored in the specified url.

CGContextPDF(NSUrl, CGPDFInfo)

Creates a new CGContext that records its commands into a PDF file in the specified url.

CGContextPDF(NSUrl, CGRect)

Creates a new CGContext that records its commands into a PDF file with the mediaBox dimensions stored in the specified url.

CGContextPDF(NSUrl, CGRect, CGPDFInfo)

Properties

Handle

Handle (pointer) to the unmanaged object representation.

(Inherited from CGContext)
InterpolationQuality

A hint for the level of quality used when interpolating images (for example, when scaling).

(Inherited from CGContext)
TextMatrix

Defines the transform between text space and user space. Independent of the CGContext's state.

(Inherited from CGContext)
TextPosition

The location, in user space coordinates, at which to draw text.

(Inherited from CGContext)

Methods

AddArc(nfloat, nfloat, nfloat, nfloat, nfloat, Boolean) (Inherited from CGContext)
AddArcToPoint(nfloat, nfloat, nfloat, nfloat, nfloat)

Adds an arc to the current path.

(Inherited from CGContext)
AddCurveToPoint(nfloat, nfloat, nfloat, nfloat, nfloat, nfloat)

Adds a cubic Bézier curve at the current point, with the specified control parameters.

(Inherited from CGContext)
AddDestination(String, CGPoint)

Adds a destination name at the specified location.

AddDocumentMetadata(NSData)
AddEllipseInRect(CGRect)

Adds an ellipse that fits in the specified rect.

(Inherited from CGContext)
AddLines(CGPoint[])

Adds the given lines to the current path.

(Inherited from CGContext)
AddLineToPoint(nfloat, nfloat)

Appends a line from the current point (see GetPathCurrentPoint()) to the specified coordinates in user space.

(Inherited from CGContext)
AddPath(CGPath)

Adds the specified path to the current path.

(Inherited from CGContext)
AddQuadCurveToPoint(nfloat, nfloat, nfloat, nfloat)

Adds a quadratic Bézier curve to the current path.

(Inherited from CGContext)
AddRect(CGRect)

Adds a rectangular path to the current path.

(Inherited from CGContext)
AddRects(CGRect[])

Adds an array of rectangular paths to the current path.

(Inherited from CGContext)
AsBitmapContext()

Casts the CGContext into a CGBitmapContext.

(Inherited from CGContext)
BeginPage(CGPDFPageInfo)
BeginPage(Nullable<CGRect>) (Inherited from CGContext)
BeginPath()

Starts a new path in the graphics context.

(Inherited from CGContext)
BeginTransparencyLayer(CGRect, NSDictionary) (Inherited from CGContext)
BeginTransparencyLayer(NSDictionary)

With EndTransparencyLayer(), encloses operations on a fully transparent layer.

(Inherited from CGContext)
ClearRect(CGRect)

Paints the rectangle transparently.

(Inherited from CGContext)
Clip()

Sets the current path of the graphics context to be the clipping path.

(Inherited from CGContext)
ClipToMask(CGRect, CGImage) (Inherited from CGContext)
ClipToRect(CGRect)

Modifies the clipping path to be the intersection of the current path and the supplied rectangle.

(Inherited from CGContext)
ClipToRects(CGRect[])

Modifies the current clipping path to be the insersection of the current clipping path and the region specified by the supplied rectangles.

(Inherited from CGContext)
Close()
ClosePath()

Closes and completes the current path.

(Inherited from CGContext)
ConcatCTM(CGAffineTransform)

Concatenates the specified transform onto the current transformation matrix.

(Inherited from CGContext)
ContextFillRects(CGRect[]) (Inherited from CGContext)
ConvertPointToUserSpace(CGPoint)

Converts a point from device space coordinates to user space coordinates.

(Inherited from CGContext)
ConvertRectToDeviceSpace(CGRect)

Converts a rectangle from user space coordinates to device space coordinates.

(Inherited from CGContext)
ConvertRectToUserSpace(CGRect)

Converts a rectangle from device space coordinates to user space coordinates.

(Inherited from CGContext)
ConvertSizeToDeviceSpace(CGSize)

Converts a size from user space coordinates to device space coordinates.

(Inherited from CGContext)
ConvertSizeToUserSpace(CGSize)

Converts a size from device space coordinates to user space coordinates.

(Inherited from CGContext)
CopyPath()

Returns a deep copy of the current path in the current context.

(Inherited from CGContext)
Dispose()

Releases the resources used by the CGContext object.

(Inherited from CGContext)
Dispose(Boolean)

Releases the resources used by the CGContextPDF object.

DrawImage(CGRect, CGImage) (Inherited from CGContext)
DrawLayer(CGLayer, CGPoint)

Draws a layer into the graphics context at the specified point.

(Inherited from CGContext)
DrawLayer(CGLayer, CGRect)

Draws a layer into the graphics context bounded by the specified rectangle.

(Inherited from CGContext)
DrawLinearGradient(CGGradient, CGPoint, CGPoint, CGGradientDrawingOptions) (Inherited from CGContext)
DrawPath(CGPathDrawingMode)

Draws the CGContext's current path.

(Inherited from CGContext)
DrawPDFPage(CGPDFPage)

Renders the specified PDF page.

(Inherited from CGContext)
DrawRadialGradient(CGGradient, CGPoint, nfloat, CGPoint, nfloat, CGGradientDrawingOptions) (Inherited from CGContext)
DrawShading(CGShading)

Renders the specified shading.

(Inherited from CGContext)
DrawTiledImage(CGRect, CGImage) (Inherited from CGContext)
EndPage()
EndTransparencyLayer()

Indicates the end of a transparency layer.

(Inherited from CGContext)
EOClip()

Modifies the current clipping path, using the Even-Odd rule.

(Inherited from CGContext)
EOFillPath()

Fills the current path, using the Even-Odd rule.

(Inherited from CGContext)
FillEllipseInRect(CGRect)

Paints the ellipse defined by rect. Afterwards, the current path is reset.

(Inherited from CGContext)
FillPath()

Fills the current path, using Non-Zero Winding rule.

(Inherited from CGContext)
FillRect(CGRect)

Paints the specified rect.

(Inherited from CGContext)
Flush()

Forces all pending drawing to be rendered.

(Inherited from CGContext)
GetClipBoundingBox()

The bounding box of the current clipping path.

(Inherited from CGContext)
GetCTM()

Retrieves the current Context Transformation Matrix.

(Inherited from CGContext)
GetPathBoundingBox()

Returns the bounding box for the current path.

(Inherited from CGContext)
GetPathCurrentPoint()

The current point in the CGContext's path.

(Inherited from CGContext)
GetUserSpaceToDeviceSpaceTransform()

The CGAffineTransform that maps user-space coordinates into device-space coordinates.

(Inherited from CGContext)
IsPathEmpty()

Whether the current path contains any subpaths.

(Inherited from CGContext)
MoveTo(nfloat, nfloat)

Begins a sub-path at the specified position.

(Inherited from CGContext)
PathContainsPoint(CGPoint, CGPathDrawingMode) (Inherited from CGContext)
PointToDeviceSpace(CGPoint)

Returns a new PointF that converts the user-space point into device space.

(Inherited from CGContext)
ReplacePathWithStrokedPath()

Replaces the current path with the stroked version of the path, based on the stroke paremeters.

(Inherited from CGContext)
ResetClip() (Inherited from CGContext)
RestoreState()

Sets the state of the CGContext to what it was when SaveState() was last called.

(Inherited from CGContext)
RotateCTM(nfloat)

Rotates the current transformation matrix by angle radians, with positive values rotating counterclockwise.

(Inherited from CGContext)
SaveState()

Stores the state of the CGContext. (See RestoreState().)

(Inherited from CGContext)
ScaleCTM(nfloat, nfloat)

Scales the current transformation matrix.

(Inherited from CGContext)
SelectFont(String, nfloat, CGTextEncoding)

Developers should not use this deprecated method. Developers should use the 'CoreText' API instead.

(Inherited from CGContext)
SetAllowsAntialiasing(Boolean)

Whether the context allows antialiasing.

(Inherited from CGContext)
SetAllowsFontSmoothing(Boolean)

Whether the context allows font smoothing.

(Inherited from CGContext)
SetAllowsFontSubpixelQuantization(Boolean)

Whether the context allows for glyphs to be drawn at subpixel locations.

(Inherited from CGContext)
SetAllowsSubpixelPositioning(Boolean)

Whether the context allows for glyphs to be aligned other than to pixel boundaries.

(Inherited from CGContext)
SetAlpha(nfloat)

Sets the opacity for drawing, in the range 0.0 (transparent) to 1.0 (opaque).

(Inherited from CGContext)
SetBlendMode(CGBlendMode)

Specifies the compositing mode.

(Inherited from CGContext)
SetCharacterSpacing(nfloat)

Adds additional spacing between glyphs.

(Inherited from CGContext)
SetDestination(String, CGRect)

If the user clicks or taps in the specified region, the PDF viewer will jump to the named destination

SetFillColor(CGColor)

Sets the fill color to the specified CGColor.

(Inherited from CGContext)
SetFillColor(nfloat, nfloat)

Sets the fill color to a gray level, in the range 0 (black) to 1 (white).

(Inherited from CGContext)
SetFillColor(nfloat, nfloat, nfloat, nfloat)

Sets the fill color to the specified RGBA values.

(Inherited from CGContext)
SetFillColor(nfloat, nfloat, nfloat, nfloat, nfloat)

Sets the fill color using CMYK color-space components, plus an alpha value.

(Inherited from CGContext)
SetFillColor(nfloat[])

Sets the fill color. SetFillColorSpace(CGColorSpace) must be called prior.

(Inherited from CGContext)
SetFillColorSpace(CGColorSpace)

Specifies the CGColorSpace to be used in the context.

(Inherited from CGContext)
SetFillPattern(CGPattern, nfloat[])

Sets the fill pattern of the context.

(Inherited from CGContext)
SetFlatness(nfloat)

The accuracy of curved paths.

(Inherited from CGContext)
SetFont(CGFont)

Sets the CGFont used to render text.

(Inherited from CGContext)
SetFontSize(nfloat)

Sets the size of the font used to rende text.

(Inherited from CGContext)
SetLineCap(CGLineCap)

Sets the style for the ends of lines.

(Inherited from CGContext)
SetLineDash(nfloat, nfloat[])

The pattern to be used for drawing dashed lines.

(Inherited from CGContext)
SetLineDash(nfloat, nfloat[], Int32) (Inherited from CGContext)
SetLineJoin(CGLineJoin)

Sets the way lines are joined.

(Inherited from CGContext)
SetLineWidth(nfloat)

Sets the width of the stroked line. The line extends for half w to either side of the path.

(Inherited from CGContext)
SetMiterLimit(nfloat)

Specifies the miter limit for connecting lines.

(Inherited from CGContext)
SetPatternPhase(CGSize)

Translates the pattern prior to beginning to tile it.

(Inherited from CGContext)
SetRenderingIntent(CGColorRenderingIntent)

How colors outside the destination color space are handled.

(Inherited from CGContext)
SetShadow(CGSize, nfloat, CGColor) (Inherited from CGContext)
SetShouldAntialias(Boolean)

Used in conjunction with SetAllowsAntialiasing(Boolean) to enable or disable antialiasing.

(Inherited from CGContext)
SetShouldSmoothFonts(Boolean)

Used in conjunction with SetAllowsFontSmoothing(Boolean) to enable or disable font smoothing.

(Inherited from CGContext)
SetShouldSubpixelPositionFonts(Boolean)

Used in conjunction with SetAllowsSubpixelPositioning(Boolean) to enable or disable glyph alignment with pixels.

(Inherited from CGContext)
SetStrokeColor(CGColor)

Sets the stroke color.

(Inherited from CGContext)
SetStrokeColor(nfloat, nfloat)

Sets the stroke color to a grayscale value.

(Inherited from CGContext)
SetStrokeColor(nfloat, nfloat, nfloat, nfloat)

Sets the stroke color to an RGBA color.

(Inherited from CGContext)
SetStrokeColor(nfloat, nfloat, nfloat, nfloat, nfloat)

Sets the stroke color to a CMYKA color.

(Inherited from CGContext)
SetStrokeColor(nfloat[])

Sets the stroke color. This API has undefined behavior if you do not set the colorspace beforehand.

(Inherited from CGContext)
SetStrokeColorSpace(CGColorSpace)

Sets the CGColorSpace to be used with M:CoreGraphics.CGContext.SetStrokeColor(float[]).

(Inherited from CGContext)
SetStrokePattern(CGPattern, nfloat[])

Sets the stroke pattern of the context.

(Inherited from CGContext)
SetTextDrawingMode(CGTextDrawingMode)

Specifies how glyphs should be rendered.

(Inherited from CGContext)
SetUrl(NSUrl, CGRect)

Associates a region in the screen with a url. When the user clicks or taps in that region, he will be redirected to that url on their PDF viewer.

ShouldSubpixelQuantizeFonts(Boolean)

With SetAllowsFontSubpixelQuantization(Boolean), determines whether fonts should be drawn at subpixel locations.

(Inherited from CGContext)
ShowGlyphs(UInt16[])

N:CoreText

(Inherited from CGContext)
ShowGlyphs(UInt16[], Int32)

N:CoreText

(Inherited from CGContext)
ShowGlyphsAtPoint(nfloat, nfloat, UInt16[]) (Inherited from CGContext)
ShowGlyphsAtPoint(nfloat, nfloat, UInt16[], Int32) (Inherited from CGContext)
ShowGlyphsAtPositions(UInt16[], CGPoint[], Int32) (Inherited from CGContext)
ShowGlyphsWithAdvances(UInt16[], CGSize[], Int32) (Inherited from CGContext)
ShowText(Byte[])

N:CoreText

(Inherited from CGContext)
ShowText(Byte[], Int32)

N:CoreText

(Inherited from CGContext)
ShowText(String)

N:CoreText

(Inherited from CGContext)
ShowText(String, Int32)

N:CoreText

(Inherited from CGContext)
ShowTextAtPoint(nfloat, nfloat, Byte[]) (Inherited from CGContext)
ShowTextAtPoint(nfloat, nfloat, Byte[], Int32) (Inherited from CGContext)
ShowTextAtPoint(nfloat, nfloat, String) (Inherited from CGContext)
ShowTextAtPoint(nfloat, nfloat, String, Int32) (Inherited from CGContext)
StrokeEllipseInRect(CGRect)

Strokes the ellipse defined by rect. Afterwards, the current path is reset.

(Inherited from CGContext)
StrokeLineSegments(CGPoint[])

Strokes the lines defined by the pairs in points. Afterwards, the current path is reset.

(Inherited from CGContext)
StrokePath()

Strokes the current path. Afterwards, the current path is reset.

(Inherited from CGContext)
StrokeRect(CGRect)

Strokes the specified rect. Afterwards, the current path is reset.

(Inherited from CGContext)
StrokeRectWithWidth(CGRect, nfloat)

Strokes the rect. The line extends half of width to either side of the rect perimeter.

(Inherited from CGContext)
Synchronize()

Marks a CGContext for update.

(Inherited from CGContext)
TranslateCTM(nfloat, nfloat)

Changes the origin of the user coordinate system.

(Inherited from CGContext)

Applies to