ImageEn, unit iegdiplus

TIECanvas.DrawLine

TIECanvas.DrawLine


Declaration

procedure DrawLine(X1, Y1, X2, Y2: double);


Description

Draw a line between two points.

Note:
Same as using combined MoveTo and LineTo calls
For advanced line drawing (with labels and pointers), use AdvancedDrawLine

GDI+ Method: GdipDrawLine


Example

// Draw an envelope with 50% transparency
with ImageEnView1.IEBitmap.IECanvas do
begin
  Pen.Mode  := pmCopy;
  Pen.Style := psSolid;
  Pen.Color := clBlack;
  Pen.Transparency := 128;

  Brush.Color := clYellow;
  Brush.Style := bsSolid;
  Brush.Transparency := 128;

  // Draw outer rect
  Rectangle( 100, 100, 500, 300 );

  // Draw flap
  DrawLine( 100, 100, 300, 200 );
  DrawLine( 300, 200, 500, 100 );
end;
ImageEnView1.Update();