<div></div><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote"><canvas id="myCanvas" width="200" height="200"></canvas><br>
<br>
<style ....><br>
#mycanvas {<br>
width: 200;<br>
height: 200;<br>
}<br>
</style><br></blockquote>
<font color="#888888"><br></font>yep, right<br><br><br>from <a href="http://dev.w3.org/html5/spec/Overview.html#the-canvas-element">http://dev.w3.org/html5/spec/Overview.html#the-canvas-element</a><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
<p>The intrinsic dimensions of the <code><a href="http://dev.w3.org/html5/spec/Overview.html#the-canvas-element">canvas</a></code> element equal
the size of the coordinate space, with the numbers interpreted in
CSS pixels. However, the element can be sized arbitrarily by a
style sheet. During rendering, the image is scaled to fit this layout
size.</p><p>The size of the coordinate space does not necessarily represent
the size of the actual bitmap that the user agent will use
internally or during rendering. On high-definition displays, for
instance, the user agent may internally use a bitmap with two device
pixels per unit in the coordinate space, so that the rendering
remains at high quality throughout.</p></blockquote>
<p>I don't use css for setting the canvas width and height, I always get an unexpected result :S<br></p><br><br><div class="gmail_quote">On Tue, Sep 1, 2009 at 5:13 AM, Bryan Berry <span dir="ltr"><<a href="mailto:bryan@olenepal.org">bryan@olenepal.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">On Tue, 2009-09-01 at 02:36 -0700, S Page wrote:<br>
> On Mon, Aug 31, 2009 at 6:51 AM, Martin<br>
> Langhoff<<a href="mailto:martin.langhoff@gmail.com">martin.langhoff@gmail.com</a>> wrote:<br>
> > Our pixels are rather "special". If you are using Browse.xo or<br>
> > anything using hulahop/gecko make sure you read Mihai Sucan's notes on<br>
> > the topic... wikipage which I have now lost track of...<br>
><br>
> Probably <a href="http://wiki.laptop.org/go/HTML_canvas_performance" target="_blank">http://wiki.laptop.org/go/HTML_canvas_performance</a><br>
</div></div><div class="im">> _______________________________________________<br>
> Sugar-devel mailing list<br>
> <a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
> <a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
<br>
<br>
</div>I am aware of that issue but I am referring a different one.<br>
<br>
for whatever reason a canvas pixel is not equivalent to a css pixel so<br>
the following methods of specifying canvas dimensions are not<br>
equivalent:<br>
<br>
<canvas id="myCanvas" width="200" height="200"></canvas><br>
<br>
<style ....><br>
#mycanvas {<br>
width: 200;<br>
height: 200;<br>
}<br>
</style><br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div class="h5">Bryan W. Berry<br>
Technology Director<br>
OLE Nepal, <a href="http://www.olenepal.org" target="_blank">http://www.olenepal.org</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Felipe López Toledo<br>