AppKit/CoreGraphics/CGContextCanvas.j File Reference

Go to the source code of this file.

Defines

#define scale_rotate(a, b, c, d)
#define rotate_scale(a, b, c, d)

Functions

function CGContextSaveGState (aContext)
function CGContextRestoreGState (aContext)
function CGContextSetLineCap (aContext, aLineCap)
function CGContextSetLineJoin (aContext, aLineJoin)
function CGContextSetLineWidth (aContext, aLineWidth)
function CGContextSetMiterLimit (aContext, aMiterLimit)
function CGContextSetBlendMode (aContext, aBlendMode)
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 CGContextAddLineToPoint (aContext, x, y)
function CGContextAddPath (aContext, aPath)
function CGContextAddRect (aContext, aRect)
function CGContextAddRects (aContext, rects, count)
function CGContextBeginPath (aContext)
function CGContextClosePath (aContext)
function CGContextMoveToPoint (aContext, x, y)
function CGContextClearRect (aContext, aRect)
function CGContextDrawPath (aContext, aMode)
function CGContextFillRect (aContext, aRect)
function CGContextFillRects (aContext, rects, count)
function CGContextStrokeRect (aContext, aRect)
function CGContextClip (aContext)
function CGContextClipToRect (aContext, aRect)
function CGContextClipToRects (aContext, rects, count)
function CGContextSetAlpha (aContext, anAlpha)
function CGContextSetFillColor (aContext, aColor)
function CGContextSetStrokeColor (aContext, aColor)
function CGContextSetShadow (aContext, aSize, aBlur)
function CGContextSetShadowWithColor (aContext, aSize, aBlur, aColor)
function CGContextRotateCTM (aContext, anAngle)
function CGContextScaleCTM (aContext, sx, sy)
function CGContextTranslateCTM (aContext, tx, ty)
function eigen (anAffineTransform)
 if (CPFeatureIsCompatible(CPJavaScriptCanvasTransformFeature))

Variables

var CANVAS_LINECAP_TABLE = [ "butt", "round", "square" ]
var CANVAS_LINEJOIN_TABLE = [ "miter", "round", "bevel" ]
var CANVAS_COMPOSITE_TABLE


Define Documentation

#define rotate_scale ( a,
b,
c,
 ) 

Value:

var sign = (a * d < 0.0 || b * c > 0.0) ? -1.0 : 1.0;\
            a1 = (Math.atan2(sign * b, sign * a) + Math.atan2(-c, d)) / 2.0,\
            cos = COS(a1),\
            sin = SIN(a1);\
               \
        if (cos == 0)\
        {\
            sx = b / sin;\
            sy = -c / sin;\
        }\
        else if (sin == 0)\
        {\
            sx = a / cos;\
            sy = d / cos;\
        }\
        else\
        {\
            abs_cos = ABS(cos);\
            abs_sin = ABS(sin);\
            \
            sx = (abs_cos * a / cos + abs_sin * b / sin) / (abs_cos + abs_sin);\
            sy = (abs_cos * d / cos + abs_sin * -c / sin) / (abs_cos + abs_sin);\
        }\

Definition at line 306 of file CGContextCanvas.j.

#define scale_rotate ( a,
b,
c,
 ) 

Value:

var sign = (a * d < 0.0 || b * c > 0.0) ? -1.0 : 1.0, \
            a2 = (ATAN2(b, d) + ATAN2(-sign * c, sign * a)) / 2.0, \
            cos = COS(a2),\
            sin = SIN(a2);\
        \
        if (cos == 0)\
        {\
            sx = -c / sin;\
            sy = b / sin;\
        }\
        else if (sin == 0)\
        {\
            sx = a / cos;\
            sy = d / cos;\
        }\
        else\
        {\
            abs_cos = ABS(cos);\
            abs_sin = ABS(sin);\
            \
            sx = (abs_cos * a / cos + abs_sin * -c / sin) / (abs_cos + abs_sin);\
            sy = (abs_cos * d / cos + abs_sin * b / sin) / (abs_cos + abs_sin);\
        }\

Definition at line 281 of file CGContextCanvas.j.


Function Documentation

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

Definition at line 81 of file CGContextCanvas.j.

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

Definition at line 88 of file CGContextCanvas.j.

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

Definition at line 93 of file CGContextCanvas.j.

function CGContextAddLineToPoint ( aContext  ,
,
y   
)

Definition at line 98 of file CGContextCanvas.j.

function CGContextAddPath ( aContext  ,
aPath   
)

Definition at line 103 of file CGContextCanvas.j.

function CGContextAddRect ( aContext  ,
aRect   
)

