<div dir="ltr">I have an animated canvas that I use for animation.&nbsp; I&#39;ve never put it up on PLaneT, but use it for many of my own applications.&nbsp; I can send an example app if you want.<br><br>Doug<br><br><div class="gmail_quote">
On Sun, Sep 21, 2008 at 7:58 AM, Matthew Flatt <span dir="ltr">&lt;<a href="mailto:mflatt@cs.utah.edu">mflatt@cs.utah.edu</a>&gt;</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;">
Neil and Robby have given you good general answers --- compute the<br>
target without referring to the image, or use regions instead of an<br>
offscreen image --- but I&#39;ll answer the original questions:<br>
<div class="Ih2E3d"><br>
At Sat, 20 Sep 2008 11:23:32 -0400, &quot;deepankar&quot; wrote:<br>
&gt; 1) Is it possible to draw a canvas to an offscreen buffer ?<br>
<br>
</div>You can take a function that draws to a canvas and redirect it so that<br>
it draws to an offscreen image (i.e., swap a `bitmap-dc%&#39; in place of a<br>
canvas `dc&lt;%&gt;&#39;).<br>
<div class="Ih2E3d"><br>
&gt; 2) Is it possible to fetch pixel values from a canvas.<br>
<br>
</div>Canvas drawing is one-way only: you can send an image out to the user<br>
to see, but you cannot programmatically &quot;look&quot; at the canvas. Also,<br>
there&#39;s no way to take a snapshot of the canvas to get back an<br>
offscreen image.<br>
<br>
If you redirect a drawing function to an offscreen image, then you<br>
can, of course, inspect the pixels of the offscreen image.<br>
<font color="#888888"><br>
<br>
Matthew<br>
</font><div><div></div><div class="Wj3C7c"><br>
_________________________________________________<br>
 &nbsp;For list-related administrative tasks:<br>
 &nbsp;<a href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme" target="_blank">http://list.cs.brown.edu/mailman/listinfo/plt-scheme</a><br>
</div></div></blockquote></div><br></div>