AggPas - Anti-Grain Geomertry for Object Pascal

TAgg2D.LineWidth(w)

Description

Changes the thickness of strokes of objects being drawn. This apply only if stroking is enabled (some color or gradient is defined for lines).

Parameters

w: double

A new width of line (stroke) [in subpixels].

Example

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

  VG.ClearAll(255, 255, 255);

  // Draw lines with increasing width 
  VG.Translate(0, 10);
  VG.LineWidth(0.1);
  VG.Line(30, 10.5, 180, 10.5);

  VG.Translate(0, 10);
  VG.LineWidth(0.5);
  VG.Line(30, 10.5, 180, 10.5);

  VG.Translate(0, 10);
  VG.LineWidth(1);
  VG.Line(30, 10.5, 180, 10.5);

  VG.Translate(0, 10);
  VG.LineWidth(2);
  VG.Line(30, 10.5, 180, 10.5);

  VG.Translate(0, 15);
  VG.LineWidth(5);
  VG.Line(30, 10.5, 180, 10.5);

  VG.Translate(0, 20);
  VG.LineWidth(10);
  VG.Line(30, 10.5, 180, 10.5);

  VG.Translate(0, 30);
  VG.LineWidth(20);
  VG.Line(30, 10.5, 180, 10.5);

  VG.Translate(0, 40);
  VG.LineWidth(40);
  VG.Line(30, 10.5, 180, 10.5);

end;

Screenshot: example