Declaration ​
pascal
procedure PolylineFS(Bitmap: TCustomBitmap32; const Points: TArrayOfFloatPoint; Color: TColor32; Closed: Boolean = False; StrokeWidth: TFloat = 1.0; JoinStyle: TJoinStyle = jsMiter; EndStyle: TEndStyle = esButt; MiterLimit: TFloat = 4.0; Transformation: TTransformation = nil); overload;
procedure PolylineFS(Bitmap: TCustomBitmap32; const Points: TArrayOfFloatPoint; Filler: TCustomPolygonFiller; Closed: Boolean = False; StrokeWidth: TFloat = 1.0; JoinStyle: TJoinStyle = jsMiter; EndStyle: TEndStyle = esButt; MiterLimit: TFloat = 4.0; Transformation: TTransformation = nil); overload;
procedure PolylineXS(Bitmap: TCustomBitmap32; const Points: TArrayOfFixedPoint; Color: TColor32; Closed: Boolean = False; StrokeWidth: TFixed = $10000; JoinStyle: TJoinStyle = jsMiter; EndStyle: TEndStyle = esButt; MiterLimit: TFixed = $40000; Transformation: TTransformation = nil); overload;
procedure PolylineXS(Bitmap: TCustomBitmap32; const Points: TArrayOfFixedPoint; Filler: TCustomPolygonFiller; Closed: Boolean = False; StrokeWidth: TFixed = $10000; JoinStyle: TJoinStyle = jsMiter; EndStyle: TEndStyle = esButt; MiterLimit: TFixed = $40000; Transformation: TTransformation = nil); overload;Parameters ​
| Parameter | Type | Description |
|---|---|---|
Bitmap | TCustomBitmap32 | Destination bitmap. |
Points | - | Polyline vertices. |
Color | TColor32 | Solid stroke color. |
Filler | TCustomPolygonFiller | Custom span filler. |
Closed | Boolean | Specifies whether the polyline forms a closed loop. |
StrokeWidth | - | Stroke line width. |
JoinStyle | TJoinStyle | Corner join style (jsMiter, jsBevel, jsRound). |
EndStyle | TEndStyle | Line end cap style (esButt, esSquare, esRound). |
MiterLimit | - | Miter limit ratio before beveling sharp miter joins. |
Transformation | TTransformation | Optional coordinate transformation. |
Description ​
The Polyline routines render a single stroked polyline contour defined by Points onto a destination Bitmap.
Function variants support floating-point (FS) and fixed-point (XS) coordinate inputs as well as solid color or custom span filler rendering. Stroke outlines are generated automatically according to StrokeWidth, JoinStyle, EndStyle, and MiterLimit.
Variants ​
| Variant | Coordinate Type | Description |
|---|---|---|
PolylineFS | Floating-point | Renders a single floating-point polyline contour with antialiased stroke outlines. |
PolylineXS | Fixed-point | Renders a single fixed-point polyline contour with antialiased stroke outlines. |
Example ​
pascal
var
Pts: TArrayOfFloatPoint;
begin
SetLength(Pts, 4);
Pts[0] := FloatPoint(10.0, 10.0);
Pts[1] := FloatPoint(50.0, 80.0);
Pts[2] := FloatPoint(90.0, 20.0);
Pts[3] := FloatPoint(130.0, 90.0);
// Render open polyline with 3.0px width and round caps/joins
PolylineFS(Bitmap, Pts, clBlack32, False, 3.0, jsRound, esRound);
end;