<div dir="ltr"><div>You're right about the timing. </div>
<div>I'm fairly new to 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"><<a href="mailto:matthias.berth@googlemail.com">matthias.berth@googlemail.com</a>></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'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'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"><<a href="mailto:infinite.flow@gmail.com">infinite.flow@gmail.com</a>> wrote:<br></div>
<div>
<div></div>
<div class="Wj3C7c">> Thank you for the guidelines for skewing forms.<br>><br>> I've followed Matthias' instructions (and the associated math doc) and<br>> skewing works well this way through WarpBlt. (The code linked by Yoshiki was<br>
> too slow and didn't work fully).<br>><br>> I wrote the math conversions in a C DLL, and it would probably be useful for<br>> people. Is there any place where I could put the code so the community can<br>
> use it ?<br>><br>> Cheers,<br>> Iulian<br>><br>> ---------- Forwarded message ----------<br>> From: Matthias Berth <<a href="mailto:matthias.berth@googlemail.com">matthias.berth@googlemail.com</a>><br>
> Date: Tue, Jul 22, 2008 at 7:10 PM<br>> Subject: Re: [Newbies] Skewing Forms in Squeak V2<br>> To: "A friendly place to get answers to even the most basic questions about<br>> Squeak." <<a href="mailto:beginners@lists.squeakfoundation.org">beginners@lists.squeakfoundation.org</a>><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'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'<br>
><br>> 3) use WarpBlt to transform pixels in Q' (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/~ph/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>> On Thu, Jul 24, 2008 at 1:39 AM, Yoshiki Ohshima <<a href="mailto:yoshiki@vpri.org">yoshiki@vpri.org</a>> wrote:<br>
>><br>>> At Tue, 22 Jul 2008 13:53:21 -0400,<br>>> Iulian Wande Radu wrote:<br>>> ><br>>> > Hi, I'd like to skew the graphics of a Form, is there an easy way to do<br>>> > this in v2 ?<br>
>> ><br>>> > What I want is to take the rectangle from a normal form, transform it<br>>> > into an arbitrarily-defined quadrilateral, and<br>>> > then paint on the screen. I saw that WarpBlt does something like this..<br>
>> > but it maps a quadrilateral section of a form<br>>> > onto a rectangle.<br>>><br>>> There was similar a discussion on this a while ago:<br>>><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>
>><br>>> -- Yoshiki<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>><br>><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>
><br>><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>