Caution -- the following is untested and is being dredged from my sleep-deprived memory.
1) Convert the starting image rect to a quad. 2) Offset the quad by the negative of the desired origin point, thus temporarily making point(0,0) coincide with the desired origin. 3) Apply your rotation function to calculate the rotated quad. 4) Calculate the bounding rect of the rotated quad. 5) New origin point becomes negative point(bounding left, bounding top). 6) Create a new image object the width and height of the bounding rect. 6) Offset the rotated quad by the negative of the new origin to get the destination quad for copyPixels (with left and top bounds at 0) 7) Perform the copyPixels from the starting image and rect to the new image and destination quad. 8) Return a list with the new image and the new origin point. At 0009 +0100 11/12/2003, Michael von Aichberger wrote: >... >Today I have an even more difficult question: I now need to rotate an image >not only by a given angle, but also around a specified point. > >With the original image, the function should demand a parameter for the >angle and a point value. As a result I would like to get the rotated image >and a new point value, indicating the new position of the pixel the location >of which had been passed to the function. >... [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!]
