ImageEn, unit iegdiplus

TIECanvas.DrawLinesPath

TIECanvas.DrawLinesPath


Declaration

procedure DrawLinesPath(Points: TIEDPointArray; ClosePath: Boolean = False); overload;
procedure DrawLinesPath(Points: array of TDPoint; PointFormats: array of TIEPointFormat); overload;


Description

Draw a series of lines using a point array. Set ClosePath to true to make the path a polygon.
The attributes overload allows you to include path commands to create bezier curves, etc.

GDI+ Methods: GdipCreatePath, GdipAddPathLine, GdipDrawPath, GdipDeletePath


Example

var
  pts: TIEDPointArray;
  drawTop, drawRight, drawWidth, drawHeight: Integer;
begin
  ImageEnView1.IEBitmap.Allocate( 1000, 1000, clWhite );

  drawTop    := 100;
  drawRight  := 200;
  drawWidth  := 300;
  drawHeight := 500;

  SetLength( pts, 3 );
  pts[0] := DPoint( drawRight, drawTop );
  pts[1] := DPoint( drawRight + drawWidth, drawTop + drawHeight div 2 );
  pts[2] := DPoint( drawRight, drawTop + drawHeight );

  ImageEnView1.IEBitmap.IECanvas.DrawLinesPath( pts, True );
  ImageEnView1.Update();
end;


See Also

 Polyline
 Polygon
 AdvancedDrawPolyline