Mac Guides | Samples

MonoMac.CoreGraphics.CGContext Class

Graphics context and primitives to draw in them.

See Also: CGContext

Syntax

public class CGContext : INativeObject, IDisposable

Related content

Requirements

Namespace: MonoMac.CoreGraphics
Assembly: XamMac (in XamMac.dll)
Assembly Versions: 0.0.0.0

The members of MonoMac.CoreGraphics.CGContext are listed below.

See Also: Object

Public Constructors

Public Properties

[read-only]
HandleIntPtr. Handle (pointer) to the unmanaged object representation.
InterpolationQualityCGInterpolationQuality.
TextMatrixCGAffineTransform.
TextPositionPointF.

Public Methods

AddArc(Single, Single, Single, Single, Single, Boolean)
Adds an arc to the current path.
AddArcToPoint(Single, Single, Single, Single, Single)
Adds an arc to the current path.
AddCurveToPoint(Single, Single, Single, Single, Single, Single)
AddEllipseInRect(RectangleF)
AddLines(PointF[])
Adds the given lines to the current path.
AddLineToPoint(Single, Single)
AddPath(CGPath)
Adds the specified path to the current path.
AddQuadCurveToPoint(Single, Single, Single, Single)
Adds a quadratic bezier curve to the current path.
AddRect(RectangleF)
Adds a rectangular path to the current path.
AddRects(RectangleF[])
Adds an array of rectangular paths to the current path.
BeginPage(Nullable<System.Drawing.RectangleF>)
Begins a new page in a page-based graphics context.
BeginPath()
Starts a new path in the graphics context.
BeginTransparencyLayer()
BeginTransparencyLayer(NSDictionary)
BeginTransparencyLayer(RectangleF)
BeginTransparencyLayer(RectangleF, NSDictionary)
ClearRect(RectangleF)
Paints the rectangle tot transparent.
Clip()
Sets the current path of the graphics context to be the clipping path.
ClipToMask(RectangleF, CGImage)
ClipToRect(RectangleF)
Modifies the clipping path to be the intersection of the current path and the supplied rectangle.
ClipToRects(RectangleF[])
Modifies the current clipping path to be the insersection of the current clipping path and the region specified by the supplied rectangles.
ClosePath()
Closes and completes the current path.
ConcatCTM(CGAffineTransform)
ContextFillRects(RectangleF[])
ConvertPointToUserSpace(PointF) : PointF
Converts a point from device space coordinates to user space coordinates.
ConvertRectToDeviceSpace(RectangleF) : RectangleF
Converts a rectangle from user space coordinates to device space coordinates.
ConvertRectToUserSpace(RectangleF) : RectangleF
Converts a rectangle from device space coordinates to user space coordinates.
ConvertSizeToDeviceSpace(SizeF) : SizeF
Converts a size from user space coordinates to device space coordinates.
ConvertSizeToUserSpace(SizeF) : SizeF
Converts a size from device space coordinates to user space coordinates.
CopyPath() : CGPath
Returns a deep copy of the current path in the current context.
Dispose()
Releases the resourced used by the CGContext object.
DrawImage(RectangleF, CGImage)
Draws an image into the graphics context bounded to the specified rectangle.
DrawLayer(CGLayer, PointF)
Draws a layer into the graphics context at the specified point.
DrawLayer(CGLayer, RectangleF)
Draws a layer into the graphics context bounded by the specified rectangle.
DrawLinearGradient(CGGradient, PointF, PointF, CGGradientDrawingOptions)
DrawPath(CGPathDrawingMode)
DrawPDFPage(CGPDFPage)
DrawRadialGradient(CGGradient, PointF, Single, PointF, Single, CGGradientDrawingOptions)
DrawTiledImage(RectangleF, CGImage)
EndPage()
EndTransparencyLayer()
EOClip()
EOFillPath()
FillEllipseInRect(RectangleF)
FillPath()
FillRect(RectangleF)
Finalize()
Finalizer for the CGContext object
Flush()
GetClipBoundingBox() : RectangleF
GetCTM() : CGAffineTransform
GetPathBoundingBox() : RectangleF
GetPathCurrentPoint() : PointF
GetUserSpaceToDeviceSpaceTransform() : CGAffineTransform
IsPathEmpty() : Boolean
MoveTo(Single, Single)
PathContainsPoint(PointF, CGPathDrawingMode) : Boolean
PointToDeviceSpace(PointF) : PointF
ReplacePathWithStrokedPath()
RestoreState()
RotateCTM(Single)
SaveState()
ScaleCTM(Single, Single)
SelectFont(String, Single, CGTextEncoding)
SetAllowsAntialiasing(Boolean)
SetAllowsFontSmoothing(Boolean)
SetAllowsFontSubpixelQuantization(Boolean)
SetAllowsSubpixelPositioning(Boolean)
SetAlpha(Single)
SetBlendMode(CGBlendMode)
SetCharacterSpacing(Single)
SetCMYKFillColor(Single, Single, Single, Single, Single)
SetCMYKStrokeColor(Single, Single, Single, Single, Single)
SetFillColor(CGColor)
SetFillColor(Single[])
Sets the fill color. This API has undefined behavior if you do not set the colorspace beforehand.
SetFillColor(Single, Single)
SetFillColor(Single, Single, Single, Single)
SetFillColor(Single, Single, Single, Single, Single)
SetFillColorSpace(CGColorSpace)
SetFillColorWithColor(CGColor)
SetFillPattern(CGPattern, Single[])
SetFlatness(Single)
SetFont(CGFont)
SetFontSize(Single)
SetGrayFillColor(Single, Single)
SetGrayStrokeColor(Single, Single)
SetLineCap(CGLineCap)
SetLineDash(Single, Single[])
SetLineDash(Single, Single[], Int32)
SetLineJoin(CGLineJoin)
SetLineWidth(Single)
SetMiterLimit(Single)
SetPatternPhase(SizeF)
SetRenderingIntent(CGColorRenderingIntent)
SetRGBFillColor(Single, Single, Single, Single)
SetRGBStrokeColor(Single, Single, Single, Single)
SetShadow(SizeF, Single)
SetShadowWithColor(SizeF, Single, CGColor)
SetShouldAntialias(Boolean)
SetShouldSmoothFonts(Boolean)
SetShouldSubpixelPositionFonts(Boolean)
SetStrokeColor(CGColor)
SetStrokeColor(Single[])
Sets the stroke color. This API has undefined behavior if you do not set the colorspace beforehand.
SetStrokeColor(Single, Single)
SetStrokeColor(Single, Single, Single, Single)
SetStrokeColor(Single, Single, Single, Single, Single)
SetStrokeColorSpace(CGColorSpace)
SetStrokeColorWithColor(CGColor)
SetStrokePattern(CGPattern, Single[])
SetTextDrawingMode(CGTextDrawingMode)
ShouldSubpixelQuantizeFonts(Boolean)
ShowGlyphs(UInt16[])
ShowGlyphs(UInt16[], Int32)
ShowGlyphsAtPoint(Single, Single, UInt16[])
ShowGlyphsAtPoint(Single, Single, UInt16[], Int32)
ShowGlyphsAtPositions(UInt16[], PointF[], Int32)
ShowGlyphsWithAdvances(UInt16[], SizeF[], Int32)
ShowText(Byte[])
ShowText(String)
ShowText(Byte[], Int32)
ShowText(String, Int32)
ShowTextAtPoint(Single, Single, Byte[])
ShowTextAtPoint(Single, Single, String)
ShowTextAtPoint(Single, Single, Byte[], Int32)
ShowTextAtPoint(Single, Single, String, Int32)
StrokeEllipseInRect(RectangleF)
StrokeLineSegments(PointF[])
StrokePath()
StrokeRect(RectangleF)
StrokeRectWithWidth(RectangleF, Single)
Synchronize()
TranslateCTM(Single, Single)

Protected Methods

Dispose(Boolean)
Releases the resourced used by the CGContext object.