|
@ -1370,4 +1370,20 @@ tests['shadow integration'] = function(ctx){ |
|
|
ctx.arc(50, 151, 50, 0, Math.PI*2, false); |
|
|
ctx.arc(50, 151, 50, 0, Math.PI*2, false); |
|
|
ctx.fillStyle = "gold"; |
|
|
ctx.fillStyle = "gold"; |
|
|
ctx.fill(); |
|
|
ctx.fill(); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
tests['font state'] = function(ctx){ |
|
|
|
|
|
ctx.save(); |
|
|
|
|
|
ctx.font = '20px Impact'; |
|
|
|
|
|
ctx.fillText('Bam!', 50, 80); |
|
|
|
|
|
|
|
|
|
|
|
ctx.save(); |
|
|
|
|
|
ctx.font = '10px Arial'; |
|
|
|
|
|
ctx.fillText('Boom!', 50, 100); |
|
|
|
|
|
|
|
|
|
|
|
ctx.restore(); |
|
|
|
|
|
ctx.fillText('Bam again!', 50, 120); |
|
|
|
|
|
|
|
|
|
|
|
ctx.restore(); |
|
|
|
|
|
ctx.fillText('Boom again!', 50, 140); |
|
|
}; |
|
|
}; |