![]() |
API
0.9.6
|
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 | 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 | 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) |
function CGBitmapGraphicsContextCreate | ( | ) |
Returns a new graphics context.
Definition at line 135 of file CGContext.j.
function CGContextAddArc | ( | aContext | , |
x | , | ||
y | , | ||
radius | , | ||
startAngle | , | ||
endAngle | , | ||
clockwise | |||
) |
Definition at line 185 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.
aContext | the CGContext to edit |
x1 | the x coordinate of the beginning of the arc |
y1 | the y coordinate of the beginning of the arc |
x2 | the x coordinate of the end of the arc |
y2 | the y coordinate of the end of the arc |
radius | the radius of the arc to be drawn |
Definition at line 200 of file CGContext.j.
function CGContextAddCurveToPoint | ( | aContext | , |
cp1x | , | ||
cp1y | , | ||
cp2x | , | ||
cp2y | , | ||
x | , | ||
y | |||
) |
Adds a cubic curve to the current context
aContext | the CGContext to edit |
cp1x | the x coordinate of the first control point |
cp1y | the y coordinate of the first control point |
cp2x | the x coordinate of the second control point |
cp2y | the y coordinate of the second control point |
x | the x coordinate of the end of the curve |
y | the y coordinate of the end of the curve |
Definition at line 216 of file CGContext.j.
function CGContextAddEllipseInRect | ( | aContext | , |
aRect | |||
) |
Draws the outline of an ellipse bounded by a rectangle.
aContext | CGContext to draw on |
aRect | the rectangle bounding the ellipse |
Definition at line 555 of file CGContext.j.
function CGContextAddLines | ( | aContext | , |
points | , | ||
count | |||
) |
Adds a line to each element in the points array
aContext | the CGContext to move |
points | an array of points that are to be consecutively executed as if they were individual addToPoint calls |
count | an upper bound on the number of points to use |
Definition at line 228 of file CGContext.j.
function CGContextAddLineToPoint | ( | aContext | , |
x | , | ||
y | |||
) |
Adds a line from the current point to the x/y
aContext | the CGContext to move |
x | the x coordinate of the end point of the line |
y | the y coordinate of the end point of the line |
Definition at line 240 of file CGContext.j.
function CGContextAddPath | ( | aContext | , |
aPath | |||
) |
Adds aPath to the current path in aContext
aContext | the CGContext to add to |
aPath | the path to be added |
Definition at line 251 of file CGContext.j.
function CGContextAddQuadCurveToPoint | ( | aContext | , |
cpx | , | ||
cpy | , | ||
x | , | ||
y | |||
) |
Adds a quadratic curve from the current point to the point specified by x/y, using the control point specified by cpx/cpy
aContext | the CGContext to add the curve to |
cpx | the x coordinate for the curve's control point |
cpy | the y coordinate for the curve's control point |
x | the x coordinate for the end point of the curve |
y | the y coordinate for the end point of the curve |
Definition at line 271 of file CGContext.j.
function CGContextAddRect | ( | aContext | , |
aRect | |||
) |
Adds aRect to the current path in the given context
aContext | the CGContext to add to |
aRect | the dimensions of the rectangle to add |
Definition at line 282 of file CGContext.j.
function CGContextAddRects | ( | aContext | , |
rects | , | ||
count | |||
) |
Adds up to count elements from rects to the current path in aContext
aContext | the CGContext to add to |
rects | an array of CGRects to be added to the context's path |
the | upper bound of elements to be added |
Definition at line 294 of file CGContext.j.
function CGContextBeginPath | ( | aContext | ) |
Begins a new subpath in the given context
aContext | the CGContext to create a new path in |
Definition at line 304 of file CGContext.j.
function CGContextClosePath | ( | aContext | ) |
Closes the currently open subpath, if any, in aContext
aContext | the CGContext to close a path in |
Definition at line 315 of file CGContext.j.
function CGContextConcatCTM | ( | aContext | , |
aTransform | |||
) |
Concatenates the given transformation matrix onto the current transformation matrix in aContext
aContext | the CGContext to transform |
aTransform | the CGAffineTransform to apply to the given context |
Definition at line 413 of file CGContext.j.
function CGContextEOFillPath | ( | aContext | ) |
Fills in the area of the current path, using the even-odd fill rule.
aContext | the CGContext of the path |
Definition at line 531 of file CGContext.j.
function CGContextFillEllipseInRect | ( | aContext | , |
aRect | |||
) |
Fills an ellipse bounded by a rectangle.
aContext | CGContext to draw on |
aRect | the rectangle bounding the ellipse |
Definition at line 568 of file CGContext.j.
function CGContextFillPath | ( | aContext | ) |
Fills in the area of the current path, using the non-zero winding number rule.
aContext | the CGContext of the path |
Definition at line 541 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
aContext | the CGContext to draw into |
aRect | the dimensions of the rectangle to fill |
Definition at line 351 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
aContext | the CGContext to draw into |
rects | an array of rects to fill |
count | the maximum number of rects from the given array to fill |
Definition at line 363 of file CGContext.j.
function CGContextFillRoundedRectangleInRect | ( | aContext | , |
aRect | , | ||
aRadius | , | ||
ne | , | ||
se | , | ||
sw | , | ||
nw | |||
) |
Fills a rounded rectangle.
aContext | the CGContext to draw into |
aRect | the base rectangle |
aRadius | the distance from the rectangle corner to the rounded corner |
ne | set it to YES for a rounded northeast corner |
se | set it to YES for a rounded southeast corner |
sw | set it to YES for a rounded southwest corner |
nw | set it to YES for a rounded northwest corner |
Definition at line 668 of file CGContext.j.
function CGContextGetCTM | ( | aContext | ) |
Returns the current transformation matrix for the given context
aContext | the CGContext for which we are asking for the transform |
Definition at line 425 of file CGContext.j.
function CGContextIsPathEmpty | ( | aContext | ) |
Return YES if the current path in the given context is empty.
aContext | the CGContext to examine |
Definition at line 325 of file CGContext.j.
function CGContextMoveToPoint | ( | aContext | , |
x | , | ||
y | |||
) |
Moves the current location of aContext to the given x and y coordinates
aContext | the CGContext to move |
x | the x location to move the context to |
y | the y location to move the context to |
Definition at line 337 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.
aContext | the CGContext to edit |
Definition at line 155 of file CGContext.j.
function CGContextRetain | ( | aContext | ) |
This function is just here for source compatibility. It does nothing.
aContext | a CGContext |
Definition at line 92 of file CGContext.j.
function CGContextRotateCTM | ( | aContext | , |
anAngle | |||
) |
Rotates the current context by anAngle radians
aContext | the CGContext to rotate |
anAngle | the amount to rotate, in radians |
Definition at line 437 of file CGContext.j.
function CGContextSaveGState | ( | aContext | ) |
Pushes the current graphics state of aContext onto the top of a stack.
aContext | the CGContext to edit |
Definition at line 145 of file CGContext.j.
function CGContextScaleCTM | ( | aContext | , |
sx | , | ||
sy | |||
) |
Scales the current context by sx/sy
aContext | the CGContext to scale |
sx | the amount to scale in the x direction |
sy | the amount to scale in the y direction |
Definition at line 451 of file CGContext.j.
function CGContextSetAlpha | ( | aContext | , |
anAlpha | |||
) |
Sets the current alpha value for core graphics drawing operations in the given context .
aContext | the CGContext who's alpha value should be updated |
anAlpha | the new alpha value. 1.0 is completely opaque, 0.0 is completely transparent. |
Definition at line 512 of file CGContext.j.
function CGContextSetBlendMode | ( | aContext | , |
aBlendMode | |||
) |
Definition at line 180 of file CGContext.j.
function CGContextSetFillColor | ( | aContext | , |
aColor | |||
) |
Sets the current fill color.
aContext | the CGContext |
aColor | the new color for the fill |
Definition at line 639 of file CGContext.j.
function CGContextSetLineCap | ( | aContext | , |
aLineCap | |||
) |
Definition at line 160 of file CGContext.j.
function CGContextSetLineJoin | ( | aContext | , |
aLineJoin | |||
) |
Definition at line 165 of file CGContext.j.
function CGContextSetLineWidth | ( | aContext | , |
aLineWidth | |||
) |
Definition at line 170 of file CGContext.j.
function CGContextSetMiterLimit | ( | aContext | , |
aMiterLimit | |||
) |
Definition at line 175 of file CGContext.j.
function CGContextSetShadow | ( | aContext | , |
aSize | , | ||
aBlur | |||
) |
Sets the current offset, and blur for shadows in core graphics drawing operations
aContext | the CGContext of the shadow |
aSize | a CGSize indicating the offset of the shadow |
aBlur | a float indicating the blur radius |
Definition at line 480 of file CGContext.j.
function CGContextSetShadowWithColor | ( | aContext | , |
aSize | , | ||
aBlur | , | ||
aColor | |||
) |
Sets the current offset, blur, and color for shadows in core graphics drawing operations
aContext | the CGContext of the shadow |
aSize | a CGSize indicating the offset of the shadow |
aBlur | a float indicating the blur radius |
aColor | a CPColor object indicating the color of the shadow |
Definition at line 497 of file CGContext.j.
function CGContextSetStrokeColor | ( | aContext | , |
aColor | |||
) |
Sets the current stroke color.
aContext | the CGContext |
aColor | the new color for the stroke |
Definition at line 651 of file CGContext.j.
function CGContextStrokeEllipseInRect | ( | aContext | , |
aRect | |||
) |
Strokes an ellipse bounded by the specified rectangle.
aContext | CGContext to draw on |
aRect | the rectangle bounding the ellipse |
Definition at line 582 of file CGContext.j.
function CGContextStrokeLineSegments | ( | aContext | , |
points | , | ||
count | |||
) |
Strokes multiple line segments.
aContext | CGContext to draw on |
points | an 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. |
count | the number of points in the array |
Definition at line 611 of file CGContext.j.
function CGContextStrokePath | ( | aContext | ) |
Paints a line in the current path of the current context.
aContext | CGContext to draw on |
Definition at line 595 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
aContext | the CGContext to draw into |
aRect | a CGRect indicating the dimensions of the rectangle to be drawn |
Definition at line 381 of file CGContext.j.
function CGContextStrokeRectWithWidth | ( | aContext | , |
aRect | , | ||
aWidth | |||
) |
Strokes a rectangle with the given dimensions and the given stroke width
aContext | the CGContext to draw into |
aRect | the CGRect indicating the bounds of the rect to be drawn |
aWidth | the width with which to stroke the rect |
Definition at line 397 of file CGContext.j.
function CGContextStrokeRoundedRectangleInRect | ( | aContext | , |
aRect | , | ||
aRadius | , | ||
ne | , | ||
se | , | ||
sw | , | ||
nw | |||
) |
Strokes a rounded rectangle.
aContext | the CGContext to draw into |
aRect | the base rectangle |
aRadius | the distance from the rectangle corner to the rounded corner |
ne | set it to YES for a rounded northeast corner |
se | set it to YES for a rounded southeast corner |
sw | set it to YES for a rounded southwest corner |
nw | set it to YES for a rounded northwest corner |
Definition at line 687 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
aContext | the CGContext to translate |
tx | the amount to move in the x direction |
ty | the amount to move in the y direction |
Definition at line 465 of file CGContext.j.
function CGGStateCreate | ( | ) |
Creates a new graphics state, which describes all the current values for drawing.
Definition at line 111 of file CGContext.j.
function CGGStateCreateCopy | ( | aGState | ) |
Creates a copy of the given graphics state.
aGState | the graphics state to copy |
Definition at line 123 of file CGContext.j.
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 CGPathAddRects | ( | aPath | , |
aTransform | , | ||
rects | , | ||
count | |||
) |
function CGPathCreateCopy | ( | aPath | ) |
function CGPathCreateMutable | ( | ) |
function CGPathCreateMutableCopy | ( | aPath | ) |
function CGPathGetBoundingBox | ( | aPath | ) |
function CGPathWithRoundedRectangleInRect | ( | aRect | , |
xRadius | , | ||
yRadius | , | ||
ne | , | ||
se | , | ||
sw | , | ||
nw | |||
) |
var KAPPA = 4.0 * ((SQRT2 - 1.0) / 3.0) |
Definition at line 547 of file CGContext.j.