Thanks a bunch for the solution. Will try the same. ----- Original Message ----- From: "Logan Shaw" <[EMAIL PROTECTED]> To: "Palm Developer Forum" <[email protected]> Sent: Tuesday, September 27, 2005 12:30 PM Subject: Re: Rendering Inverted Text
> Deepak.MA wrote: > > I have a requirement wherein i need to have inverted(180 degree shift) > > in the text that is rendered on the screen. > > Is this possible at all??? > > Just to be clear, I assume you mean rotated 180 degrees around the > axis perpendicular to the screen. > > I don't think Palm OS does it, by default, but you can get the effect in > one of two ways: > > 1. Make a font with characters that are rotated 180 degrees. Reverse > the characters in the strings you want to draw (harder if you use > multi-byte character encoding), then draw. > > For extra cleverness points, write a function that takes an existing > font and converts it to the 180-degree-rotate version of itself. > > 2. Go get the BitmapRsrc sample code from the PalmSource knowledgebase. > Write a function to rotate the pixels in a BitmapRsrc bitmap by > 180 degrees. With 8-bit and 16-bit bitmaps, this is easy. Lower > bit depths are trickier, but still possible to do fast if you're > clever with bit manipulation (and you might use a lookup table). > > Then, when you want to draw text, create a BitmapRsrc bitmap of the > appropriate size, wrap it into a Window by using WinCreateBitmapWindow(), > draw into it, reverse it, and then WinCopyRectangle() it to the screen. > If you need to supprt transparent text, WinCopyRectangle() the existing > data from the draw window to the bitmap window, then rotate it, then > draw the text with transparency, then rotate it again, then draw it > back to the screen. > > With method #2, it might actually be sufficient to just always work in > 16-bit mode. Converting from 8-bit to 16-bit and back should produce > the right results, but it might be really slow. > > - Logan > > -- > For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ > "SASKEN RATED THE BEST COMPANY TO WORK FOR IN INDIA - SURVEY 2004 conducted by the BUSINESS TODAY -Mercer-TNS India" SASKEN BUSINESS DISCLAIMER This message may contain confidential, proprietary or legally Privileged information. In case you are not the original intended Recipient of the message, you must not, directly or indirectly, use, Disclose, distribute, print, or copy any part of this message and you are requested to delete it and inform the sender. Any views expressed in this message are those of the individual sender unless otherwise stated. Nothing contained in this message shall be construed as an offer or acceptance of any offer by Sasken Communication Technologies Limited ("Sasken") unless sent with that express intent and with due authority of Sasken. Sasken has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
