Rotate bitmap

Hi,
how to rotate bitmap?
Thanks

Comments

  • : Hi,
    : how to rotate bitmap?
    : Thanks
    :

    If you just want to rotate a bitmap by a multiple of 90 degrees(ie. 90,180,270...), its easy. You can do it by flipping the bitmap using tcanvas.stretchdraw or tcanvas.copyrect. You just change the properties of the destination rectangle. For example, you can flip the bitmap vertically, by using the bottom where the parameter is supposed to be the top of the rectangle and also using the top where it would normally be the bottom.

    If you wanted to rotate the bitmap by some other angle like 10 degrees or 23.56474645 degrees, it gets much more complicated. This has to be done pixel by pixel. It is a little difficult to explain.


  • Thanks, buddy! It's very cool!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories