TAgg2D.DrawPath(flag)
Description
Draws a path defined with path commands in one pass, using the selected drawing mode.
Path defined with path commands can be reused for drawing until it's internal storage is utilized for rendering of other basic shapes or text. Also on entry to the drawing routine (after Attach method) a path content is cleared.
Parameters
flag: TAggDrawPathFlag [*] = AGG_FillAndStroke
Constant defining the type of rendering for path.
Example
if VG.Attach(Image1.Picture.Bitmap) then begin VG.ClearAll(255, 255, 255); // 3/4 Red Pie VG.ResetPath; VG.FillColor(255, 0, 0, 100); VG.LineColor(0, 0, 255, 100); VG.LineWidth (2); VG.MoveTo(300 / 2, 200 / 2); VG.HorLineRel(-150 / 2); VG.ArcRel(150 / 2, 150 / 2, 0, true, false, 150 / 2, -150 / 2); VG.ClosePolygon; // Draw path in various rendering modes VG.Translate(-50, 0); VG.DrawPath (AGG_FillAndStroke); VG.Translate(120, 0); VG.DrawPath (AGG_FillOnly); VG.Translate(120, 0); VG.DrawPath (AGG_StrokeOnly); VG.Translate(120, 0); VG.DrawPath (AGG_FillWithLineColor); end;



