LineSegment Class Reference

Holds information about a single line or marker in the line pattern represented by LinePattern class. More...

Collaboration diagram for LineSegment:
Collaboration graph

Public Member Functions

bool Draw (IntPtr hdc, float x, float y, int clipWidth, int clipHeight, uint BackColor, byte backAlpha)
 Draws a line segment 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 segment on the specified device context. More...
 

Properties

uint Color [get, set]
 Gets or sets the color of the line or marker. More...
 
tkDashStyle LineStyle [get, set]
 Gets or sets the style of the line. More...
 
tkLineType LineType [get, set]
 Gets or sets the type of the line segment, either line or marker. More...
 
float LineWidth [get, set]
 Gets or sets the width of the line. More...
 
tkDefaultPointSymbol Marker [get, set]
 Gets or sets the marker for the line segment. More...
 
bool MarkerAllowOVerflow [get, set]
 If enabled, will not offset the markers to make them fit within the bounds of the line. More...
 
bool MarkerFlipFirst [get, set]
 Gets or sets the value which indicates whether the first marker in the line should be rotated by 180 degrees. More...
 
float MarkerInterval [get, set]
 Gets or sets the interval between markers. More...
 
bool MarkerIntervalIsRelative [get, set]
 Gets or sets if the interval between the markers is expressed as a relative fraction of the segment length More...
 
float MarkerOffset [get, set]
 Gets or sets the offset for the marker. More...
 
bool MarkerOffsetIsRelative [get, set]
 Gets or sets if the offset for the marker is expressed as a relative fraction of the segment length More...
 
tkLineLabelOrientation MarkerOrientation [get, set]
 Gets or set the orientation of the marker symbols relative to the polyline. More...
 
uint MarkerOutlineColor [get, set]
 Gets or sets the outline color of the marker. More...
 
float MarkerSize [get, set]
 Gets or sets the size of marker in pixels. More...
 

Detailed Description

Holds information about a single line or marker in the line pattern represented by LinePattern class.

Here is a diagram for the LineSegment class.

dot_inline_dotgraph_50.png

Graph description

New API 4.8:
Added in version 4.8
Examples
LinePattern.cs.

Member Function Documentation

◆ Draw()

bool LineSegment.Draw ( IntPtr  hdc,
float  x,
float  y,
int  clipWidth,
int  clipHeight,
uint  BackColor,
byte  backAlpha 
)

Draws a line segment on the specified device context.

The method can be used to draw map legend.

Parameters
hdcThe handle of the device context.
xThe x coordinate of the upper left corner of the drawing.
yThe y coordinate of the upper left corner of the drawing.
clipWidthThe width of the clipping rectangle.
clipHeightThe height of the clipping rectangle.
BackColorThe 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.
backAlphaThe 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 LineSegment.DrawVB ( int  hdc,
float  x,
float  y,
int  clipWidth,
int  clipHeight,
uint  BackColor,
byte  backAlpha 
)

Draws a line segment on the specified device context.

The method can be used to draw map legend.

Parameters
hdcThe handle of the device context.
xThe x coordinate of the upper left corner of the drawing.
yThe y coordinate of the upper left corner of the drawing.
clipWidthThe width of the clipping rectangle.
clipHeightThe height of the clipping rectangle.
BackColorThe 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.
backAlphaThe 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.

Property Documentation

◆ Color

uint LineSegment.Color
getset

Gets or sets the color of the line or marker.

Examples
LinePattern.cs.

◆ LineStyle

tkDashStyle LineSegment.LineStyle
getset

Gets or sets the style of the line.

◆ LineType

tkLineType LineSegment.LineType
getset

Gets or sets the type of the line segment, either line or marker.

◆ LineWidth

float LineSegment.LineWidth
getset

Gets or sets the width of the line.

◆ Marker

tkDefaultPointSymbol LineSegment.Marker
getset

Gets or sets the marker for the line segment.

◆ MarkerAllowOVerflow

bool LineSegment.MarkerAllowOVerflow
getset

If enabled, will not offset the markers to make them fit within the bounds of the line.

◆ MarkerFlipFirst

bool LineSegment.MarkerFlipFirst
getset

Gets or sets the value which indicates whether the first marker in the line should be rotated by 180 degrees.

◆ MarkerInterval

float LineSegment.MarkerInterval
getset

Gets or sets the interval between markers.

This is either in pixels or as a relative fraction of the segment length as determined by the MarkerIntervalIsRelative flag

Examples
LinePattern.cs.

◆ MarkerIntervalIsRelative

bool LineSegment.MarkerIntervalIsRelative
getset

Gets or sets if the interval between the markers is expressed as a relative fraction of the segment length

◆ MarkerOffset

float LineSegment.MarkerOffset
getset

Gets or sets the offset for the marker.

The first marker will be positioned with offset from the beginning of polyline by this value. This is either in pixels or as a relative fraction of the segment length as determined by the MarkerIntervalIsRelative flag

◆ MarkerOffsetIsRelative

bool LineSegment.MarkerOffsetIsRelative
getset

Gets or sets if the offset for the marker is expressed as a relative fraction of the segment length

◆ MarkerOrientation

tkLineLabelOrientation LineSegment.MarkerOrientation
getset

Gets or set the orientation of the marker symbols relative to the polyline.

◆ MarkerOutlineColor

uint LineSegment.MarkerOutlineColor
getset

Gets or sets the outline color of the marker.

◆ MarkerSize

float LineSegment.MarkerSize
getset

Gets or sets the size of marker in pixels.

Examples
LinePattern.cs.