![]() |
![]() |
![]() |
function DrawText(image: TImage32; x, y: double; const text: UnicodeString; fontInfo: TFontInfo = nil; textAlign: TTextAlign = taLeft; textColor: TColor32 = clBlack32; justifySpc: double = 0): TPointD; overload;
function DrawText(image: TImage32; x, y: double; const text: UnicodeString; fontInfo: TFontInfo = nil; textAlign: TTextAlign = taLeft; renderer: TCustomRenderer; justifySpc: double = 0): TPointD; overload;
Most parameters will be self evident. However when fontInfo = nil, then the default font will be used to render the text, and justifySpc allows adjustments to the spacing between words.
uses Image32, Image32_PNG, Image32_Text; ... var img: TImage32; lf: TLogFont; fi: TFontInfo; begin lf := DefaultLogfont; lf.lfFaceName := 'Impact'; lf.lfHeight := -64; fi := GetFontInfo(lf); img := TImage32.Create(280,80); DrawText(img, 20, 60,'Image32', fi); img.SaveToFile('image32_text.png'); img.Free;
![]() |
Copyright ©2019 Angus Johnson - Image32 ver. 1.54 - Documentation last updated on 7-November-2020