mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-15 03:03:50 +00:00
New: CGContextSetLineDash.
This commit is contained in:
1 parent
085654e751
commit
ab692bb15d
2 files changed
+29
No files matched your search
@@ -166,6 +166,12 @@ function CGContextSetLineCap(aContext, aLineCap)
|
||||
aContext.gState.lineCap = aLineCap;
|
||||
}
|
||||
|
||||
function CGContextSetLineDash(aContext, aPhase, someDashes)
|
||||
{
|
||||
aContext.gState.lineDashes = someDashes;
|
||||
aContext.gState.lineDashesPhase = aPhase;
|
||||
}
|
||||
|
||||
function CGContextSetLineJoin(aContext, aLineJoin)
|
||||
{
|
||||
aContext.gState.lineJoin = aLineJoin;
|
||||
|
||||
@@ -68,6 +68,29 @@ function CGContextSetLineCap(aContext, aLineCap)
|
||||
aContext.lineCap = CANVAS_LINECAP_TABLE[aLineCap];
|
||||
}
|
||||
|
||||
function CGContextSetLineDash(aContext, aPhase, someDashes)
|
||||
{
|
||||
if (aContext.setLineDash)
|
||||
{
|
||||
aContext.setLineDash(someDashes);
|
||||
aContext.lineDashOffset = aPhase;
|
||||
}
|
||||
else if (typeof aContext['webkitLineDash'] !== 'undefined')
|
||||
{
|
||||
aContext.webkitLineDash = someDashes;
|
||||
aContext.webkitLineDashOffset = aPhase;
|
||||
}
|
||||
else if (typeof aContext['mozDash'] !== 'undefined')
|
||||
{
|
||||
aContext.mozDash = someDashes;
|
||||
aContext.mozLineDashOffset = aPhase;
|
||||
}
|
||||
else if (someDashes)
|
||||
{
|
||||
CPLog.warn("CGContextSetLineDash not implemented in this environment.")
|
||||
}
|
||||
}
|
||||
|
||||
function CGContextSetLineJoin(aContext, aLineJoin)
|
||||
{
|
||||
aContext.lineJoin = CANVAS_LINEJOIN_TABLE[aLineJoin];
|
||||
|
||||
Reference in new issue
Block a user