API  1.0.0
CoreGraphics

Functions

function CGBitmapGraphicsContextCreate ()
 
function CGContextAddArc (aContext, x, y, radius, startAngle, endAngle, clockwise)
 
function CGContextAddArcToPoint (aContext, x1, y1, x2, y2, radius)
 
function CGContextAddCurveToPoint (aContext, cp1x, cp1y, cp2x, cp2y, x, y)
 
function CGContextAddEllipseInRect (aContext, aRect)
 
function CGContextAddLines (aContext, points, count)
 
function CGContextAddLineToPoint (aContext, x, y)
 
function CGContextAddPath (aContext, aPath)
 
function CGContextAddQuadCurveToPoint (aContext, cpx, cpy, x, y)
 
function CGContextAddRect (aContext, aRect)
 
function CGContextAddRects (aContext, rects, count)
 
function CGContextBeginPath (aContext)
 
function CGContextClosePath (aContext)
 
function CGContextConcatCTM (aContext, aTransform)
 
function CGContextEOFillPath (aContext)
 
function CGContextFillEllipseInRect (aContext, aRect)
 
function CGContextFillPath (aContext)
 
function CGContextFillRect (aContext, aRect)
 
function CGContextFillRects (aContext, rects, count)
 
function CGContextFillRoundedRectangleInRect (aContext, aRect, aRadius, ne, se, sw, nw)
 
function CGContextGetCTM (aContext)
 
function CGContextIsPathEmpty (aContext)
 
function CGContextMoveToPoint (aContext, x, y)
 
function CGContextRelease ()
 
function CGContextRestoreGState (aContext)
 
function CGContextRetain (aContext)
 
function CGContextRotateCTM (aContext, anAngle)
 
function CGContextSaveGState (aContext)
 
function CGContextScaleCTM (aContext, sx, sy)
 
function CGContextSetAlpha (aContext, anAlpha)
 
function CGContextSetBlendMode (aContext, aBlendMode)
 
function CGContextSetFillColor (aContext, aColor)
 
function CGContextSetLineCap (aContext, aLineCap)
 
function CGContextSetLineDash (aContext, aPhase, someDashes)
 
function CGContextSetLineJoin (aContext, aLineJoin)
 
function CGContextSetLineWidth (aContext, aLineWidth)
 
function CGContextSetMiterLimit (aContext, aMiterLimit)
 
function CGContextSetShadow (aContext, aSize, aBlur)
 
function CGContextSetShadowWithColor (aContext, aSize, aBlur, aColor)
 
function CGContextSetStrokeColor (aContext, aColor)
 
function CGContextStrokeEllipseInRect (aContext, aRect)
 
function CGContextStrokeLineSegments (aContext, points, count)
 
function CGContextStrokePath (aContext)
 
function CGContextStrokeRect (aContext, aRect)
 
function CGContextStrokeRectWithWidth (aContext, aRect, aWidth)
 
function CGContextStrokeRoundedRectangleInRect (aContext, aRect, aRadius, ne, se, sw, nw)
 
function CGContextTranslateCTM (aContext, tx, ty)
 
function CGGStateCreate ()
 
function CGGStateCreateCopy (aGState)
 
function CGPathAddArc (aPath, aTransform, x, y, aRadius, aStartAngle, anEndAngle, isClockwise)
 
function CGPathAddArcToPoint (aPath, aTransform, x1, y1, x2, y2, aRadius)
 
function CGPathAddCurveToPoint (aPath, aTransform, cp1x, cp1y, cp2x, cp2y, x, y)
 
function CGPathAddLines (aPath, aTransform, points, count)
 
function CGPathAddLineToPoint (aPath, aTransform, x, y)
 
function CGPathAddPath (aPath, aTransform, anotherPath)
 
function CGPathAddQuadCurveToPoint (aPath, aTransform, cpx, cpy, x, y)
 
function CGPathAddRect (aPath, aTransform, aRect)
 
function CGPathAddRects (aPath, aTransform, rects, count)
 
function CGPathCloseSubpath (aPath)
 
function CGPathContainsPoint (aPath, aTransform, point, eoFill)
 
function CGPathCreateCopy (aPath)
 
