function GetTextOutlineOnPath(const text: UnicodeString; const path: TPathD; TFontCache: TFontCache; textAlign: TTextAlign; perpendicOffset: integer = 0; charSpacing: double = 0): TPathsD;
var img2: TImage32; p: TPathD; pp: TPathsD; arialFont: TFontReader; arial20: TFontCache; begin FontManager.Load('Arial', 600); arialFont := FontManager.GetFont('Arial'); arial20 := TFontCache.Create(arialFont, 20); img2 := TImage32.Create(500,460); try p := MakePathD([50,400, 50,50, 450,400, 450,50]); p := FlattenCBezier(p); pp := GetTextOutlineOnPath( 'The quick brown fox jumps over the lazy dog', p, arial20, 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; arial20.Free; //arialFont.Free; //freed by FontManager end;
TFontCache, TTextAlign, TPathsD
Copyright ©2010-2023 Angus Johnson - Image32 4.8 - Help file built on 18 Jan 2025