Link to home
Start Free TrialLog in
Avatar of Asw
Asw

asked on

Tranparent Color

Hi Guy's,

How can I create a transparent color, so that if I have say a white
Picture in an Image I can render the new color over to make it appear blue or red or whatever color I require.

Asw
Avatar of inthe
inthe

Hi
maybe setting the brush style to bsclear; will do it..
ASKER CERTIFIED SOLUTION
Avatar of ZifNab
ZifNab

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Asw

ASKER

Hi Inthe, ZifNab,

Inthe bsClear just makes the canvas clear, not Transparent.

Zif your procedure works for text, but still not Transparent.

What I am doing is drawing a picture on the form canvas.

Then I want to color over the top of the form canvas and change the color of the picture.

Just like laying some transparent colored film over the top of the picture.

Andy
If you draw picture stored in TBitmap, then look at property:

property TransparentColor: TColor;
Determines which color of the bitmap is to be transparent when the bitmap is drawn.

property Transparent:
TTransparentMode; Determines whether the TransparentColor property's value is automatically calculated or stored with the bitmap object.

When TransparentMode is set to tmAuto, the TransparentColor property returns the color of the bottom-leftmost pixel of the bitmap image.  When TransparentMode is set to tmFixed, the TransparentColor property refers to the color stored in the bitmap object.

Exactly from Delphi help;)

Cheers,
Igor.




listening...
Avatar of Asw

ASKER

Hi Zif,

The link you gave me  http://www.undu.com/DN970101/00000022.htm was just what I was looking for.

Many Thanks

Andy
I thought so :-), but wasn't fully sure if this was what you wanted.

Glad you can go further with coding.

see you, Zif.