Vertical text (or at any angle)  

Send By: Q3 Team
Web : http://www.q3.nu
Email: dlib@q3.nu
Date: 21/01/00

Tip accessed 458 times

 


An example so that you have something to test:


 procedure TForm1.Button1Click(Sender: TObject);
 var
   Hfont: Thandle;
   logfont:TLogFont;
   font: Thandle;
   count: integer;
 begin
   LogFont.lfheight:=30;
   logfont.lfwidth:=10;
   logfont.lfweight:=900;
   {Angulo * 10}
   LogFont.lfEscapement:=-450;
   logfont.lfcharset:=1;
   logfont.lfoutprecision:=out_tt_precis;
   logfont.lfquality:=draft_quality;
   logfont.lfpitchandfamily:=FF_Modern;

   font:=createfontindirect(logfont);

   Selectobject(Form1.canvas.handle,font);

   SetTextColor(Form1.canvas.handle,rgb(0,0,200));
   SetBKmode(Form1.canvas.handle,transparent);

   for count:=1 to 100 do
     begin
 	 canvas.textout(Random(form1.width),Random(form1.height),'Rotated');
   SetTextColor(form1.canvas.handle,rgb(Random(255),Random(255),Random(255)));
     end;
   deleteobject(font);
 end;