Unknown Kadath


Posts Tagged “save”

Using Multiple HTML5 Canvases as Layers

Posted on July 26th, 2010 by James Litten

DEMO Here’s our finished canvas with full source code. The reasons why you would want to layer multiple canvases on top of each other are many but they all have a common root. There is a requirement in the W3C definition of the 2d context… There is only one CanvasRenderingContext2D object per canvas, so calling [...]

Understanding save() and restore() for the Canvas Context

Posted on July 10th, 2010 by James Litten

At first, I had a hard time grasping the purpose and use of the save() and restore() methods of the canvas’ 2d context. It’s really very simple and here are some examples that can help you understand it better. Let’s look at an official definition of save() and restore() Each context maintains a stack of [...]