Assuming you read the SDK docs and know about the glue functions for
getting/setting the transparent value, then it's just a straightforward
logic problem:

1.  Get the transparent value (BmpGlueGetTransparentValue).
2.  Fill the offscreen bitmap with the transparent color (which you're
probably not doing currently).
3.  Draw the bitmap resource into the offscreen bitmap.
4.  Set the transparent value on the offscreen bitmap
(BmpGlueSetTransparentValue).

Note that steps 1 and 2 should not be skipped.  It may look like you could
simply make an assumption in step 4 about what the background color
originally was in the offscreen bitmap, and then set the transparent color
to that.  But you don't know if the bitmap you drew uses that color.  So you
might end up accidentally altering the image to be drawn.  Steps 1 and 2
will prevent bugs later on down the road.



"Daniel Gurdan" <[EMAIL PROTECTED]> wrote in message
news:110768@palm-dev-forum...
>
> Hi Ken, hi folks :),
>
> first of all thanks for your answer.
> I`m working on a game, where I have to copy several Bitmaps
> on up the background picture. Some pixels of the foreground
> pictures have to be transparent, of course. That works fine when I
> take those graphics directly from a Bitmap-family resource.
> But I need tons of similar pictures in different colors. That�s why
> I want to modify the resource bitmaps during runtime in an offscreen
> window, then copy them to the screen. But now the originally
> transparent pixels aren�t left out as they should be.
> So, how can I keep  the transparency of the original picture? Any Ideas?
>
> thanx!
> Daniel
>
> > Hi Daniel,
> >
> > I don't know how to set the transparency flag for a bitmap, but I can
> > tell you that sometimes you can work around it.
> >
> > Depending on what you want to do, you can use WinCopyRectangle with the
> > winMask mode to draw "transparent" text on a background, for example.
> >
> > What'd you have in mind?
> >
> > -Ken
> >
> > On Mon, 2003-01-27 at 19:19, Daniel Gurdan wrote:
> > > is there any possibility to create a Version 2-Bitmap during runtime
with
> > > the Bitmap's "hasTransparency"-Flag set?
>
>
>



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

Reply via email to