function CGPathCreateMutable ()
 
function CGPathCreateMutableCopy (aPath)
 
function CGPathEqualToPath (aPath, anotherPath)
 
function CGPathGetBoundingBox (aPath)
 
function CGPathGetCurrentPoint (aPath)
 
function CGPathIsEmpty (aPath)
 
function CGPathMoveToPoint (aPath, aTransform, x, y)
 
function CGPathRelease (aPath)
 
function CGPathRetain (aPath)
 
function CGPathWithEllipseInRect (aRect)
 
function CGPathWithRoundedRectangleInRect (aRect, xRadius, yRadius, ne, se, sw, nw)
 

Variables

var KAPPA = 4.0 * ((SQRT2 - 1.0) / 3.0)
 
var KAPPA = 4.0 * ((SQRT2 - 1.0) / 3.0)
 

Detailed Description

Function Documentation

◆ CGBitmapGraphicsContextCreate()

function CGBitmapGraphicsContextCreate ( )

Returns a new graphics context.

Returns
CGContext a new graphics context which can be drawn into

Definition at line 136 of file CGContext.j.

◆ CGContextAddArc()

function CGContextAddArc ( aContext  ,
,
,
radius  ,
startAngle  ,
endAngle  ,
clockwise   
)

Definition at line 192 of file CGContext.j.

◆ CGContextAddArcToPoint()

function CGContextAddArcToPoint ( aContext  ,
x1  ,
y1  ,
x2  ,
y2  ,
radius   
)

Adds an arc to the current context that ends in the specified point.

Parameters
aContextthe CGContext to edit
x1the x coordinate of the beginning of the arc
y1the y coordinate of the beginning of the arc
x2the x coordinate of the end of the arc
y2the y coordinate of the end of the arc
radiusthe radius of the arc to be drawn
Returns
void

Definition at line 207 of file CGContext.j.

◆ CGContextAddCurveToPoint()

function CGContextAddCurveToPoint ( aContext  ,
cp1x  ,
cp1y  ,
cp2x  ,
cp2y  ,
,
 
)

Adds a cubic curve to the current context

Parameters
aContextthe CGContext to edit
cp1xthe x coordinate of the first control point
cp1ythe y coordinate of the first control point
cp2xthe x coordinate of the second control point
cp2ythe y coordinate of the second control point
xthe x coordinate of the end of the curve
ythe y coordinate of the end of the curve
Returns
void

Definition at line 223 of file CGContext.j.

◆ CGContextAddEllipseInRect()

function CGContextAddEllipseInRect ( aContext  ,
aRect   
)

Draws the outline of an ellipse bounded by a rectangle.

Parameters
aContextCGContext to draw on
aRectthe rectangle bounding the ellipse
Returns
void

Definition at line 579 of file CGContext.j.

◆ CGContextAddLines()

function CGContextAddLines ( aContext  ,
points  ,
count   
)

Adds a line to each element in the points array

Parameters
aContextthe CGContext to move
pointsan array of points that are to be consecutively executed as if they were individual addToPoint calls
countan upper bound on the number of points to use
Returns
void

Definition at line 235 of file CGContext.j.

◆ CGContextAddLineToPoint()

function CGContextAddLineToPoint ( aContext  ,
,
 
)

Adds a line from the current point to the x/y

Parameters
aContextthe CGContext to move
xthe x coordinate of the end point of the line
ythe y coordinate of the end point of the line
Returns
void

Definition at line 247 of file CGContext.j.

◆ CGContextAddPath()

function CGContextAddPath ( aContext  ,
aPath   
)

Adds aPath to the current path in aContext

Parameters
aContextthe CGContext to add to
aPaththe path to be added
Returns
void

Definition at line 258 of file CGContext.j.

◆ CGContextAddQuadCurveToPoint()

function CGContextAddQuadCurveToPoint ( aContext  ,
cpx  ,
cpy  ,
,
 
)

Adds a quadratic curve from the current point to the point specified by x/y, using the control point specified by cpx/cpy

Parameters
aContextthe CGContext to add the curve to
cpxthe x coordinate for the curve's control point
cpythe y coordinate for the curve's control point
xthe x coordinate for the end point of the curve
ythe y coordinate for the end point of the curve
Returns
void

