How to draw transparent text onto a TBitmap ?



How to draw transparent text onto a TBitmap ?..

Answer / Harikesh Gautam

To draw transparent text onto a TBitmap in Delphi, you can create a TCanvas from the bitmap and set its Transparent property to True. Then, use the TextOut function with an appropriate font color.nnExample:nnprocedure TForm1.DrawTransparentText(Bitmap: TBitmap; Text: string);nvarn Canvas: TCanvas;nbeginn Canvas := TCanvas.Create();n Canvas.Handle := Bitmap.CanvasHandle;n Canvas.Brush.Color := clNone;n Canvas.Font.Color := clBlack;n Canvas.TextOut(0, 0, Text);nend;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Delphi Interview Questions

How to Get a list of valid time zones from windows?

1 Answers  


How to Disable ALT-F4 to prevent form closing

1 Answers  


How to Get bin names from your printer?

1 Answers  


what are the Steps to uninstall and reinstall Delphi 6 ?

1 Answers  


'Cannot Load IDAPI Service Library' error. What does this error mean?

1 Answers  


How to Send an image to the printer ?

1 Answers  


How to move Client Objects to a different AS/400?

1 Answers  


Can I use DLLs developed in C or C++ from Delphi?

1 Answers  


"Cannot load IDAPI service library" . what does this error mean?

1 Answers  


What are IDAPI and SQL links ?

1 Answers  


How to close your application using the Escape key?

1 Answers  


How to Use the WinApi GetObject to get a bitmap?

1 Answers  


Categories