<div dir="ltr">Thank you for the guidelines for skewing forms.<br><br>I&#39;ve followed Matthias&#39; instructions (and the associated math doc) and skewing works well this way through WarpBlt. (The code linked by Yoshiki was too slow and didn&#39;t work fully).<br>
<br>I wrote the math conversions in a C DLL, and it would probably be useful for people. Is there any place where I could put the code so the community can use it ?<br><br>Cheers,<br>Iulian<br><br>---------- Forwarded message ----------<br>
From: <b class="gmail_sendername">Matthias Berth</b> <span dir="ltr">&lt;<a href="mailto:matthias.berth@googlemail.com">matthias.berth@googlemail.com</a>&gt;</span><br>Date: Tue, Jul 22, 2008 at 7:10 PM<br>Subject: Re: [Newbies] Skewing Forms in Squeak V2<br>
To:
&quot;A friendly place to get answers to even the most basic questions about
Squeak.&quot; &lt;<a href="mailto:beginners@lists.squeakfoundation.org">beginners@lists.squeakfoundation.org</a>&gt;<br><br><br>So it comes down to this:<br>
<br>
given a projective transformation T from a rectangle (your form) to a<br>
quad Q (what you want to draw on screen), how can you express the same<br>
transformation in terms of mapping a quad to a rectangle (what WarpBlt<br>
needs)?<br>
<br>
One possible plan is:<br>
<br>
1) determine the transformation&#39;s parameters<br>
<br>
2) take the bounding box of Q (a rectangle R) and transform it by the<br>
inverse of T, giving you a quad Q&#39;<br>
<br>
3) use WarpBlt to transform pixels in Q&#39; (should be a superset of your<br>
form) to R<br>
<br>
4) mask the result with your original quad Q, using pixel-by-pixel<br>
operations on Forms<br>
<br>
I think all you need in terms of mathematics for this is in<br>
<a href="http://www.cs.cmu.edu/%7Eph/869/www/notes/proj/proj.pdf" target="_blank">http://www.cs.cmu.edu/~ph/869/www/notes/proj/proj.pdf</a><br>
<br>
Hope this helps, feel free to ask about the details,<br>
<br>
Matthias<br>
<br>
<br>
<br><br><div class="gmail_quote">On Thu, Jul 24, 2008 at 1:39 AM, Yoshiki Ohshima <span dir="ltr">&lt;<a href="mailto:yoshiki@vpri.org">yoshiki@vpri.org</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;">
At Tue, 22 Jul 2008 13:53:21 -0400,<br>
<div><div></div><div class="Wj3C7c">Iulian Wande Radu wrote:<br>
&gt;<br>
&gt; Hi, I&#39;d like to skew the graphics of a Form, is there an easy way to do this in v2 ?<br>
&gt;<br>
&gt; What I want is to take the rectangle from a normal form, transform it into an arbitrarily-defined quadrilateral, and<br>
&gt; then paint on the screen. I saw that WarpBlt does something like this.. but it maps a quadrilateral section of a form<br>
&gt; onto a rectangle.<br>
<br>
</div></div> &nbsp;There was similar a discussion on this a while ago:<br>
<br>
<a href="http://lists.squeakfoundation.org/pipermail/squeak-dev/2001-February/013402.html" target="_blank">http://lists.squeakfoundation.org/pipermail/squeak-dev/2001-February/013402.html</a><br>
<font color="#888888"><br>
-- Yoshiki<br>
</font><div><div></div><div class="Wj3C7c">_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
</div></div></blockquote></div><br></div>