AggPas - Anti-Grain Geomertry for Object Pascal

TAgg2D.LineCap(cap)

Description

Changes the current type of stroke (line) ending.

The default value is AGG_CapRound.

Parameters

cap: TAggLineCap [*]

Constant specifying a new value of line cap.

Example

if VG.Attach(Image1.Picture.Bitmap) then begin

  VG.ClearAll(255, 255, 255);

  // Bold line 
  VG.LineWidth(30);

  // Default AGG_CapRound
  VG.Line(40, 40, 180, 40);

  // Change to AGG_CapSquare
  VG.LineCap(AGG_CapSquare);
  VG.Translate(0, 55);

  VG.Line(40, 40, 180, 40);

  // Change to AGG_CapButt
  VG.LineCap(AGG_CapButt);
  VG.Translate(0, 55);

  VG.Line(40, 40, 180, 40);

end;

Screenshot: example