On Sun, 16 Oct 2005 17:58:37 -0200
Felipe Monteiro de Carvalho <[EMAIL PROTECTED]> wrote:

> > TBitmap.TransparentColor doesn't actually do anything but return the
> > bottom-left pixel of a bitmap. So, in lazarus, it doesn't do anything at
> > all (maybe it should be removed?).
> 
> You should be able to change the transparent color using this property. 
> This is what Delphi does.

If you set it, then it will use the specified color as transparent color
when drawing. In lazarus, images are loaded immediately into a glyph and
mask seperate part. 

It could be useful to implement a .Flatten (remove mask, use
TransparentColor to fill), and a .AddTransparency (uses TransparentColor to
create mask). This could be used cross-platform I guess. The way delphi
TransparentColor/Mode works is not really usable cross-platform.

(BTW: In win32wsbuttons.pp, DrawBitBtnImage does a kind of .Flatten, but
with additional hackery to make it work on both winxp and win32, and it's
written on winapi, so it may not be very useful in LCL).

Micha

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to