Labels positioning

Functions

bool Labels.Select (Extents BoundingBox, int Tolerance, SelectMode SelectMode, ref object LabelIndices, ref object PartIndices)
 Returns the indices of all labels which are displayed in the given part of the map. More...
 

Properties

tkLabelAlignment Labels.Alignment [get, set]
 Sets horizontal and vertical alignment of labels. More...
 
bool Labels.AutoOffset [get, set]
 Turns on or off the auto offset behaviour. More...
 
double Labels.BasicScale [get, set]
 Map scale for which the size of labels will be equal to value set in Labels.FontSize property. More...
 
tkLabelAlignment Labels.InboxAlignment [get, set]
 Gets or sets the value which defines an alignment of text within label's frame. More...
 
tkLineLabelOrientation Labels.LineOrientation [get, set]
 Gets or sets the type of the label's orientation relative to the direction of the labelled shape. More...
 
double Labels.OffsetX [get, set]
 Gets or sets the horizontal offset in pixels which is used to draw labels. More...
 
double Labels.OffsetY [get, set]
 Gets or sets the vertical offset in pixels which is used to draw labels. More...
 
tkLabelPositioning Labels.Positioning [get, set]
 Gets or sets the method of label positioning. More...
 
bool Labels.ScaleLabels [get, set]
 Gets or sets the value which indicates whether the labels will change their size depending upon map scale. The default value is false. More...
 
tkVerticalPosition Labels.VerticalPosition [get, set]
 Gets or sets the value which affects the sequence of labels drawing relative to the map layers. More...
 

Detailed Description

Here is a list of properties and methods which affects alignment, positioning and scale of labels. This module is a part of the documentation of Labels class.

dot_inline_dotgraph_22.png

Graph description

Function Documentation

◆ Select()

bool Labels.Select ( Extents  BoundingBox,
int  Tolerance,
SelectMode  SelectMode,
ref object  LabelIndices,
ref object  PartIndices 
)

Returns the indices of all labels which are displayed in the given part of the map.

This property doesn't change appearance of the labels.

Parameters
BoundingBoxThe bounding box in screen coordinates.
ToleranceThe selection tolerance.
SelectModeThe selection mode.
LabelIndicesAn output array with indices of the labels.
PartIndicesAn output array with indices of parts for each label.
Returns
True in case at least one label fell into selection.
Examples:
LabelSelection.cs.

Properties

◆ Alignment

tkLabelAlignment Labels.Alignment
getset

Sets horizontal and vertical alignment of labels.

Examples:
SplitByAttribute.cs.

◆ AutoOffset

bool Labels.AutoOffset
getset

Turns on or off the auto offset behaviour.

When set to true, Labels.OffsetX and Labels.OffsetY property will be changed automatically according to the size of symbols for parent shape points to avoid overlaps. Applicable for point and multipoint shapefiles only.

◆ BasicScale

double Labels.BasicScale
getset

Map scale for which the size of labels will be equal to value set in Labels.FontSize property.

Applicable only when Label.Scale is set to true.

◆ InboxAlignment

tkLabelAlignment Labels.InboxAlignment
getset

Gets or sets the value which defines an alignment of text within label's frame.

Should be used with multiline labels.

◆ LineOrientation

tkLineLabelOrientation Labels.LineOrientation
getset

Gets or sets the type of the label's orientation relative to the direction of the labelled shape.

Applicable for the instance of the Labels class associated with polyline shapefiles, i.e. obtained by Shapefile.Labels property while Shapefile.ShapefileType is polyline.

◆ OffsetX

double Labels.OffsetX
getset

Gets or sets the horizontal offset in pixels which is used to draw labels.

When labels are subject to the rotation, "horizontal" means "along the text width".

See also
Labels.AutoOffset property

◆ OffsetY

double Labels.OffsetY
getset

Gets or sets the vertical offset in pixels which is used to draw labels.

When labels are subject to rotation "vertical" means "along the text height".

See also
Labels.AutoOffset property

◆ Positioning

tkLabelPositioning Labels.Positioning
getset

Gets or sets the method of label positioning.

◆ ScaleLabels

bool Labels.ScaleLabels
getset

Gets or sets the value which indicates whether the labels will change their size depending upon map scale. The default value is false.

See also
Labels.BasicScale

◆ VerticalPosition

tkVerticalPosition Labels.VerticalPosition
getset

Gets or sets the value which affects the sequence of labels drawing relative to the map layers.

See details in the description of tkVerticalPosition enumeration.