[lazarus] Bitmap transparency?

Micha Nelissen M.Nelissen at student.tue.nl
Sun Nov 9 11:07:42 EST 2003


Mattias Gaertner wrote:

> On Sun, 09 Nov 2003 15:08:06 +0100
> Micha Nelissen <M.Nelissen at student.tue.nl> wrote:
> 
> 
>>Mattias Gaertner wrote:
>>
>>
>>>On Sat, 08 Nov 2003 18:15:13 +0100
>>>Marc Weustink <marc at dommelstein.net> wrote:
>>>
>>>
>>>
>>>>>Yes, but the LCL depends on this 'native' pixmap support for
>>>>>transparency.
>>>
>>>
>>>Only in a few cases. And they can be changed easily. In fact, they are
>>>leftovers from days whithout choice.
>>>
>>>Some general notes:
>>>Eventually we will switch to fpImage. This means the LCL won't need
>>>CreatePixmapIndirect anymore. fpImage requires, that the win32 intf
>>>supports the 5 RawImage functions.
>>>Micha, can you implement them?
>>
>>I have been looking, but I can't find it in the archives / code: what 
>>functions do I need to implement?
> 
> 
> See winapih.inc, search for RawImage.
> See graphtype.pp for the RawImage format. 
> intfgraphics.pas contains the TLazIntfImage which uses the 5 functions.
> 
> I suggest you start with
> GetBitmapRawImageDescription
> then
> GetRawImageFromBitmap
> then
> CreateBitmapFromRawImage
> then the other two.

function GetRawImageFromBitmap(SrcBitmap, SrcMaskBitmap: HDC; const 
SrcRect: TRect; var NewRawImage: TRawImage): boolean; {$IFDEF 
IF_BASE_MEMBER}virtual;{$ENDIF}

Shouldn't those HDC's be HBITMAP's?

BTW: HBITMAP's don't know anything about their palette in win32. I know 
palettes are not supported yet, but how should I work with it? Ie. I 
must fill the ImageDescription with something.

Regards,

Micha.







More information about the Lazarus mailing list