Definition at line 278 of file CGContext.j.

◆ CGContextAddRect()

function CGContextAddRect ( aContext  ,
aRect   
)

Adds aRect to the current path in the given context

Parameters
aContextthe CGContext to add to
aRectthe dimensions of the rectangle to add
Returns
void

Definition at line 289 of file CGContext.j.

◆ CGContextAddRects()

function CGContextAddRects ( aContext  ,
rects  ,
count   
)

Adds up to count elements from rects to the current path in aContext

Parameters
aContextthe CGContext to add to
rectsan array of CGRects to be added to the context's path
theupper bound of elements to be added
Returns
void

Definition at line 301 of file CGContext.j.

◆ CGContextBeginPath()

function CGContextBeginPath ( aContext  )

Begins a new subpath in the given context

Parameters
aContextthe CGContext to create a new path in
Returns
void

Definition at line 311 of file CGContext.j.

◆ CGContextClosePath()

function CGContextClosePath ( aContext  )

Closes the currently open subpath, if any, in aContext

Parameters
aContextthe CGContext to close a path in
Returns
void

Definition at line 322 of file CGContext.j.

◆ CGContextConcatCTM()

function CGContextConcatCTM ( aContext  ,
aTransform   
)

Concatenates the given transformation matrix onto the current transformation matrix in aContext

Parameters
aContextthe CGContext to transform
aTransformthe CGAffineTransform to apply to the given context
Returns
void

Definition at line 420 of file CGContext.j.

◆ CGContextEOFillPath()

function CGContextEOFillPath ( aContext  )

Fills in the area of the current path, using the even-odd fill rule.

Parameters
aContextthe CGContext of the path
Returns
void

Definition at line 538 of file CGContext.j.

◆ CGContextFillEllipseInRect()

function CGContextFillEllipseInRect ( aContext  ,
aRect   
)

Fills an ellipse bounded by a rectangle.

Parameters
aContextCGContext to draw on
aRectthe rectangle bounding the ellipse
Returns
void

Definition at line 592 of file CGContext.j.

◆ CGContextFillPath()

function CGContextFillPath ( aContext  )

Fills in the area of the current path, using the non-zero winding number rule.

Parameters
aContextthe CGContext of the path
Returns
void

Definition at line 548 of file CGContext.j.

◆ CGContextFillRect()

function CGContextFillRect ( aContext  ,
aRect   
)

Fills a rectangle in the given context with aRect dimensions, using the context's current fill color

Parameters
aContextthe CGContext to draw into
aRectthe dimensions of the rectangle to fill
Returns
void

Definition at line 358 of file CGContext.j.

◆ CGContextFillRects()

function CGContextFillRects ( aContext  ,
rects  ,
count   
)

Fills a rectangle in the given context for each CGRect in the given array, up to a total of count rects

Parameters
aContextthe CGContext to draw into
rectsan array of rects to fill
countthe maximum number of rects from the given array to fill
Returns
void

Definition at line 370 of file CGContext.j.

◆ CGContextFillRoundedRectangleInRect()

function CGContextFillRoundedRectangleInRect ( aContext  ,
aRect  ,
aRadius  ,
ne  ,
se  ,
sw  ,
nw   
)

Fills a rounded rectangle.

Parameters
aContextthe CGContext to draw into
aRectthe base rectangle
aRadiusthe distance from the rectangle corner to the rounded corner
neset it to YES for a rounded northeast corner
seset it to YES for a rounded southeast corner
swset it to YES for a rounded southwest corner
nwset it to YES for a rounded northwest corner
Returns
void

Definition at line 692 of file CGContext.j.

◆ CGContextGetCTM()

function CGContextGetCTM ( aContext  )

Returns the current transformation matrix for the given context

Parameters
aContextthe CGContext for which we are asking for the transform
Returns
CGAffineTransform the current transformation matrix of the given context

Definition at line 432 of file CGContext.j.

◆ CGContextIsPathEmpty()

function CGContextIsPathEmpty ( aContext  )

Return YES if the current path in the given context is empty.

