Results 1 to 5 of 5

Thread: Bitmap Rotation

  1. #1

    Bitmap Rotation

    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

  2. #2

    Bitmap Rotation

    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.

  3. #3
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Bitmap Rotation

    Hi dekz, welcome to PGD!

    Your question is very vauge. Can you please elaborate a bit?

    Are you asking about how to do a bitmap rotation algorithm? ie. Whats the math and all of that stuff?
    Jason McMillen
    Pascal Game Development
    Co-Founder





  4. #4

    Bitmap Rotation

    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.

  5. #5

    Bitmap Rotation

    Quote Originally Posted by Crusare
    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.

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •