Maptitude GISDK Help |
Creates a new line style.
linestyle = LineStyle(array specification)
Specification element |
Type |
Contents |
1 |
Array |
Parallel components of the line style, where each component is an array as described below |
2 |
Array |
Perpendicular components of the line style, where each component is an array as described below |
3 |
NA |
Cap style; currently ignored |
4 |
NA |
Join style; currently ignored |
5 |
Array |
Font icon components of the line style, where each component is an array as described below |
Parallel components |
Type |
Contents |
1 |
Real |
Width |
2 |
Integer |
Color index (see the notes) |
3 |
Real |
Offset from centerline |
4, 5, ... |
Real |
Dash lengths (alternating on and off, optional) |
Perpendicular components |
Type |
Contents |
1 |
Real |
Width |
2 |
Integer |
Color index (see the notes) |
3 |
Real |
Distance from the start of the line before drawing the component |
4 |
Real |
Frequency (distance between components) |
5 |
Real |
X1 |
6 |
Real |
Y1 |
7 |
Real |
X2 |
8 |
Real |
Y2 |
Font icon components |
Type |
Contents |
1 |
String |
Name of the font |
2 |
Double |
Distance from the start of the line before drawing the component |
3 |
Double |
Frequency (distance between components) |
4 |
Double |
Offset from centerline |
5 |
Double |
Rotation angle |
6, ... |
Array |
One array for each glyph of the form {integer index, integer color}, containing the index of the icon in the font and the color index (see the notes) |
A line style.
All sizes and distances are in points.
Passing null for the specification returns the invisible line style.
The specification does not need to include all the elements. You can have one, two, or all five elements.
Passing {{{0, -1, 0}}} returns the solid line style.
Colors indices are 0: Black, 1: White, 2: Red, 3: Green 4: Blue, 5: Light Blue, 6: Yellow, 7: Gray, 8: Dark Gray, 9: Tan, 10: Brown, 11: Gold, 12: Dark Gold, 13: Orange, 14: Dark Orange, 15: Dark Red, 16: Dark Green, 17: Magenta, 18: Purple, or -1 for the underlying color of the line.
A perpendicular component is a line segment drawn from (X1,Y1) to (X2,Y2), beginning after the start distance and repeating based on the frequency. The X coordinates are positions along the line. The Y coordinates are positions across the line, with Y > 0 to the left of the line and Y < 0 to the right of the line.
Width 0 components are drawn using hairlines.
traintracks = LineStyle({{{1, -1, 0}}, {{1, -1, 18, 18, 0, -9, 0, 9}}})
donkeys = LineStyle({,,,, {{"Caliper Miscellaneous", 0, 1.4, 0, 0, {{105, -1}} }}})
Error Type |
Meaning |
Error |
The specification is invalid |
Function |
Summary |
Sets the line style used to draw line features |
|
Gets the style used to draw line features |
|
Returns an array defining the line style |
|
Creates a new fill style |
©2025 Caliper Corporation | www.caliper.com |