Page 1 of 1

PostPosted: Mon Feb 05, 2001 11:02 am
by donvoltz
Can anyone help me with source code to rotate a bitmap 180 degrees??

Thank you very much

Don Voltz

Don Voltz

PostPosted: Tue Feb 06, 2001 5:14 am
by stephane
You could use the PToolbox library, which has a function for rotating bitmaps, although it <i>is</i> a little bit involved, using screen buffers and other things.. shudder <img src=icon_smile.gif border=0 align=middle>

Otoh, are you looking for a routine that would take a PocketC "bitmap string", and output another string with the same bitmap rotated 180 degs?

If no one else has any code or algorithms to share, I could try my hand at it, if the above is what you're looking for.. let us know.



PostPosted: Tue Feb 06, 2001 2:50 pm
by donvoltz
Hi St?ɬ©phane, thank you for the response.

I have attempted to use Ptoolbox and buffers without sucess.

What I am trying to accomplish is the following, I have a screen, I want to keep the right 1/2 as is, the left 1/2 I want to flip horizontally to combine the two images.

When I use PToolbox, I am able to keep the right half as is. It is when I try to copy and flip the left 1/2 where the problem is. The result is a blank 1/2 screen.

Any ideas, I hope this makes sense.

Thanks in advance


Don Voltz

PostPosted: Tue Feb 06, 2001 5:03 pm
by jstadolnik
This smells like a toolbox bug. I'll take a peek.


PostPosted: Wed Feb 07, 2001 2:46 am
by jstadolnik
I fixed the problem... it stemmed from a pain in the ass OS3.5 undocumented feature/bug.

There should be a new release of the toolbox out by the end of the week with the fix (and a boatload of new features).

You can temporarily get around the problem by setting your screen depth to 2 or higher.

Also, all you need is single liner to do the rotation (no need for scratch buffers):



PostPosted: Wed Feb 07, 2001 8:33 am
by donvoltz
Thanks Joe for the fix, it works like I wanted it to.

I look forward to the new update.

Don Voltz

Don Voltz