<?xml version="1.0" encoding='utf-8'?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="Canvas element - Page 6 - Wikipedia">
<p>
<a accesskey="1" href="page.php?w=Canvas_element&amp;p=5">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Canvas_element&amp;p=7">3.Next</a>
</p>

<p>This code draws a red rectangle on the screen.</p>

<p>The Canvas API also provides <code>save()</code> and <code>restore()</code>, for saving and restoring all the canvas context's attributes.</p>

<p><big> Canvas element size versus drawing surface size </big></p>
<p>A canvas actually has two sizes: the size of the element itself and the size of the element's drawing surface.  Setting the element's width and height attributes sets both of these sizes; CSS attributes affect only the element's size and not the drawing surface.</p>

<p>By default, both</p><p>
<a accesskey="1" href="page.php?w=Canvas_element&amp;p=5">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Canvas_element&amp;p=7">3.Next</a>
</p>

<do type="prev" label="Search">
        <go href="search.wml"/>
</do>

</card>
</wml>
