<div dir="ltr"><div>You&#39;re right about the timing. </div>
<div>I&#39;m fairly new to&nbsp;Smalltalk and had already hooked in a DLL for other things, so found it much easier to work matrix math in C :)<br><br></div>
<div class="gmail_quote">On Mon, Sep 22, 2008 at 7:58 PM, Matthias Berth <span dir="ltr">&lt;<a href="mailto:matthias.berth@googlemail.com">matthias.berth@googlemail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi Iulian,<br><br>I&#39;m glad to hear that it worked for you. I wonder why you implemented<br>it in a C DLL... As far as I can see, the manipulations with the<br>
parameters would be done only once for every quad you want to<br>transform. The computation time for that should be negligible compared<br>to the time it takes to actually transform all the pixels in the quad<br>/ rectangle. At least that&#39;s what I was thinking, maybe i am wrong?<br>
<br>Cheers<br><br>Matthias<br><br>On Tue, Sep 23, 2008 at 1:08 AM, Iulian Wande Radu<br>
<div class="Ih2E3d">&lt;<a href="mailto:infinite.flow@gmail.com">infinite.flow@gmail.com</a>&gt; wrote:<br></div>
<div>
<div></div>
<div class="Wj3C7c">&gt; Thank you for the guidelines for skewing forms.<br>&gt;<br>&gt; I&#39;ve followed Matthias&#39; instructions (and the associated math doc) and<br>&gt; skewing works well this way through WarpBlt. (The code linked by Yoshiki was<br>
&gt; too slow and didn&#39;t work fully).<br>&gt;<br>&gt; I wrote the math conversions in a C DLL, and it would probably be useful for<br>&gt; people. Is there any place where I could put the code so the community can<br>
&gt; use it ?<br>&gt;<br>&gt; Cheers,<br>&gt; Iulian<br>&gt;<br>&gt; ---------- Forwarded message ----------<br>&gt; From: Matthias Berth &lt;<a href="mailto:matthias.berth@googlemail.com">matthias.berth@googlemail.com</a>&gt;<br>
&gt; Date: Tue, Jul 22, 2008 at 7:10 PM<br>&gt; Subject: Re: [Newbies] Skewing Forms in Squeak V2<br>&gt; To: &quot;A friendly place to get answers to even the most basic questions about<br>&gt; Squeak.&quot; &lt;<a href="mailto:beginners@lists.squeakfoundation.org">beginners@lists.squeakfoundation.org</a>&gt;<br>
&gt;<br>&gt;<br>&gt; So it comes down to this:<br>&gt;<br>&gt; given a projective transformation T from a rectangle (your form) to a<br>&gt; quad Q (what you want to draw on screen), how can you express the same<br>&gt; transformation in terms of mapping a quad to a rectangle (what WarpBlt<br>
&gt; needs)?<br>&gt;<br>&gt; One possible plan is:<br>&gt;<br>&gt; 1) determine the transformation&#39;s parameters<br>&gt;<br>&gt; 2) take the bounding box of Q (a rectangle R) and transform it by the<br>&gt; inverse of T, giving you a quad Q&#39;<br>
&gt;<br>&gt; 3) use WarpBlt to transform pixels in Q&#39; (should be a superset of your<br>&gt; form) to R<br>&gt;<br>&gt; 4) mask the result with your original quad Q, using pixel-by-pixel<br>&gt; operations on Forms<br>
&gt;<br>&gt; I think all you need in terms of mathematics for this is in<br>&gt; <a href="http://www.cs.cmu.edu/~ph/869/www/notes/proj/proj.pdf" target="_blank">http://www.cs.cmu.edu/~ph/869/www/notes/proj/proj.pdf</a><br>
&gt;<br>&gt; Hope this helps, feel free to ask about the details,<br>&gt;<br>&gt; Matthias<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; On Thu, Jul 24, 2008 at 1:39 AM, Yoshiki Ohshima &lt;<a href="mailto:yoshiki@vpri.org">yoshiki@vpri.org</a>&gt; wrote:<br>
&gt;&gt;<br>&gt;&gt; At Tue, 22 Jul 2008 13:53:21 -0400,<br>&gt;&gt; Iulian Wande Radu wrote:<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; Hi, I&#39;d like to skew the graphics of a Form, is there an easy way to do<br>&gt;&gt; &gt; this in v2 ?<br>
&gt;&gt; &gt;<br>&gt;&gt; &gt; What I want is to take the rectangle from a normal form, transform it<br>&gt;&gt; &gt; into an arbitrarily-defined quadrilateral, and<br>&gt;&gt; &gt; then paint on the screen. I saw that WarpBlt does something like this..<br>
&gt;&gt; &gt; but it maps a quadrilateral section of a form<br>&gt;&gt; &gt; onto a rectangle.<br>&gt;&gt;<br>&gt;&gt; &nbsp;There was similar a discussion on this a while ago:<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; <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>
&gt;&gt;<br>&gt;&gt; -- Yoshiki<br>&gt;&gt; _______________________________________________<br>&gt;&gt; Beginners mailing list<br>&gt;&gt; <a href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a><br>
&gt;&gt; <a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>
&gt; Beginners mailing list<br>&gt; <a href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a><br>&gt; <a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
&gt;<br>&gt;<br>_______________________________________________<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>