114 return { alpha:1.0, strokeStyle:
"#000", fillStyle:
"#ccc", lineWidth:1.0, lineJoin:
kCGLineJoinMiter, lineCap:
kCGLineCapButt, miterLimit:10.0, globalAlpha:1.0,
126 return { alpha:aGState.alpha, strokeStyle:aGState.strokeStyle, fillStyle:aGState.fillStyle, lineWidth:aGState.lineWidth,
127 lineJoin:aGState.lineJoin, lineCap:aGState.lineCap, miterLimit:aGState.miterLimit, globalAlpha:aGState.globalAlpha,
128 blendMode:aGState.blendMode,
129 shadowOffset:CGSizeMakeCopy(aGState.shadowOffset), shadowBlur:aGState.shadowBlur, shadowColor:aGState.shadowColor, CTM:
CGAffineTransformMakeCopy(aGState.CTM) };
138 return { DOMElement:document.createElement(
"div"), path:NULL, gState:
CGGStateCreate(), gStateStack:[] };
158 aContext.gState = aContext.gStateStack.pop();
163 aContext.gState.lineCap = aLineCap;
168 aContext.gState.lineDashes = someDashes;
169 aContext.gState.lineDashesPhase = aPhase;
174 aContext.gState.lineJoin = aLineJoin;
179 aContext.gState.lineWidth = aLineWidth;
184 aContext.gState.miterLimit = aMiterLimit;
189 aContext.gState.blendMode = aBlendMode;
194 CGPathAddArc(aContext.path, aContext.gState.CTM, x, y, radius, startAngle, endAngle, clockwise);
237 CGPathAddLines(aContext.path, aContext.gState.CTM, points, count);
372 if (arguments[2] === undefined)
373 var count = rects.length;
422 var CTM = aContext.gState.CTM;
434 return aContext.gState.CTM;
446 var gState = aContext.gState;
448 gState.CTM = CGAffineTransformRotate(gState.CTM, anAngle);
460 var gState = aContext.gState;
474 var gState = aContext.gState;
489 var gState = aContext.gState;
491 gState.shadowOffset = CGSizeMakeCopy(aSize);
492 gState.shadowBlur = aBlur;
506 var gState = aContext.gState;
508 gState.shadowOffset = CGSizeMakeCopy(aSize);
509 gState.shadowBlur = aBlur;
510 gState.shadowColor = aColor;
521 aContext.gState.alpha = MAX(MIN(anAlpha, 1.0), 0.0);
571 var
KAPPA = 4.0 * ((SQRT2 - 1.0) / 3.0);
640 var count = points.length;
644 for (; i < count; i += 2)
666 aContext.gState.fillStyle = [aColor cssString];
678 aContext.gState.strokeStyle = [aColor cssString];
function CGContextSetBlendMode(aContext, aBlendMode)
function CGContextTranslateCTM(aContext, tx, ty)
function CGContextSetShadowWithColor(aContext, aSize, aBlur, aColor)
function CGContextStrokeEllipseInRect(aContext, aRect)
function CGGStateCreate()
function CGPathWithRoundedRectangleInRect(aRect, xRadius, yRadius, ne, se, sw, nw)
function CGContextDrawImage(aContext, aRect, anImage)
function CGContextAddRects(aContext, rects, count)
function CGContextAddArcToPoint(aContext, x1, y1, x2, y2, radius)
function CGContextFillEllipseInRect(aContext, aRect)
function CGPathCloseSubpath(aPath)
function CGContextDrawLinearGradient(aContext, aGradient, aStartPoint, anEndPoint, options)
function CGPathAddRects(aPath, aTransform, rects, count)
function CGContextSetStrokeColor(aContext, aColor)
function CGContextSetMiterLimit(aContext, aMiterLimit)
function CGContextSetLineJoin(aContext, aLineJoin)
function CGContextScaleCTM(aContext, sx, sy)
function CGContextRestoreGState(aContext)
function CGContextSetShadow(aContext, aSize, aBlur)
function CGContextSetLineCap(aContext, aLineCap)
function CGContextStrokeLineSegments(aContext, points, count)
function CGContextDrawPath(aContext, aMode)
kCGBlendModeDestinationAtop
function CGContextAddLineToPoint(aContext, x, y)
function CGContextAddArc(aContext, x, y, radius, startAngle, endAngle, clockwise)
function CGContextStrokePath(aContext)
function CGContextAddEllipseInRect(aContext, aRect)
function CGContextSetLineWidth(aContext, aLineWidth)
function CGContextClosePath(aContext)
function CGPathMoveToPoint(aPath, aTransform, x, y)
function CGContextFillRects(aContext, rects, count)
function CGPathAddLines(aPath, aTransform, points, count)
function CGContextSetLineDash(aContext, aPhase, someDashes)
function CGPathAddCurveToPoint(aPath, aTransform, cp1x, cp1y, cp2x, cp2y, x, y)
function CGContextRelease()
function CGContextStrokeRectWithWidth(aContext, aRect, aWidth)
function CGContextAddPath(aContext, aPath)
function CGContextSetAlpha(aContext, anAlpha)
function CPFeatureIsCompatible(aFeature)
function CGPathWithEllipseInRect(aRect)
kCGBlendModeDestinationIn
function CGPathIsEmpty(aPath)
function CGContextSetFillColor(aContext, aColor)
function CGPathAddArc(aPath, aTransform, x, y, aRadius, aStartAngle, anEndAngle, isClockwise)
function CGContextRotateCTM(aContext, anAngle)
function CGContextStrokeRoundedRectangleInRect(aContext, aRect, aRadius, ne, se, sw, nw)
function CGContextBeginPath(aContext)
function CGPathCreateMutable()
function CGContextClearRect(aContext, aRect)
function CGContextRetain(aContext)
function CGGStateCreateCopy(aGState)
function CGPathAddRect(aPath, aTransform, aRect)
kCGBlendModeDestinationOut
function CGContextIsPathEmpty(aContext)
function CGContextAddCurveToPoint(aContext, cp1x, cp1y, cp2x, cp2y, x, y)
function CGContextStrokeRect(aContext, aRect)
function CGContextSaveGState(aContext)
function CGContextEOFillPath(aContext)
function CGContextFillRoundedRectangleInRect(aContext, aRect, aRadius, ne, se, sw, nw)
function CGContextFillRect(aContext, aRect)
function CGPathAddLineToPoint(aPath, aTransform, x, y)
function CGContextConcatCTM(aContext, aTransform)
function CGContextFillPath(aContext)
function CGBitmapGraphicsContextCreate()
function CGContextMoveToPoint(aContext, x, y)
function CGPathAddPath(aPath, aTransform, anotherPath)
kCGBlendModeDestinationOver
function CGPathAddArcToPoint(aPath, aTransform, x1, y1, x2, y2, aRadius)
function CGContextAddRect(aContext, aRect)
function CGContextAddLines(aContext, points, count)
function CGPathAddQuadCurveToPoint(aPath, aTransform, cpx, cpy, x, y)
function CGContextGetCTM(aContext)
function CGContextAddQuadCurveToPoint(aContext, cpx, cpy, x, y)