Provides means for defining custom pattern from lines and point symbols for rendering polyline layers.
More...
|
void | AddLine (uint Color, float Width, tkDashStyle style) |
| Adds a line segment to the pattern. More...
|
|
LineSegment | AddMarker (tkDefaultPointSymbol Marker) |
| Adds a segment represented by point symbol (marker). More...
|
|
void | Clear () |
| Removes all the line segments from the pattern. More...
|
|
void | Deserialize (string newVal) |
| Restores the state of the line segment from the string. More...
|
|
bool | Draw (IntPtr hdc, float x, float y, int clipWidth, int clipHeight, uint BackColor, byte backAlpha) |
| Draws a line pattern on the specified device context. More...
|
|
bool | DrawVB (int hdc, float x, float y, int clipWidth, int clipHeight, uint BackColor, byte backAlpha) |
| Draws a line pattern on the specified device context. More...
|
|
string | get_ErrorMsg (int ErrorCode) |
| Gets the text description of the specified error code. More...
|
|
LineSegment | get_Line (int Index) |
| Gets the reference to the line segment stored at the specified position in the pattern. More...
|
|
bool | InsertLine (int Index, uint Color, float Width, tkDashStyle style) |
| Inserts line definition at the specified position of the pattern. More...
|
|
LineSegment | InsertMarker (int Index, tkDefaultPointSymbol Marker) |
| Insert marker definition on the pattern at the specified position. More...
|
|
bool | RemoveItem (int Index) |
| Removes a segment stored at the specified position of the pattern. More...
|
|
string | Serialize () |
| Saves the state of the object to the string. More...
|
|
void | set_Line (int Index, LineSegment retval) |
| Changes line segment at the specified position to the new one. More...
|
|
|
int | Count [get] |
| Returns the number of all segments in the pattern. More...
|
|
ICallback | GlobalCallback [get, set] |
| Gets or sets the global callback object which is used for passing to the client the information about the progress of time consuming tasks and errors. More...
|
|
string | Key [get, set] |
| Gets or sets a string value associated with the instance of the class. It can store any information provided developer. More...
|
|
int | LastErrorCode [get] |
| Retrieves the numeric code of the last error that took place in the class. More...
|
|
byte | Transparency [get, set] |
| Gets or sets the transparency of the line pattern. The value ranges from 0(opaque) to 255(transparent). More...
|
|
Provides means for defining custom pattern from lines and point symbols for rendering polyline layers.
The line pattern consists of line segments which can be representing by lines of various style, width and color or by markers. Line segments are drawn one atop of the other in the sequence defined in the line pattern.
Here is a diagram for the LinePattern class.
Graph description
- New API 4.8:
- Added in version 4.8
- Examples
- IntersectionLength.cs, LinePattern.cs, and Tracking.cs.
◆ AddLine()
void LinePattern.AddLine |
( |
uint |
Color, |
|
|
float |
Width, |
|
|
tkDashStyle |
style |
|
) |
| |
◆ AddMarker()
Adds a segment represented by point symbol (marker).
- Parameters
-
Marker | The type of the marker. |
- Returns
- Reference to the newly added segment or NULL reference on failure.
- Examples
- LinePattern.cs.
◆ Clear()
void LinePattern.Clear |
( |
| ) |
|
Removes all the line segments from the pattern.
◆ Deserialize()
void LinePattern.Deserialize |
( |
string |
newVal | ) |
|
Restores the state of the line segment from the string.
- Parameters
-
◆ Draw()
bool LinePattern.Draw |
( |
IntPtr |
hdc, |
|
|
float |
x, |
|
|
float |
y, |
|
|
int |
clipWidth, |
|
|
int |
clipHeight, |
|
|
uint |
BackColor, |
|
|
byte |
backAlpha |
|
) |
| |
Draws a line pattern on the specified device context.
The method can be used to draw map legend.
- Parameters
-
hdc | The handle of the device context. |
x | The x coordinate of the upper left corner of the drawing. |
y | The y coordinate of the upper left corner of the drawing. |
clipWidth | The width of the clipping rectangle. |
clipHeight | The height of the clipping rectangle. |
BackColor | The back color of the device context the drawing is performed at. The value should be specified to ensure correct blending when semi-transparent colors are used. |
backAlpha | The alpha component of the back color of the device context the drawing is performed at. Specify a value of 255 for the background color to be fully opaque, and 0 for the background to be transparent. |
- Returns
- True on successful drawing and false on failure.
◆ DrawVB()
bool LinePattern.DrawVB |
( |
int |
hdc, |
|
|
float |
x, |
|
|
float |
y, |
|
|
int |
clipWidth, |
|
|
int |
clipHeight, |
|
|
uint |
BackColor, |
|
|
byte |
backAlpha |
|
) |
| |
Draws a line pattern on the specified device context.
The method can be used to draw map legend.
- Parameters
-
hdc | The handle of the device context. |
x | The x coordinate of the upper left corner of the drawing. |
y | The y coordinate of the upper left corner of the drawing. |
clipWidth | The width of the clipping rectangle. |
clipHeight | The height of the clipping rectangle. |
BackColor | The back color of the device context the drawing is performed at. The value should be specified to ensure correct blending when semi-transparent colors are used. |
backAlpha | The alpha component of the back color of the device context the drawing is performed at. Specify a value of 255 for the background color to be fully opaque, and 0 for the background to be transparent. |
- Returns
- True on successful drawing and false on failure.
◆ get_ErrorMsg()
string LinePattern.get_ErrorMsg |
( |
int |
ErrorCode | ) |
|
Gets the text description of the specified error code.
- Parameters
-
- Returns
- The description of the error.
◆ get_Line()
Gets the reference to the line segment stored at the specified position in the pattern.
- Parameters
-
Index | The index of the segment. |
- Returns
- The reference to the line segment or NULL reference on failure.
◆ InsertLine()
bool LinePattern.InsertLine |
( |
int |
Index, |
|
|
uint |
Color, |
|
|
float |
Width, |
|
|
tkDashStyle |
style |
|
) |
| |
Inserts line definition at the specified position of the pattern.
- Parameters
-
Index | The index to insert the new line segment at. |
Color | The color of the line. |
Width | The width of the line. |
style | The style of the line. |
- Returns
- True on success and false otherwise.
◆ InsertMarker()
Insert marker definition on the pattern at the specified position.
- Parameters
-
Index | The index to insert the new segment at. |
Marker | The type of marker. |
- Returns
- True on success and false otherwise.
◆ RemoveItem()
bool LinePattern.RemoveItem |
( |
int |
Index | ) |
|
Removes a segment stored at the specified position of the pattern.
- Parameters
-
Index | The position to remove the segment at. |
- Returns
- True on success and false otherwise.
◆ Serialize()
string LinePattern.Serialize |
( |
| ) |
|
Saves the state of the object to the string.
- Returns
- A string with serialized state.
◆ set_Line()
void LinePattern.set_Line |
( |
int |
Index, |
|
|
LineSegment |
retval |
|
) |
| |
Changes line segment at the specified position to the new one.
- Parameters
-
Index | The index of segment. |
retval | The reference to the new segment. |
◆ Count
Returns the number of all segments in the pattern.
◆ GlobalCallback
Gets or sets the global callback object which is used for passing to the client the information about the progress of time consuming tasks and errors.
An instance of the class which implements ICallback interface should be passed. The class should be implemented by caller.
- Deprecated:
- v4.9.3 Use GlobalSettings.ApplicationCallback instead.
◆ Key
Gets or sets a string value associated with the instance of the class. It can store any information provided developer.
◆ LastErrorCode
int LinePattern.LastErrorCode |
|
get |
Retrieves the numeric code of the last error that took place in the class.
The usage of this property clears the error code.
◆ Transparency
byte LinePattern.Transparency |
|
getset |
Gets or sets the transparency of the line pattern. The value ranges from 0(opaque) to 255(transparent).
The default value is 255. The setting affects the drawing of both lines and markers.