Closed GoogleCodeExporter closed 9 years ago
The values in the attributes width and height must not be suffixed by "px", they
don't have units, they are always expressed in pixels. This reflects the number
of
pixels on the canvas, like the number of pixels on a bitmap image.
You can specify the size of the canvas on the page using the CSS style
attribute :
style="width: 300px; height: 150px";
the units can be here "%", em, cm, ...
And the generally, this size is the same as the width/height attributes, but it
can
be different. For example, look at the size of the canvas here :
http://www.nihilogic.dk/labs/pocket_full_of_canvas/demo.php#
The canvas style is bigger than the canvas size to be faster (less pixels to
draw)
but is still big enough on your screen (css style).
Original comment by fabien.menager
on 6 Jan 2010 at 10:28
Original issue reported on code.google.com by
josh.gr...@gmail.com
on 6 Jan 2010 at 9:54