Praise the Lord! (or Allah or whoever, got to be politically correct these days ;-) )
thanks for all of your help. For anyone following the thread, the final working code
was:
for( int index=0; index<2; index++ )
{
if( !index )
{
WinSetTextColor( 255 ); //I'm always using an 8 bit per pixel
offscreen bitmap so I can just put 255
WinSetBackColor( 0 );
WinSetDrawMode( winMask );
}
else
{
rgb.r = 0; //Use blue here just to illustate the point
rgb.g = 0;
rgb.b = 255;
WinSetTextColor( WinRGBToIndex( &rgb ) );
WinSetBackColor( 0 );
WinSetDrawMode( winOverlay );
}
WinPaintChars( buff, bufflen, xOffset, yOffset );
}
This does draw text with a transparent background.
- John
> >It appeared from the documentation that the way to go would be to use
> >WinPaintChars with a masking methodology, paint the characters once with
> >WinSetDrawMode( winErase ), and then drawing them again with
> >WinSetDrawMode( winOverlay ), with appropriate background and foreground
> >colors set. That, of course didn't work.
>
> You're on the right track, that's exactly how you should be doing
> it. However,
> there is a bug in the Visor Edge OS, and in any Handspring device using the
> 3.5.2 v1.4 update which causes the winErase blitter mode to fail. Use winMask
> instead, and it should work:
>
> WinSetTextColor( (1<<depth)-1 ); // 255 for 8 bit mode, 15 for 4 bit mode, etc
> WinSetBackColor( 0 );
> WinSetDrawMode( winMask );
> WinPaintChars( txt, len, x, y );
>
> WinSetTextColor( indexOfDesiredTextColor );
> WinSetBackColor( 0 );
> WinSetDrawMode( winOverlay );
> WinPaintChars( txt, len, x, y );
>
> --
> Bill Kirby
> Electron Hut
> www.electronhut.com
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe, please see
>http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/