Declaration ​
pascal
procedure DashLineFS(Bitmap: TCustomBitmap32; const Points: TArrayOfFloatPoint; const Dashes: TArrayOfFloat; Color: TColor32; Closed: Boolean = False; Width: TFloat = 1.0); overload;
procedure DashLineFS(Bitmap: TCustomBitmap32; const Points: TArrayOfFloatPoint; const Dashes: TArrayOfFloat; FillColor, StrokeColor: TColor32; Closed: Boolean; Width: TFloat; StrokeWidth: TFloat = 2.0); overload;
procedure DashLineFS(Bitmap: TCustomBitmap32; const Points: TArrayOfFloatPoint; const Dashes: TArrayOfFloat; Filler: TCustomPolygonFiller; Closed: Boolean = False; Width: TFloat = 1.0); overload;
procedure DashLineFS(Bitmap: TCustomBitmap32; const Points: TArrayOfFloatPoint; const Dashes: TArrayOfFloat; Filler: TCustomPolygonFiller; StrokeColor: TColor32; Closed: Boolean; Width: TFloat; StrokeWidth: TFloat = 2.0); overload;
procedure DashLineXS(Bitmap: TCustomBitmap32; const Points: TArrayOfFixedPoint; const Dashes: TArrayOfFixed; Color: TColor32; Closed: Boolean = False; Width: TFixed = $10000); overload;
procedure DashLineXS(Bitmap: TCustomBitmap32; const Points: TArrayOfFixedPoint; const Dashes: TArrayOfFixed; FillColor, StrokeColor: TColor32; Closed: Boolean; Width: TFixed; StrokeWidth: TFixed = $20000); overload;
procedure DashLineXS(Bitmap: TCustomBitmap32; const Points: TArrayOfFixedPoint; const Dashes: TArrayOfFixed; Filler: TCustomPolygonFiller; Closed: Boolean = False; Width: TFixed = $10000); overload;
procedure DashLineXS(Bitmap: TCustomBitmap32; const Points: TArrayOfFixedPoint; const Dashes: TArrayOfFixed; Filler: TCustomPolygonFiller; StrokeColor: TColor32; Closed: Boolean; Width: TFixed; StrokeWidth: TFixed = $20000); overload;Parameters ​
| Parameter | Type | Description |
|---|---|---|
Bitmap | TCustomBitmap32 | Destination bitmap. |
Points | - | Polyline vertices. |
Dashes | - | Array of dash and gap lengths. |
Color | TColor32 | Solid dash fill color. |
FillColor | TColor32 | Inner dash fill color. |
StrokeColor | TColor32 | Outer stroke outline color. |
Filler | TCustomPolygonFiller | Custom span filler. |
Closed | Boolean | Specifies whether the polyline forms a closed loop. |
Width | - | Dash segment width. |
StrokeWidth | - | Outer stroke outline width. |
Description ​
The DashLine routines break input polyline paths into dashed segment patterns specified by Dashes and render them onto Bitmap.
Function variants support floating-point (FS) and fixed-point (XS) coordinate inputs, single solid color fills, dual fill and stroke outline colors, or custom span fillers with outline stroke options.
Variants ​
| Variant | Coordinate Type | Description |
|---|---|---|
DashLineFS | Floating-point | Renders dashed polylines using floating-point coordinates and dash lengths. |
DashLineXS | Fixed-point | Renders dashed polylines using fixed-point coordinates and dash lengths. |
Example ​
pascal
var
Pts: TArrayOfFloatPoint;
Pattern: TArrayOfFloat;
begin
SetLength(Pts, 2);
Pts[0] := FloatPoint(10.0, 50.0);
Pts[1] := FloatPoint(200.0, 50.0);
// Dash pattern: 10px dash, 5px space
SetLength(Pattern, 2);
Pattern[0] := 10.0;
Pattern[1] := 5.0;
// Render dashed line
DashLineFS(Bitmap, Pts, Pattern, clBlack32, False, 2.0);
end;