![]() |
![]() |
![]() |
function GetTextGlyphsOnPath(const text: UnicodeString; const path: TPathD; glyphCache: TGlyphCache; textAlign: TTextAlign; perpendicOffset: integer = 0; charSpacing: double = 0): TPathsD;
var img2: TImage32; p: TPathD; pp: TPathsD; fr: TFontReader; gc: TGlyphCache; begin fr := TFontReader.Create('Arial'); gc := TGlyphCache.Create(fr, 20); img2 := TImage32.Create(500,460); try p := MakePathD([50,400, 50,50, 450,400, 450,50]); p := FlattenCBezier(p); pp := GetTextGlyphsOnPath( 'The quick brown fox jumps over the lazy dog', p, gc, taCenter, 5, 3); img2.Clear(clWhite32); DrawLine(img2, p, 1, clRed32, esButt, jsAuto); DrawPolygon(img2, pp, frNonZero, clBlack32); img2.SaveToFile('c:\temp\tmp.png'); finally img2.free; gc.Free; fr.Free; end;
TPathsD, TGlyphCache, TTextAlign
Copyright ©2019 Angus Johnson - Image32 ver. 1.55 - Documentation last updated on 8-November-2020