[lazarus] Bitmap transparency?

Micha Nelissen M.Nelissen at student.tue.nl
Sat Nov 8 11:51:03 EST 2003


Andrew Johnson wrote:

> On Sat, 2003-11-08 at 10:56, Micha Nelissen wrote:
> 
>>Big *sigh*. Turns out that StretchBlt is implemented with transparency 
>>support in gtk. Really, these extensions need to be documented in 
>>TInterfaceObject. How else can we EVER expect to get other (like qt) 
>>interfaces working? The win32 api is at least documented in msdn.
> 
> 
> oh. hum. this is not an extension to the routine.
> 
> that is because of pixmaps. pixmaps natively have a mask, bi-level
> bitmask. Win32 on the other hand uses bitmap which has no such thing.
> Thus native format on windows has no need for transparency in the
> stretch routine, which is why in Delphi they have to have special
> functions etc to handle it.
> 
> AKA this is because in gtk+ the alpha support is in the backend level,
> in win32 it must be on the LCL/App level, or with a special function in
> the backend.
> 
> This isn't a matter of what the function does so much as what the format
> is. If pixmap didn't natively support alpha via a bitmask, then the
> routine wouldn't handle it. :)

Yes, but the LCL depends on this 'native' pixmap support for 
transparency. If one takes the win32api as api (StretchBlt), then from a 
win32 POV it seems an extension on which there is a dependency. Said 
another way, if StretchBlt does not support transparency, which it does 
not for win32, the LCL does not work correctly. Which is what I am 
experiencing.

Do you have any tips how to make a transparency mask so I can implement 
the necessary behaviour?

Micha.







More information about the Lazarus mailing list