Board index » delphi » Writing Text onto a Bitmap

Writing Text onto a Bitmap

I am trying to write some text over a TImage object showing a bitmap. The
problem is that I would like to make the background color of the text be the
background color of the image, or match it as close as possible, so that
only the text itself covers up the image. Any help is appreciated.

TIA

Pete

 

Re:Writing Text onto a Bitmap


Hi

I'm not sure, but, the background of the text is painted with
the color of the brush. So, you just have to set canvas.brush.color
property to the color of your background image.

PMG a crit dans le message <3a864333_1@dnews>...

Quote
>I am trying to write some text over a TImage object showing a bitmap. The
>problem is that I would like to make the background color of the text be
the
>background color of the image, or match it as close as possible, so that
>only the text itself covers up the image. Any help is appreciated.

>TIA

>Pete

Re:Writing Text onto a Bitmap


PMG <pe...@garlic.com> schrieb in im Newsbeitrag: 3a864333_1@dnews...

Quote
> I am trying to write some text over a TImage object showing a bitmap. The
> problem is that I would like to make the background color of the text be
the
> background color of the image, or match it as close as possible, so that
> only the text itself covers up the image. Any help is appreciated.

Tried it with Brush.Style := bsClear before writing your text?

HTH
-- Florian Haag
http://private.addcom.de/haag/fh/

Re:Writing Text onto a Bitmap


Perfect. I think this will work. Thanks very much.

Quote
"Florian Haag" <florianh...@addcom.de> wrote in message

news:3a8654a3_1@dnews...
Quote
> PMG <pe...@garlic.com> schrieb in im Newsbeitrag: 3a864333_1@dnews...
> > I am trying to write some text over a TImage object showing a bitmap.
The
> > problem is that I would like to make the background color of the text be
> the
> > background color of the image, or match it as close as possible, so that
> > only the text itself covers up the image. Any help is appreciated.

> Tried it with Brush.Style := bsClear before writing your text?

> HTH
> -- Florian Haag
> http://private.addcom.de/haag/fh/

Other Threads