HTML and CSS Reference
In-Depth Information
<canvas
<canvas id=
"canvas2"
width=
"32"
height=
"32"
style=
"position: absolute;
top: 256px; left: 50px;"
>
Your browser does not support HTML5 Canvas.
</canvas>
</canvas>
</div>
</div>
</body>
</body>
</html>
</html>
Figure 4-18
shows the canvas copy functions in operation.
Figure 4-18. An example canvas copy operation
Canvas copy operations can be very useful when creating applications that need to share and
copy image data across multiple
<div>
instances on (and the
Canvas
object within) a web
page.Forexample,multiple
Canvas
elementscanbespreadacrossawebpage,andastheuser
makes changes to one, the others can be updated. This can be used for fun applications, such
asa“minimap”inagame,oreveninseriousapplications,suchasstockportfoliochartingand
personalization features.