Einzelnen Beitrag anzeigen

WojTec

Registriert seit: 17. Mai 2007
482 Beiträge
 
Delphi XE6 Professional
 
#7

Re: Something wrong in text drawing

  Alt 21. Aug 2011, 11:37
Delphi-Quellcode:
begin
  with TBitmap.Create do
  begin
    SetSize(100, 100);

    Canvas.Brush.Color := clWhite;
    Canvas.Pen.Color := clBlack;

    Canvas.FillRect(BoundsRect);

    Canvas.Font.Name := 'Arial';
    Canvas.Font.Size := 36;
    ChangeCleartype(Canvas, False);

    Canvas.TextOut(10, 10, '123'); // Without CT

    Canvas.Font.Size := 20;
    Canvas.TextOut(10, 60, '1234567'); // With CT

    SaveToFile('C:\0.bmp');
  end;
end;
I know!, need to call it before render text and after last setting! Ach.
Is possible to set it permanently for specified font?

Geändert von WojTec (21. Aug 2011 um 11:46 Uhr)
  Mit Zitat antworten Zitat