Mega Code Archive

 
Categories / Delphi / Graphic
 

Draw transparent text on canvas

Title: Draw transparent text on canvas Use Brush.Style for the Form.Canvas, if you want to set background color of text like a color of form. And use TextOut, if you want to draw text on the canvas. procedure TForm1.Button1Click(Sender: TObject); begin with Canvas do begin Brush.Style:=bsClear; TextOut(10, 10, 'Hello'); end; end;