Struct CoreGraphics.CGContextRef
public ref struct CoreGraphics.CGContextRef
- Inherited Members
Constructors
CGContextRef(nint)
public CGContextRef(nint self)
Parameters
selfnint
Fields
Self
public readonly nint Self
Field Value
Properties
Alpha
public NFloat Alpha { set; }
Property Value
CTM
public CoreGraphics.CGAffineTransform CTM { get; }
Property Value
LineCap
public CoreGraphics.CGLineCap LineCap { set; }
Property Value
LineJoin
public CoreGraphics.CGLineJoin LineJoin { set; }
Property Value
Transform
public CoreGraphics.CGAffineTransform Transform { get; }
Property Value
Methods
AddArc(NFloat, NFloat, NFloat, NFloat, NFloat, bool)
public void AddArc(NFloat x, NFloat y, NFloat radius, NFloat startAngle, NFloat endAngle, bool clockwise)
Parameters
AddArcToPoint(NFloat, NFloat, NFloat, NFloat, NFloat)
public void AddArcToPoint(NFloat x1, NFloat y1, NFloat x2, NFloat y2, NFloat radius)
Parameters
AddPath(CGPathRef)
public void AddPath(CoreGraphics.CGPathRef path)
Parameters
pathCoreGraphics.CGPathRef
AddRect(CGRect)
public void AddRect(CoreGraphics.CGRect rect)
Parameters
rectCoreGraphics.CGRect
BeginPath()
public void BeginPath()
CGContextAddArc(nint, NFloat, NFloat, NFloat, NFloat, NFloat, int)
public static extern void CGContextAddArc(nint cgContextRef, NFloat x, NFloat y, NFloat radius, NFloat startAngle, NFloat endAngle, int clockwise)
Parameters
CGContextAddArcToPoint(nint, NFloat, NFloat, NFloat, NFloat, NFloat)
public static extern void CGContextAddArcToPoint(nint cgContextRef, NFloat x1, NFloat y1, NFloat x2, NFloat y2, NFloat radius)
Parameters
CGContextAddCurveToPoint(nint, NFloat, NFloat, NFloat, NFloat, NFloat, NFloat)
public static extern void CGContextAddCurveToPoint(nint c, NFloat cp1x, NFloat cp1y, NFloat cp2x, NFloat cp2y, NFloat x, NFloat y)
Parameters
CGContextAddCurveToPoint(NFloat, NFloat, NFloat, NFloat, NFloat, NFloat)
public void CGContextAddCurveToPoint(NFloat cp1x, NFloat cp1y, NFloat cp2x, NFloat cp2y, NFloat x, NFloat y)
Parameters
CGContextAddLineToPoint(nint, NFloat, NFloat)
public static extern void CGContextAddLineToPoint(nint cgContextRef, NFloat x, NFloat y)
Parameters
CGContextAddPath(nint, nint)
public static extern void CGContextAddPath(nint cgContextRef, nint cgPathRef)
Parameters
CGContextAddQuadCurveToPoint(nint, NFloat, NFloat, NFloat, NFloat)
public static extern void CGContextAddQuadCurveToPoint(nint c, NFloat cpx, NFloat cpy, NFloat x, NFloat y)
Parameters
CGContextAddQuadCurveToPoint(NFloat, NFloat, NFloat, NFloat)
public void CGContextAddQuadCurveToPoint(NFloat cpx, NFloat cpy, NFloat x, NFloat y)
Parameters
CGContextAddRect(nint, CGRect)
public static extern void CGContextAddRect(nint cgContextRef, CoreGraphics.CGRect cgRect)
Parameters
cgContextRefnintcgRectCoreGraphics.CGRect
CGContextBeginPath(nint)
public static extern void CGContextBeginPath(nint cgContextRef)
Parameters
cgContextRefnint
CGContextClip(nint)
public static extern void CGContextClip(nint cgContextRef)
Parameters
cgContextRefnint
CGContextClipToRect(nint, CGRect)
public static extern void CGContextClipToRect(nint c, CoreGraphics.CGRect rect)
Parameters
cnintrectCoreGraphics.CGRect
CGContextClosePath(nint)
public static extern void CGContextClosePath(nint cgContextRef)
Parameters
cgContextRefnint
CGContextConcatCTM(nint, CGAffineTransform)
public static extern void CGContextConcatCTM(nint cgContextRef, CoreGraphics.CGAffineTransform transform)
Parameters
cgContextRefninttransformCoreGraphics.CGAffineTransform
CGContextDrawImage(nint, CGRect, nint)
public static extern void CGContextDrawImage(nint cgContextRef, CoreGraphics.CGRect rect, nint image)
Parameters
cgContextRefnintrectCoreGraphics.CGRectimagenint
CGContextDrawLinearGradient(nint, nint, CGPoint, CGPoint, uint)
public static extern void CGContextDrawLinearGradient(nint cgContextRef, nint cgGradientRef, CoreGraphics.CGPoint startPoint, CoreGraphics.CGPoint endPoint, uint options = 3)
Parameters
cgContextRefnintcgGradientRefnintstartPointCoreGraphics.CGPointendPointCoreGraphics.CGPointoptionsuint
CGContextDrawRadialGradient(nint, nint, CGPoint, NFloat, CGPoint, NFloat, uint)
public static extern void CGContextDrawRadialGradient(nint cgContextRef, nint cgGradientRef, CoreGraphics.CGPoint startCenter, NFloat startRadius, CoreGraphics.CGPoint endCenter, NFloat endRadius, uint options = 3)
Parameters
cgContextRefnintcgGradientRefnintstartCenterCoreGraphics.CGPointstartRadiusNFloatendCenterCoreGraphics.CGPointendRadiusNFloatoptionsuint
CGContextEOClip(nint)
public static extern void CGContextEOClip(nint cgContextRef)
Parameters
cgContextRefnint
CGContextEOFillPath(nint)
public static extern void CGContextEOFillPath(nint cgContextRef)
Parameters
cgContextRefnint
CGContextFillPath(nint)
public static extern void CGContextFillPath(nint cgContextRef)
Parameters
cgContextRefnint
CGContextFillRect(nint, CGRect)
public static extern void CGContextFillRect(nint cgContextRef, CoreGraphics.CGRect rect)
Parameters
cgContextRefnintrectCoreGraphics.CGRect
CGContextGetCTM(nint)
public static extern CoreGraphics.CGAffineTransform CGContextGetCTM(nint cgContextRef)
Parameters
cgContextRefnint
Returns
CGContextGetClipBoundingBox(nint)
public static extern CoreGraphics.CGRect CGContextGetClipBoundingBox(nint cgContextRef)
Parameters
cgContextRefnint
Returns
CGContextMoveToPoint(nint, NFloat, NFloat)
public static extern void CGContextMoveToPoint(nint cgContextRef, NFloat x, NFloat y)
Parameters
CGContextRelease(nint)
public static extern void CGContextRelease(nint self)
Parameters
selfnint
CGContextReplacePathWithStrokedPath(nint)
public static extern void CGContextReplacePathWithStrokedPath(nint cgContextRef)
Parameters
cgContextRefnint
CGContextRestoreGState(nint)
public static extern void CGContextRestoreGState(nint cgContextRef)
Parameters
cgContextRefnint
CGContextRotateCTM(nint, NFloat)
public static extern void CGContextRotateCTM(nint cgContextRef, NFloat angle)
Parameters
CGContextSaveGState(nint)
public static extern void CGContextSaveGState(nint cgContextRef)
Parameters
cgContextRefnint
CGContextScaleCTM(nint, NFloat, NFloat)
public static extern void CGContextScaleCTM(nint cgContextRef, NFloat sx, NFloat sy)
Parameters
CGContextSetAlpha(nint, NFloat)
public static extern void CGContextSetAlpha(nint cgContextRef, NFloat alpha)
Parameters
CGContextSetLineCap(nint, CGLineCap)
public static extern void CGContextSetLineCap(nint cgContextRef, CoreGraphics.CGLineCap cap)
Parameters
cgContextRefnintcapCoreGraphics.CGLineCap
CGContextSetLineDash(nint, NFloat, nint, nint)
public static extern void CGContextSetLineDash(nint c, NFloat phase, nint cgFloatArrPtr, nint count)
Parameters
CGContextSetLineDash(nint, NFloat, ref NFloat, nint)
public static void CGContextSetLineDash(nint c, NFloat phase, ref NFloat cgFloatArrPtr, nint count)
Parameters
CGContextSetLineJoin(nint, CGLineJoin)
public static extern void CGContextSetLineJoin(nint cgContextRef, CoreGraphics.CGLineJoin join)
Parameters
cgContextRefnintjoinCoreGraphics.CGLineJoin
CGContextSetLineWidth(nint, NFloat)
public static extern void CGContextSetLineWidth(nint cgContextRef, NFloat width)
Parameters
CGContextSetMiterLimit(nint, NFloat)
public static extern void CGContextSetMiterLimit(nint cgContextRef, NFloat limit)
Parameters
CGContextSetRGBFillColor(nint, NFloat, NFloat, NFloat, NFloat)
public static extern void CGContextSetRGBFillColor(nint cgContextRef, NFloat red, NFloat green, NFloat blue, NFloat alpha)
Parameters
CGContextSetRGBStrokeColor(nint, NFloat, NFloat, NFloat, NFloat)
public static extern void CGContextSetRGBStrokeColor(nint cgContextRef, NFloat red, NFloat green, NFloat blue, NFloat alpha)
Parameters
CGContextSetTextDrawingMode(nint, CGTextDrawingMode)
public static extern void CGContextSetTextDrawingMode(nint cgContextRef, CoreGraphics.CGTextDrawingMode mode)
Parameters
cgContextRefnintmodeCoreGraphics.CGTextDrawingMode
CGContextStrokePath(nint)
public static extern void CGContextStrokePath(nint cgContextRef)
Parameters
cgContextRefnint
CGContextStrokeRect(nint, CGRect)
public static extern void CGContextStrokeRect(nint cgContextRef, CoreGraphics.CGRect rect)
Parameters
cgContextRefnintrectCoreGraphics.CGRect
CGContextTranslateCTM(nint, NFloat, NFloat)
public static extern void CGContextTranslateCTM(nint cgContextRef, NFloat tx, NFloat ty)
Parameters
Clip()
public void Clip()
ClosePath()
public void ClosePath()
ConcatCTM(CGAffineTransform)
public void ConcatCTM(CoreGraphics.CGAffineTransform transform)
Parameters
transformCoreGraphics.CGAffineTransform
Dispose()
public void Dispose()
DrawImage(CGRect, nint)
Draws image into rect in the current CGContext
coordinate space. In a flipped view the image will appear upside-down unless the
caller flips the CTM beforehand (see DrawImageFlipped(CGRect, nint)).
public void DrawImage(CoreGraphics.CGRect rect, nint image)
Parameters
rectCoreGraphics.CGRectimagenint
DrawImageFlipped(CGRect, nint)
Draws image into rect, correcting the upside-down
rendering that occurs in a Y-down (isFlipped) view by temporarily flipping the CTM.
public void DrawImageFlipped(CoreGraphics.CGRect rect, nint image)
Parameters
rectCoreGraphics.CGRectimagenint
DrawLinearGradient(CGGradientRef, CGPoint, CGPoint)
public void DrawLinearGradient(CoreGraphics.CGGradientRef gradient, CoreGraphics.CGPoint startPoint, CoreGraphics.CGPoint endPoint)
Parameters
gradientCoreGraphics.CGGradientRefstartPointCoreGraphics.CGPointendPointCoreGraphics.CGPoint
DrawRadialGradient(CGGradientRef, CGPoint, NFloat, CGPoint, NFloat)
public void DrawRadialGradient(CoreGraphics.CGGradientRef gradient, CoreGraphics.CGPoint startCenter, NFloat startRadius, CoreGraphics.CGPoint endCenter, NFloat endRadius)
Parameters
gradientCoreGraphics.CGGradientRefstartCenterCoreGraphics.CGPointstartRadiusNFloatendCenterCoreGraphics.CGPointendRadiusNFloat
EOClip()
public void EOClip()
EOFillPath()
public void EOFillPath()
FillPath()
public void FillPath()
FillRect(CGRect)
public void FillRect(CoreGraphics.CGRect rect)
Parameters
rectCoreGraphics.CGRect
LineToPoint(NFloat, NFloat)
public void LineToPoint(NFloat x, NFloat y)
Parameters
MoveToPoint(NFloat, NFloat)
public void MoveToPoint(NFloat x, NFloat y)
Parameters
ReplacePathWithStrokedPath()
public void ReplacePathWithStrokedPath()
RestoreGState()
public void RestoreGState()
RotateCTM(NFloat)
public void RotateCTM(NFloat angle)
Parameters
angleNFloat
SaveGState()
public void SaveGState()
ScaleCTM(NFloat, NFloat)
public void ScaleCTM(NFloat sx, NFloat sy)
Parameters
SetLineWidth(NFloat)
public void SetLineWidth(NFloat width)
Parameters
widthNFloat
SetMiterLimit(NFloat)
public void SetMiterLimit(NFloat limit)
Parameters
limitNFloat
SetRGBFillColor(NFloat, NFloat, NFloat, NFloat)
public void SetRGBFillColor(NFloat red, NFloat green, NFloat blue, NFloat alpha)
Parameters
SetRGBStrokeColor(NFloat, NFloat, NFloat, NFloat)
public void SetRGBStrokeColor(NFloat red, NFloat green, NFloat blue, NFloat alpha)
Parameters
StrokePath()
public void StrokePath()
StrokeRect(CGRect)
public void StrokeRect(CoreGraphics.CGRect rect)
Parameters
rectCoreGraphics.CGRect
TranslateCTM(NFloat, NFloat)
public void TranslateCTM(NFloat tx, NFloat ty)
Parameters
UIGraphicsGetCurrentContext()
public static extern nint UIGraphicsGetCurrentContext()
Returns
Operators
implicit operator nint(CGContextRef)
public static implicit operator nint(CoreGraphics.CGContextRef path)
Parameters
pathCoreGraphics.CGContextRef