Definition at line 138 of file CGContextCanvas.j.

function CGContextAddRects ( aContext  ,
rects  ,
count   
)

Definition at line 143 of file CGContextCanvas.j.

function CGContextBeginPath ( aContext   ) 

Definition at line 157 of file CGContextCanvas.j.

function CGContextClearRect ( aContext  ,
aRect   
)

Definition at line 172 of file CGContextCanvas.j.

function CGContextClip ( aContext   ) 

Definition at line 212 of file CGContextCanvas.j.

function CGContextClipToRect ( aContext  ,
aRect   
)

Definition at line 217 of file CGContextCanvas.j.

function CGContextClipToRects ( aContext  ,
rects  ,
count   
)

Definition at line 226 of file CGContextCanvas.j.

function CGContextClosePath ( aContext   ) 

Definition at line 162 of file CGContextCanvas.j.

function CGContextDrawPath ( aContext  ,
aMode   
)

Definition at line 177 of file CGContextCanvas.j.

function CGContextFillRect ( aContext  ,
aRect   
)

Definition at line 188 of file CGContextCanvas.j.

function CGContextFillRects ( aContext  ,
rects  ,
count   
)

Definition at line 193 of file CGContextCanvas.j.

function CGContextMoveToPoint ( aContext  ,
,
y   
)

Definition at line 167 of file CGContextCanvas.j.

function CGContextRestoreGState ( aContext   ) 

Definition at line 51 of file CGContextCanvas.j.

function CGContextRotateCTM ( aContext  ,
anAngle   
)

Definition at line 266 of file CGContextCanvas.j.

function CGContextSaveGState ( aContext   ) 

Definition at line 46 of file CGContextCanvas.j.

function CGContextScaleCTM ( aContext  ,
sx  ,
sy   
)

Definition at line 271 of file CGContextCanvas.j.

function CGContextSetAlpha ( aContext  ,
anAlpha   
)

Definition at line 236 of file CGContextCanvas.j.

function CGContextSetBlendMode ( aContext  ,
aBlendMode   
)

Definition at line 76 of file CGContextCanvas.j.

function CGContextSetFillColor ( aContext  ,
aColor   
)

Definition at line 241 of file CGContextCanvas.j.

function CGContextSetLineCap ( aContext  ,
aLineCap   
)

Definition at line 56 of file CGContextCanvas.j.

function CGContextSetLineJoin ( aContext  ,
aLineJoin   
)

Definition at line 61 of file CGContextCanvas.j.

function CGContextSetLineWidth ( aContext  ,
aLineWidth   
)

Definition at line 66 of file CGContextCanvas.j.

function CGContextSetMiterLimit ( aContext  ,
aMiterLimit   
)

Definition at line 71 of file CGContextCanvas.j.

function CGContextSetShadow ( aContext  ,
aSize  ,
aBlur   
)

Definition at line 251 of file CGContextCanvas.j.

function CGContextSetShadowWithColor ( aContext  ,
aSize  ,
aBlur  ,
aColor   
)

Definition at line 258 of file CGContextCanvas.j.

function CGContextSetStrokeColor ( aContext  ,
aColor   
)

Definition at line 246 of file CGContextCanvas.j.

function CGContextStrokeRect ( aContext  ,
aRect   
)

Definition at line 207 of file CGContextCanvas.j.

function CGContextTranslateCTM ( aContext  ,
tx  ,
ty   
)

Definition at line 276 of file CGContextCanvas.j.

function eigen ( anAffineTransform   ) 

Definition at line 331 of file CGContextCanvas.j.

if ( CPFeatureIsCompatible(CPJavaScriptCanvasTransformFeature  ) 

Definition at line 337 of file CGContextCanvas.j.


Variable Documentation

Initial value:

 [ "source-over", "source-over", "source-over", "source-over", "darker", 
                                "lighter", "source-over", "source-over", "source-over", "source-over", 
                                "source-over", "source-over", "source-over", "source-over", "source-over", 
                                "source-over", "source-over", 
                                "copy", "source-in", "source-out", "source-atop", 
                                "destination-over", "destination-in", "destination-out", "destination-atop", 
                                "xor", "source-over", "source-over" ]

Definition at line 25 of file CGContextCanvas.j.

var CANVAS_LINECAP_TABLE = [ "butt", "round", "square" ]

Definition at line 23 of file CGContextCanvas.j.

var CANVAS_LINEJOIN_TABLE = [ "miter", "round", "bevel" ]

Definition at line 24 of file CGContextCanvas.j.


Generated on Wed May 20 12:43:58 2009 for Cappuccino by  doxygen 1.5.8