// Draw and fill the path var G: tgpgraphics; Path: tgpgraphicspath; P: tgppen; SB: tgpsolidbrush; begin G: = tgpgraphics. create (canvas. handle); P: = tgppen. create (makecolor (128,255,), 4); SB: = tgpsolidbrush. create (makecolor (128,255,255, 0); Path: = tgpgraphicspath. create; Path. startfigure; Path. addline (makepoint (11,11), makepoint (222,111); Path. addbesuppliers (makepoint (33,111), makepoint (111,111), makepoint (), makepoint (); Path. closefigure; G. drawpath (p, PATH); G. fillpath (SB, PATH); p. free; sb. free; Path. free; G. free; end;
// The inflection point in the path is combined with var g: tgpgraphics; P: tgppen; Path: tgpgraphicspath; P1, P2, P3: tgppoint; begin G: = tgpgraphics. create (canvas. handle); P: = tgppen. create (makecolor (255, 0, 0,255), 8); Path: = tgpgraphicspath. create; p1.x: = 50; p1.y: = 200; p2.x: = 100; p2.y: = 200; p3.x: = 100; p3.y: = 250; Path. addline (P1, P2); Path. addline (P2, P3); p. setlinejoin (linejoinbevel); {set with style} G. drawpath (p, PATH); Path. free; p. free; G. free; end;
Inflection Point combination style in path:
| Delphi |
Microsoft |
description |
| linejoinbevel |
bevel |
specifies a diagonal join. This produces an angle. |
| linejoinmiter |
miter |
specifies the oblique join. This will generate an acute angle or a cut angle, depending on whether the length of the Oblique join exceeds the limit of the Oblique join. |
| linejoinmiterclipped |
miterclipped |
specifies the oblique join. This produces an acute angle or oblique angle, depending on whether the length of the Oblique link exceeds the oblique link limit. |
| linejoinround |
round |
specifies a circular join. This will generate a smooth arc between the two lines. |