Parameters
aContextthe CGContext to examine
Returns
BOOL

Definition at line 332 of file CGContext.j.

◆ CGContextMoveToPoint()

function CGContextMoveToPoint ( aContext  ,
,
 
)

Moves the current location of aContext to the given x and y coordinates

Parameters
aContextthe CGContext to move
xthe x location to move the context to
ythe y location to move the context to
Returns
void

Definition at line 344 of file CGContext.j.

◆ CGContextRelease()

function CGContextRelease ( )

This function is just here for source compatibility. It does nothing. CGContext

Definition at line 83 of file CGContext.j.

◆ CGContextRestoreGState()

function CGContextRestoreGState ( aContext  )

Pops the most recent graphics state of the top of the graphics stack and restores it.

Parameters
aContextthe CGContext to edit
Returns
void

Definition at line 156 of file CGContext.j.

◆ CGContextRetain()

function CGContextRetain ( aContext  )

This function is just here for source compatibility. It does nothing.

Parameters
aContexta CGContext
Returns
CGContext the context

Definition at line 93 of file CGContext.j.

◆ CGContextRotateCTM()

function CGContextRotateCTM ( aContext  ,
anAngle   
)

Rotates the current context by anAngle radians

Parameters
aContextthe CGContext to rotate
anAnglethe amount to rotate, in radians
Returns
void

Definition at line 444 of file CGContext.j.

◆ CGContextSaveGState()

function CGContextSaveGState ( aContext  )

Pushes the current graphics state of aContext onto the top of a stack.

Parameters
aContextthe CGContext to edit
Returns
void

Definition at line 146 of file CGContext.j.

◆ CGContextScaleCTM()

function CGContextScaleCTM ( aContext  ,
sx  ,
sy   
)

Scales the current context by sx/sy

Parameters
aContextthe CGContext to scale
sxthe amount to scale in the x direction
sythe amount to scale in the y direction
Returns
void

Definition at line 458 of file CGContext.j.

◆ CGContextSetAlpha()

function CGContextSetAlpha ( aContext  ,
anAlpha   
)

Sets the current alpha value for core graphics drawing operations in the given context .

Parameters
aContextthe CGContext who's alpha value should be updated
anAlphathe new alpha value. 1.0 is completely opaque, 0.0 is completely transparent.
Returns
void

Definition at line 519 of file CGContext.j.

◆ CGContextSetBlendMode()

function CGContextSetBlendMode ( aContext  ,
aBlendMode   
)

Definition at line 187 of file CGContext.j.

◆ CGContextSetFillColor()

function CGContextSetFillColor ( aContext  ,
aColor   
)

Sets the current fill color.

Parameters
aContextthe CGContext
aColorthe new color for the fill
Returns
void

Definition at line 663 of file CGContext.j.

◆ CGContextSetLineCap()

function CGContextSetLineCap ( aContext  ,
aLineCap   
)

Definition at line 161 of file CGContext.j.

◆ CGContextSetLineDash()

function CGContextSetLineDash ( aContext  ,
aPhase  ,
someDashes   
)

Definition at line 166 of file CGContext.j.

◆ CGContextSetLineJoin()

function CGContextSetLineJoin ( aContext  ,
aLineJoin   
)

Definition at line 172 of file CGContext.j.

◆ CGContextSetLineWidth()

function CGContextSetLineWidth ( aContext  ,
aLineWidth   
)

Definition at line 177 of file CGContext.j.

◆ CGContextSetMiterLimit()

function CGContextSetMiterLimit ( aContext  ,
aMiterLimit   
)

Definition at line 182 of file CGContext.j.

◆ CGContextSetShadow()

function CGContextSetShadow ( aContext  ,
aSize  ,
aBlur   
)

Sets the current offset, and blur for shadows in core graphics drawing operations

Parameters
aContextthe CGContext of the shadow
aSizea CGSize indicating the offset of the shadow
aBlura float indicating the blur radius
Returns
void

Definition at line 487 of file CGContext.j.

◆ CGContextSetShadowWithColor()

function CGContextSetShadowWithColor ( aContext  ,
aSize  ,
aBlur  ,
aColor   
)

Sets the current offset, blur, and color for shadows in core graphics drawing operations

Parameters
aContextthe CGContext of the shadow
aSizea CGSize indicating the offset of the shadow
aBlura float indicating the blur radius
aColora CPColor object indicating the color of the shadow
Returns
void

Definition at line 504 of file CGContext.j.

◆ CGContextSetStrokeColor()

function CGContextSetStrokeColor ( aContext  ,
aColor   
)

Sets the current stroke color.

Parameters
aContextthe CGContext
aColorthe new color for the stroke
Returns
void

Definition at line 675 of file CGContext.j.

◆ CGContextStrokeEllipseInRect()

function CGContextStrokeEllipseInRect ( aContext  ,
aRect   
)

Strokes an ellipse bounded by the specified rectangle.

Parameters
aContextCGContext to draw on
aRectthe rectangle bounding the ellipse
Returns
void

Definition at line 606 of file CGContext.j.

◆ CGContextStrokeLineSegments()

function CGContextStrokeLineSegments ( aContext  ,
points  ,
count   
)

Strokes multiple line segments.

Parameters
aContextCGContext to draw on
pointsan array with an even number of points. The first point is the beginning of the first line segment, the second is the end of the first line segment. The third point is the beginning of second line segment, etc.
countthe number of points in the array
Returns
void

Definition at line 635 of file CGContext.j.

◆ CGContextStrokePath()

function CGContextStrokePath ( aContext  )

Paints a line in the current path of the current context.

Parameters
aContextCGContext to draw on
Returns
void

Definition at line 619 of file CGContext.j.

◆ CGContextStrokeRect()

function CGContextStrokeRect ( aContext  ,
aRect   
)

Strokes a rectangle with the given location into the given context, using the context's current width and color

Parameters
aContextthe CGContext to draw into
aRecta CGRect indicating the dimensions of the rectangle to be drawn
Returns
void

Definition at line 388 of file CGContext.j.

◆ CGContextStrokeRectWithWidth()

function CGContextStrokeRectWithWidth ( aContext  ,
aRect  ,
aWidth   
)

Strokes a rectangle with the given dimensions and the given stroke width

Parameters
aContextthe CGContext to draw into
aRectthe CGRect indicating the bounds of the rect to be drawn
aWidththe width with which to stroke the rect
Returns
void

Definition at line 404 of file CGContext.j.

◆ CGContextStrokeRoundedRectangleInRect()

function CGContextStrokeRoundedRectangleInRect ( aContext  ,
aRect  ,
aRadius  ,
ne  ,
se  ,
sw  ,
nw   
)

Strokes a rounded rectangle.

Parameters
aContextthe CGContext to draw into
aRectthe base rectangle
aRadiusthe distance from the rectangle corner to the rounded corner
neset it to YES for a rounded northeast corner
seset it to YES for a rounded southeast corner
swset it to YES for a rounded southwest corner
nwset it to YES for a rounded northwest corner
Returns
void

Definition at line 711 of file CGContext.j.

◆ CGContextTranslateCTM()

function CGContextTranslateCTM ( aContext  ,
tx  ,
ty   
)

Translates the given context by tx in the x direction and ty in the y direction

Parameters
aContextthe CGContext to translate
txthe amount to move in the x direction
tythe amount to move in the y direction
Returns
void

Definition at line 472 of file CGContext.j.

◆ CGGStateCreate()

function CGGStateCreate ( )

Creates a new graphics state, which describes all the current values for drawing.

Returns
a graphics state

Definition at line 112 of file CGContext.j.

◆ CGGStateCreateCopy()

function CGGStateCreateCopy ( aGState  )

Creates a copy of the given graphics state.

Parameters
aGStatethe graphics state to copy
Returns
a copy of the given graphics state

Definition at line 124 of file CGContext.j.

◆ CGPathAddArc()

function CGPathAddArc ( aPath  ,
aTransform  ,
,
,
aRadius  ,
aStartAngle  ,
anEndAngle  ,
isClockwise   
)

Definition at line 79 of file CGPath.j.

◆ CGPathAddArcToPoint()

function CGPathAddArcToPoint ( aPath  ,
aTransform  ,
x1  ,
y1  ,
x2  ,
y2  ,
aRadius   
)

Definition at line 140 of file CGPath.j.

◆ CGPathAddCurveToPoint()

function CGPathAddCurveToPoint ( aPath  ,
aTransform  ,
cp1x  ,
cp1y  ,
cp2x  ,
cp2y  ,
,
 
)

Definition at line 170 of file CGPath.j.

◆ CGPathAddLines()

function CGPathAddLines ( aPath  ,
aTransform  ,
points  ,
count   
)

Definition at line 187 of file CGPath.j.

◆ CGPathAddLineToPoint()

function CGPathAddLineToPoint ( aPath  ,
aTransform  ,
,
 
)

Definition at line 201 of file CGPath.j.

◆ CGPathAddPath()

function CGPathAddPath ( aPath  ,
aTransform  ,
anotherPath   
)

Definition at line 212 of file CGPath.j.

◆ CGPathAddQuadCurveToPoint()

function CGPathAddQuadCurveToPoint ( aPath  ,
aTransform  ,
cpx  ,
cpy  ,
,
 
)

Definition at line 261 of file CGPath.j.

◆ CGPathAddRect()

function CGPathAddRect ( aPath  ,
aTransform  ,
aRect   
)

Definition at line 276 of file CGPath.j.

◆ CGPathAddRects()

function CGPathAddRects ( aPath  ,
aTransform  ,
rects  ,
count   
)

Definition at line 281 of file CGPath.j.

◆ CGPathCloseSubpath()

function CGPathCloseSubpath ( aPath  )

Definition at line 399 of file CGPath.j.

◆ CGPathContainsPoint()

function CGPathContainsPoint ( aPath  ,
aTransform  ,
point  ,
eoFill   
)

Definition at line 609 of file CGPath.j.

◆ CGPathCreateCopy()

function CGPathCreateCopy ( aPath  )

Returns a copy of the given path object.

Definition at line 65 of file CGPath.j.

◆ CGPathCreateMutable()

function CGPathCreateMutable ( )

Returns a new CGPath object.

Definition at line 43 of file CGPath.j.

◆ CGPathCreateMutableCopy()

function CGPathCreateMutableCopy ( aPath  )

Returns a copy of the given path object.

Definition at line 52 of file CGPath.j.

◆ CGPathEqualToPath()

function CGPathEqualToPath ( aPath  ,
anotherPath   
)

Definition at line 412 of file CGPath.j.

◆ CGPathGetBoundingBox()

function CGPathGetBoundingBox ( aPath  )

Calculate the smallest rectangle to contain both the path of the receiver and all control points.

Definition at line 510 of file CGPath.j.

◆ CGPathGetCurrentPoint()

function CGPathGetCurrentPoint ( aPath  )

Definition at line 497 of file CGPath.j.

◆ CGPathIsEmpty()

function CGPathIsEmpty ( aPath  )

Definition at line 502 of file CGPath.j.

◆ CGPathMoveToPoint()

function CGPathMoveToPoint ( aPath  ,
aTransform  ,
,
 
)

Definition at line 301 of file CGPath.j.

◆ CGPathRelease()

function CGPathRelease ( aPath  )

Definition at line 70 of file CGPath.j.

◆ CGPathRetain()

function CGPathRetain ( aPath  )

Definition at line 74 of file CGPath.j.

◆ CGPathWithEllipseInRect()

function CGPathWithEllipseInRect ( aRect  )

Definition at line 328 of file CGPath.j.

◆ CGPathWithRoundedRectangleInRect()

function CGPathWithRoundedRectangleInRect ( aRect  ,
xRadius  ,
yRadius  ,
ne  ,
se  ,
sw  ,
nw   
)

Definition at line 352 of file CGPath.j.

Variable Documentation

◆ KAPPA [1/2]

var KAPPA = 4.0 * ((SQRT2 - 1.0) / 3.0)

Definition at line 326 of file CGPath.j.

◆ KAPPA [2/2]

var KAPPA = 4.0 * ((SQRT2 - 1.0) / 3.0)

Definition at line 571 of file CGContext.j.