procedure PolylineD(Points: array of TDPoint; PolylineClosed: Boolean = False);
Description
Draw a series of joined lines specified by multiple points.
If PolylineClosed = True, then it performs a PolygonD
Note: ◼For a TPoint version use, Polyline ◼For advanced polygon drawing, use AdvancedDrawPolyline ◼You can create multiple polylines by specifying a break of point($FFFFF, $FFFFF), or point($FFFEE, $FFFEE) if the break should close the polygon (i.e. with PolylineClosed=False, you can optionally close polylines)
// Draw a 5-pointed star var pp: array[0..10] of TDPoint; begin ImageEnView1.IEBitmap.IECanvas.Pen.Color := clOrangeRed; ImageEnView1.IEBitmap.IECanvas.Pen.Width := 3;
// Draw an arrow at the end of a line that runs from x1, y1 to x2, y2 procedure IEDrawLineArrow(Canvas: TIECanvas; x1, y1, x2, y2: integer; w, h: integer); const A90 = PI / 2; var aa, bb, hw: double; pp: array[0..2] of TPoint; p1x, p1y: integer; begin with Canvas do begin hw := w / 2; aa := IEAngle(x1, y1, x2, y2, x1, y2); if x1 = x2 then if y1 < y2 then aa := -A90 else aa := A90; if ((x1 > x2) and (y2 < y1)) or ((x1 < x2) and (y1 < y2)) then bb := 2 * pi - aa + A90 else bb := aa + A90; if ((x2 < x1) and (y2 > y1)) or ((x2 < x1) and (y2 < y1)) or ((x1 < x2) and (y1 = y2)) then begin p1x := x1 + trunc(cos(bb - A90) * h); p1y := y1 + trunc(sin(bb - A90) * h); end else begin p1x := x1 + trunc(cos(bb + A90) * h); p1y := y1 + trunc(sin(bb + A90) * h); end;