API  0.9.7-1
 All Classes Files Functions Variables Macros Groups Pages
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

function CGBitmapGraphicsContextCreate ( )

Returns a new graphics context.

Returns
CGContext a new graphics context which can be drawn into

Definition at line 135 of file CGContext.j.

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

Definition at line 191 of file CGContext.j.

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 206 of file CGContext.j.

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 222 of file CGContext.j.

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 578 of file CGContext.j.

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 234 of file CGContext.j.

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 246 of file CGContext.j.

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 257 of file CGContext.j.

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 277 of file CGContext.j.

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 288 of file CGContext.j.

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 300 of file CGContext.j.

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 310 of file CGContext.j.

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 321 of file CGContext.j.

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 419 of file CGContext.j.

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 537 of file CGContext.j.

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 591 of file CGContext.j.

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 547 of file CGContext.j.

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 357 of file CGContext.j.

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 369 of file CGContext.j.

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 691 of file CGContext.j.

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 431 of file CGContext.j.

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 331 of file CGContext.j.

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 343 of file CGContext.j.

function CGContextRelease ( )

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

Definition at line 82 of file CGContext.j.

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 155 of file CGContext.j.

function CGContextRetain ( aContext  )

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

Parameters
aContexta CGContext
Returns
CGContext the context

Definition at line 92 of file CGContext.j.

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 443 of file CGContext.j.

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 145 of file CGContext.j.

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 457 of file CGContext.j.

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 518 of file CGContext.j.

function CGContextSetBlendMode ( aContext  ,
aBlendMode   
)

Definition at line 186 of file CGContext.j.

function CGContextSetFillColor ( aContext  ,
aColor   
)

Sets the current fill color.

Parameters
aContextthe CGContext
aColorthe new color for the fill
Returns
void

Definition at line 662 of file CGContext.j.

function CGContextSetLineCap ( aContext  ,
aLineCap   
)

Definition at line 160 of file CGContext.j.

function CGContextSetLineDash ( aContext  ,
aPhase  ,
someDashes   
)

Definition at line 165 of file CGContext.j.

function CGContextSetLineJoin ( aContext  ,
aLineJoin   
)

Definition at line 171 of file CGContext.j.

function CGContextSetLineWidth ( aContext  ,
aLineWidth   
)

Definition at line 176 of file CGContext.j.

function CGContextSetMiterLimit ( aContext  ,
aMiterLimit   
)

Definition at line 181 of file CGContext.j.

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 486 of file CGContext.j.

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 503 of file CGContext.j.

function CGContextSetStrokeColor ( aContext  ,
aColor   
)

Sets the current stroke color.

Parameters
aContextthe CGContext
aColorthe new color for the stroke
Returns
void

Definition at line 674 of file CGContext.j.

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 605 of file CGContext.j.

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 634 of file CGContext.j.

function CGContextStrokePath ( aContext  )

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

Parameters
aContextCGContext to draw on
Returns
void

Definition at line 618 of file CGContext.j.

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 387 of file CGContext.j.

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 403 of file CGContext.j.

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 710 of file CGContext.j.

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 471 of file CGContext.j.

function CGGStateCreate ( )

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

Returns
a graphics state

Definition at line 111 of file CGContext.j.

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 123 of file CGContext.j.

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

Definition at line 78 of file CGPath.j.

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

Definition at line 142 of file CGPath.j.

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

Definition at line 172 of file CGPath.j.

function CGPathAddLines ( aPath  ,
aTransform  ,
points  ,
count   
)

Definition at line 189 of file CGPath.j.

function CGPathAddLineToPoint ( aPath  ,
aTransform  ,
,
 
)

Definition at line 203 of file CGPath.j.

function CGPathAddPath ( aPath  ,
aTransform  ,
anotherPath   
)

Definition at line 214 of file CGPath.j.

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

Definition at line 263 of file CGPath.j.

function CGPathAddRect ( aPath  ,
aTransform  ,
aRect   
)

Definition at line 278 of file CGPath.j.

function CGPathAddRects ( aPath  ,
aTransform  ,
rects  ,
count   
)

Definition at line 283 of file CGPath.j.

function CGPathCloseSubpath ( aPath  )

Definition at line 401 of file CGPath.j.

function CGPathContainsPoint ( aPath  ,
aTransform  ,
point  ,
eoFill   
)

Definition at line 611 of file CGPath.j.

function CGPathCreateCopy ( aPath  )

Returns a copy of the given path object.

Definition at line 64 of file CGPath.j.

function CGPathCreateMutable ( )

Returns a new CGPath object.

Definition at line 42 of file CGPath.j.

function CGPathCreateMutableCopy ( aPath  )

Returns a copy of the given path object.

Definition at line 51 of file CGPath.j.

function CGPathEqualToPath ( aPath  ,
anotherPath   
)

Definition at line 414 of file CGPath.j.

function CGPathGetBoundingBox ( aPath  )

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

Definition at line 512 of file CGPath.j.

function CGPathGetCurrentPoint ( aPath  )

Definition at line 499 of file CGPath.j.

function CGPathIsEmpty ( aPath  )

Definition at line 504 of file CGPath.j.

function CGPathMoveToPoint ( aPath  ,
aTransform  ,
,
 
)

Definition at line 303 of file CGPath.j.

function CGPathRelease ( aPath  )

Definition at line 69 of file CGPath.j.

function CGPathRetain ( aPath  )

Definition at line 73 of file CGPath.j.

function CGPathWithEllipseInRect ( aRect  )

Definition at line 330 of file CGPath.j.

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

Definition at line 354 of file CGPath.j.

Variable Documentation

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

Definition at line 328 of file CGPath.j.

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

Definition at line 570 of file CGContext.j.