Draw rotated image

S

Sagaert Johan

hi

How do i draw a rotated image ?
In the full NET FW i used transforms before but in CF i can't.

How do i draw my image rotated (0,90,270) on CF ?

Thanks
Johan
 
M

mind_the_gap

Hi Johan,

you need to do the rotation by yourself - pixel by pixel. If you only
need to rotate in 90 degree steps it would be no problem. You only
need to access the image data quick - for this a real good class
written by Roshan Khan (http://blogs.msdn.com/windowsmobile/archive/
2008/04/15/faster-c.aspx). The discussion following on this is also
pretty interesting and gives some hints for doing some operations
faster. Everything else is simple sinus and cosinus mathematics - with
which you determine the new positon of each pixel. If you are
interested in a generic solution (e.g. every rotation) using the
FastBitmap, drop a line and I will post it. For 90 degree step
rotation you will find many examples on the net.

Regards,
Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top