OK. I think you should try the James Newton handler, but the principle is like this:

You can use a rotation matrix to rotate a vector (or another matrix). a point (x, y) in an image is a vector.

A 2d rotation matrix looks like this:

[a, b]
[c, d] where a = cos a#, b = -sin a#, c = sin a#, d = cosa#

(a# = alpha = the angle)

To rotate a vector you multiply the matrix with the vector, which is simplified to:

x_new = x_old * a + x_old * c
y_new = y_old * b + y_old * d


This will rotate the image around the center, but you need to decide the size of the new image before starting to write pixels to it, so using Newton's handler saves you some hazzle.


-A.



Matrix, matrix...hum... kan you develop a bit more?
or any place where i can find a tut on this?

Fabrice
Andreas Gaunitz P11 heeft op donderdag 12 december 2002 om 15:29 het volgende geschreven:

(the question could also be "how to rotate a member bitmap within the cast".)

now, for the second composite i need to rotate the text info before making the composite.
how do i do this?

Fabrice

Use a little matrix maths and a 2d rotation matrix?


-A.


[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]

[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo.  Thanks!]


Reply via email to