> I'm trying to use WinPaintChars() to draw text with a transparent
> background (ie, only paint the text pixels, without getting a rectangle
> of the background color around the characters).  This works perfectly 
> on 3.5 devices, but in testing it on POSE with any of the 4.0 roms, I
> get a white background around the text, instead of the desired effect.
> 
> Here's my code:
> 

>       // erase the text pixels
> 
>       WinSetTextColor( whiteIndex );
>       WinSetBackColor( blackIndex );
>       WinSetDrawMode( winErase );

  try:

  WinSetDrawMode( winMask );

>       WinPaintChars( txt, len, x, y );
> 
>       // logical OR the text pixels with the desired color
>       
>       WinSetTextColor( textColor );
>       WinSetBackColor( whiteIndex );
>       WinSetDrawMode( winOverlay );
>       WinPaintChars( txt, len, x, y );
> 
> Where whiteIndex, blackIndex, textColor are all indexes into the current 
> palette for the appropriate colors.
> 
> Is this a bug in 4.0?  Or am I missing something?

  no bug :)

    winMask  = --> dst = src & !dst --> masking
    winErase = --> dst = src & dst  --> cropping

  i think, the "Erase" word can be a bit confusion.. it really means
  to crop (remove those pixels from dst that are NOT on in source)..

  try winMask, and i bet you'll get the result you want.

// az
[EMAIL PROTECTED]
http://www.ardiri.com/    <--- free games!


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to