ANy easy way to do this, rotate a img using a trackbar over 1 degree for every value the trackbar is moved in delphi 7, also without screwing with canvas drawings already drawn? cheers
ANy easy way to do this, rotate a img using a trackbar over 1 degree for every value the trackbar is moved in delphi 7, also without screwing with canvas drawings already drawn? cheers
Each pixel row is a line. You can calculate the new coordinates for it using simple goniometry. When you have the new cooordinates, use Bresenhams algorithm to draw the line.
Hi! You should use "GR_32", which is a professional utility for DelphiX. With that, you can do the rotation, and anti-aliasing, so that the picture will look just fine.
Actually, GR32 is not just for DelphiX and it has never been part of DelphiX. It is a freeware opensource graphics library for Delphi (and to some extent Lazarus). For 2D games, you can even write the entire game in GR32, this has been done a few times. Sorry, just had to point that out.Originally Posted by Crusare
The rotation routines are definately worth looking at, also worth looking at is EFG's site (googling places this in the top 3 results for "Delphi Rotate Bitmap") http://www.efg2.com/Lab/ImageProcess...teScanline.htm. Ayways, hope that answers the OP question.
- Jeremy
http://www.eonclash.com/
Bookmarks