function Ellipse(const rec: TRect; steps: integer = 0): TPathD; overload;
function Ellipse(const rec: TRectD; steps: integer = 0): TPathD; overload;
function Ellipse(const rec: TRectD; pendingScale: double): TPathD; overload;
Note: the optional pendingScale parameter indicates likely future scaling of the returned path. This allows the function to anticipate an appropriate degree of precision for curve generation. (Inadequate precision will degrade a curve into an obvious series of straight edges, while excessive precision will degrade rendering performance.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | uses Img32, Img32 . Fmt . PNG, Img32 . Vector, Img32 . Draw; ... var path, path2: TPathD; rec: TRect; img: TImage32; begin img := TImage32 . create( 256 , 256 ); rec := Rect( 10 , 30 , 256 - 10 , 256 - 30 ); path := Ellipse(rec); DrawLine(img1, path, 20 , clNavy32, esPolygon); path := Arc(rec, 90 *Pi/ 180 , 360 *Pi/ 180 ); DrawLine(img1, path, 5 , clYellow32, esRound); img . SaveToFile( 'arc.png' ); img . Free; |
Copyright ©2010-2023 Angus Johnson - Image32 4.8 - Help file built on 17 Jan 2025