Skip to content

PositionStyle

Namespace: ThinkGeo.Core

This abstract class encapsulates the labeling position logic. It is inherited by other styles, such as the TextStyle.

public abstract class PositionStyle : Style

Inheritance object → Style → PositionStyle

Remarks:

This abstract class is meant to be inherited by other classes and specialized to meet the needs of various labelers.

Properties

PolygonLabelingLocationMode

This property gets and sets the mode that determines how to locate polygon's labeling

public PolygonLabelingLocationMode PolygonLabelingLocationMode { get; set; }

Property Value

PolygonLabelingLocationMode

        This property gets the mode that determines how to locate polygon's labeling

Remarks:

There are two ways to handle polygon's labeling location. The first is to use polygon's centroid as the labeling location, the second way is to use polygon's boungdingbox center as the labeling location.

MaxNudgingInPixel

Gets or sets the maximum distance (in pixels) labels are nudged when searching for better positions.

public int MaxNudgingInPixel { get; set; }

Property Value

int

NudgingIntervalInPixel

Gets or sets the nudging step size in pixels.

public float NudgingIntervalInPixel { get; set; }

Property Value

float

BestPlacementSymbolWidth

Gets or sets the symbol width used when evaluating best placement candidates.

public float BestPlacementSymbolWidth { get; set; }

Property Value

float

BestPlacementSymbolHeight

Gets or sets the symbol height used when evaluating best placement candidates.

public float BestPlacementSymbolHeight { get; set; }

Property Value

float

AbbreviationDictionary

Gets or sets the dictionary of label text abbreviations.

public Dictionary<string, string> AbbreviationDictionary { get; set; }

Property Value

Dictionary<string, string>

LeaderLineStyle

Gets or sets the style used to draw leader lines when enabled.

public LineStyle LeaderLineStyle { get; set; }

Property Value

LineStyle

LeaderLineRule

Gets or sets the rule that determines whether leader lines are allowed.

public LabelLeaderLinesRule LeaderLineRule { get; set; }

Property Value

LabelLeaderLinesRule

LeaderLineMinimumLengthInPixels

Gets or sets the minimum length, in pixels, required for a leader line to be drawn.

public float LeaderLineMinimumLengthInPixels { get; set; }

Property Value

float

GridSize

This property gets and sets the grid size used for deterministic labeling.

public int GridSize { get; set; }

Property Value

int
This property gets the grid sized used for deterministic labeling.

Remarks:

The grid size determines how many labels will be considered as candidates for drawing. The smaller the grid size, the higher the density of candidates. Making the grid size too small may have a performance impact.

DuplicateRule

This property gets and sets the rule that determines how duplicate labels are handled.

public LabelDuplicateRule DuplicateRule { get; set; }

Property Value

LabelDuplicateRule

        This property gets the rule that determines how duplicate labels are

Remarks:

There are three ways to handle duplicate label names. The first is to suppress all duplicates, which means if there are two street segments with the same name then only one will be drawn. The second way is to suppress duplicate labels only if they are in one quarter of the screen. In this way, the screen will be divided into four quadrants, and if the two duplicate labels are in different quadrants, then they will both draw. The last way is to draw all duplicates.

OverlappingRule

This property gets and sets the rule that determines how overlapping labels are handled.

public LabelOverlappingRule OverlappingRule { get; set; }

Property Value

LabelOverlappingRule
This property gets the rule that determines overlapping labels are handled.

Remarks:

This defines the rules for label overlapping. Currently, either we allow overlapping or we do not. In the future, we may extend this to allow some percentage of partial overlapping.

AllowLabelNudging

Gets or sets a value indicating whether the label engine may nudge labels to avoid overlaps.

public bool AllowLabelNudging { get; set; }

Property Value

bool

AllowLineCarriage

This property gets and sets whether the labeler will allow carriage returns to be inserted.

public bool AllowLineCarriage { get; set; }

Property Value

bool

        This property gets whether the labeler will allow carriage returns to be

Remarks:

This property enables the labeler to split long labels into multiple lines if need be. For instance, if you have a lake whose name is "Southern Homestead Lake," then the labeler may try and break the name onto multiple lines in order to better label the feature.

SuppressPartialLabels

This property gets and sets whether a partial label in the current extent will be drawn or not.

public bool SuppressPartialLabels { get; set; }

Property Value

bool

Remarks:

This property provides a solution to the "cut off" label issue in Map Suite Web Edition and Desktop Edition, which occurs when multiple tiles exist. When you set this property to true, any labels outside of the current extent will not be drawn.

ForceLineCarriage

This property gets and sets whether the labeler will force carriage returns to be inserted.

public bool ForceLineCarriage { get; set; }

Property Value

bool

        This property gets whether the labeler will force carriage returns to be

Remarks:

This property forces the labeler to split long labels into multiple lines. For instance, if you have a lake whose name is "Southern Homestead Lake," then the labeler will break the name onto multiple lines in order to better label the feature.

FittingPolygon

This property gets and sets whether the labeler will try to fit the label as best as it can within the boundary of a polygon.

public bool FittingPolygon { get; set; }

Property Value

bool

        This property gets whether the labeler will try to fit the label as best as

Remarks:

None

LabelAllPolygonParts

This property gets and sets whether the labeler will label every part of a multi-part polygon.

public bool LabelAllPolygonParts { get; set; }

Property Value

bool

        This property gets whether the labeler will label every part of a multi-part

Remarks:

In some cases, you may want to label all of the parts of a multi-part polygon, while in other cases you may not. For example, you may have a series of lakes where you do want to label each polygon. In another case, you may have a country with many small islands and in this case you only want to label the largest polygon.

LabelAllLineParts

This property gets and sets whether the labeler will label every part of a multi-part line.

public bool LabelAllLineParts { get; set; }

Property Value

bool

        This property gets whether the labeler will label every part of a multi-part

Remarks:

In some cases, you may want to label all of the parts of a multi-part line, while in other cases you may not.

FittingPolygonFactor

This property gets and sets the factor to which it will keep the label inside of the polygon.

public double FittingPolygonFactor { get; set; }

Property Value

double

        This property gets the factor to which it will keep the label inside of the
        polygon.

Remarks:

None

TextLineSegmentRatio

This property gets and sets the ratio required for the label length to match the line length.

public double TextLineSegmentRatio { get; set; }

Property Value

double

        This property gets the ratio required for the label length to match the line
        length.

Remarks:

This allows you to suppress labels where the label length would greatly exceed the line length. For example, if you set the ratio to 1, then the label will be suppressed if it is longer than the line. If the ratio is lower, then the label would need to be shorter than the line. If higher, then the label is allowed to run past the length of the line. This allows you to control the look of things like road labeling.

TextPlacement

This property gets and sets the location of the label for point features relative to the point.

public TextPlacement TextPlacement { get; set; }

Property Value

TextPlacement

        This property gets the location of the label for point features relative to the
        point.

Remarks:

This property allows you to choose where the labels are created relative to the point. For example, you can set the property to RightCenter, which would ensure that all labels are placed to the right of and vertically centered with the point. Different kinds of point layers can be positioned differently. If the point layer is dense and position is not a main concern, then you can try the BestPlacement property. That property overrides this property and tries to fit the label in the best location so that the minimum number of labels are suppressed due to overlapping issues.

MaskType

Gets or sets the mask shape used when rendering labels.

public MaskType MaskType { get; set; }

Property Value

MaskType

OffsetFromLine

Gets or sets the pixel offset used to nudge labels away from the line they follow. Positive values move text to the left of the line direction; negative values move it to the right.

public float OffsetFromLine { get; set; }

Property Value

float

TextContent

This property gives you the option to customize the labeling by using one or more columns. For example supposing I have 2 columns "ColumnA" and "ColumnB" with the values of "ValueA" and "ValueB", by setting this property to "{ColumnA} - {ColumnB}", it will draw "ValueA - ValueB" for the corresponding feature. If ColumnB doesn't exist, it will show "ValueA - "

public string TextContent { get; set; }

Property Value

string

MaxAdjacentCharDeltaAngle

Gets or sets the MaxAdjacentCharDeltaAngle.

public double MaxAdjacentCharDeltaAngle { get; set; }

Property Value

double

Name

This property gets and set the name of the style.

public string Name { get; set; }

Property Value

string
This property gets the name of the style.

Remarks:

This name is not used by the system; it is only for the developer. However, it can be used if you generate your own legend.

IsActive

This property gets and sets the active status of the style.

public bool IsActive { get; set; }

Property Value

bool
This property gets the active status of the style.

Remarks:

If the style is not active then it will not draw.

RequiredColumnNames

This property gets the collection of fields that are required for the style.

public Collection<string> RequiredColumnNames { get; }

Property Value

Collection<string>

Remarks:

This property gets the collection of fields that are required for the style. These are in addition to any other columns you specify in styles that inherit from this one. For example, if you have use a ValueStyle and it requires a column name for the value comparison, then that column does not need to be in this collection. You only use the RequiredColumnNames for columns you need beyond those required by specific inherited styles.

Filters

Gets the list of SQL-style filters applied to this style.

public Collection<string> Filters { get; }

Property Value

Collection<string>

LabelDisplayMode

Gets the current label display mode that determines whether labels, shapes, or both are rendered.

public LabelDisplayMode LabelDisplayMode { get; }

Property Value

LabelDisplayMode

Methods

DrawMask(LabelingCandidate, GeoCanvas, Collection<SimpleCandidate>, Collection<SimpleCandidate>)

Draws mask.

protected void DrawMask(LabelingCandidate labelingCandidate, GeoCanvas canvas, Collection<SimpleCandidate> labelsInThisLayer, Collection<SimpleCandidate> labelsInAllLayers)

Parameters

labelingCandidate LabelingCandidate
The labeling candidate.

canvas GeoCanvas
The to draw to.

labelsInThisLayer Collection<SimpleCandidate>
The labels in this layer.

labelsInAllLayers Collection<SimpleCandidate>
A shared collection that receives label candidates generated during drawing.

Returns

void

DrawCore(IEnumerable<Feature>, GeoCanvas, Collection<SimpleCandidate>, Collection<SimpleCandidate>)

This method draws the features on the view you provided.

protected void DrawCore(IEnumerable<Feature> features, GeoCanvas canvas, Collection<SimpleCandidate> labelsInThisLayer, Collection<SimpleCandidate> labelsInAllLayers)

Parameters

features IEnumerable<Feature>
This parameter represents the features you want to draw on the view.

canvas GeoCanvas
This parameter represents the view you want to draw the features on.

labelsInThisLayer Collection<SimpleCandidate>
The labels will be drawn in the current layer only.

labelsInAllLayers Collection<SimpleCandidate>
The labels will be drawn in all layers.

Returns

void
None

Exceptions

InvalidOperationException
In the event you attempt to call this method when the GeoCanvas's IsDrawing mode is false, it will throw an InvalidOperationException.

ArgumentNullException
If you pass a null as the view, we will throw an ArgumentNullException.

ArgumentNullException
If you pass a null as the features, we will throw an ArgumentNullException.

Remarks:

This overridden method is called from the concrete public method Draw. In this method, we take the features you passed in and draw them on the view you provided. Each style (based on its properties) may draw each feature differently.

When overriding this method, consider each feature and its column data values. You can use the full power of the GeoCanvas to do the drawing. If you need column data for a feature, be sure to override the GetRequiredColumnNamesCore and add the columns you need to the collection. In many of the styles, we add properties to allow the user to specify which field they need; then, in the GetRequiredColumnNamesCore, we read that property and add it to the collection.

GetRequiredColumnNamesCore()

This method returns the column data for each feature that is required for the style to properly draw.

protected Collection<string> GetRequiredColumnNamesCore()

Returns

Collection<string>
This method returns a collection of the column names that it needs.

Exceptions

ArgumentNullException
If columnName is null, we will throw an ArgumentNullException.

Remarks:

This abstract method is called from the concrete public method GetRequiredFieldNames. In this method, we return the column names that are required for the style to draw the feature properly. For example, if you have a style that colors areas blue when a certain column value is over 100, then you need to be sure you include that column name. This will ensure that the column data is returned to you in the feature when it is ready to draw.

In many of the styles, we add properties to allow the user to specify which field they need; then, in the GetRequiredColumnNamesCore, we read that property and add it to the collection.

FilterFeatures(IEnumerable<Feature>, GeoCanvas)

This method filters the features based on the grid size to facilitate deterministic labeling.

protected internal IEnumerable<Feature> FilterFeatures(IEnumerable<Feature> features, GeoCanvas canvas)

Parameters

features IEnumerable<Feature>
This parameter represents the features that will be filtered.

canvas GeoCanvas
This parameter is the view that will be used for calculating font sizes.

Returns

IEnumerable<Feature>
This method returns the features that will be considered for labeling.

Remarks:

This method is the concrete wrapper for the abstract method FilterFeaturesCore. In this method, we filter the features based on the grid size to facilitate deterministic labeling.

As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.

FilterFeaturesCore(IEnumerable<Feature>, GeoCanvas)

This method filters the features based on the grid size to facilitate deterministic labeling.

protected IEnumerable<Feature> FilterFeaturesCore(IEnumerable<Feature> features, GeoCanvas canvas)

Parameters

features IEnumerable<Feature>
This parameter represents the features that will be filtered.

canvas GeoCanvas
This parameter is the view that will be used for calculating font sizes.

Returns

IEnumerable<Feature>
This method returns the features that will be considered for labeling.

Remarks:

This overridden method is called from the concrete public method FilterFeatures. In this method, we filter the features based on the grid size to facilitate

AbbreviateText(Feature, GeoCanvas)

Performs abbreviate text.

protected void AbbreviateText(Feature feature, GeoCanvas canvas)

Parameters

feature Feature
The feature.

canvas GeoCanvas
The to draw to.

Returns

void

AbbreviateTextCore(Feature, GeoCanvas)

Provides the overridable implementation that performs abbreviate text.

protected void AbbreviateTextCore(Feature feature, GeoCanvas canvas)

Parameters

feature Feature
The feature.

canvas GeoCanvas
The to draw to.

Returns

void

GetLabelingCandidates(Feature, GeoCanvas, GeoFont, float, float, double)

Returns labeling candidates for the specified parameters.

protected Collection<LabelingCandidate> GetLabelingCandidates(Feature feature, GeoCanvas canvas, GeoFont font, float xOffsetInPixel, float yOffsetInPixel, double rotationAngle)

Parameters

feature Feature
The feature.

canvas GeoCanvas
The to draw to.

font GeoFont
The font.

xOffsetInPixel float
The x offset in pixel.

yOffsetInPixel float
The y offset in pixel.

rotationAngle double
The rotation angle.

Returns

Collection<LabelingCandidate>
The result of the operation.

WrapText(string, GeoFont, GeoCanvas)

Performs wrap text.

public string WrapText(string text, GeoFont font, GeoCanvas canvas)

Parameters

text string
The text.

font GeoFont
The font.

canvas GeoCanvas
The to draw to.

Returns

string
A string result.

GetLabelingCandidates(Feature, string, GeoCanvas, GeoFont, float, float, double)

This method determines whether the specified feature is a good candidate to be labeled, based on the labeling properties set.

protected Collection<LabelingCandidate> GetLabelingCandidates(Feature feature, string text, GeoCanvas canvas, GeoFont font, float xOffsetInPixel, float yOffsetInPixel, double rotationAngle)

Parameters

feature Feature
This parameter is the feature that will be considered as a labeling candidate.

text string
Specifies the text.

canvas GeoCanvas

font GeoFont
Specifies the font.

xOffsetInPixel float
Specifies the xOffsetInPixel.

yOffsetInPixel float
Specifies the yOffsetInPixel.

rotationAngle double
Specifies the rotationAngle.

Returns

Collection<LabelingCandidate>
A collection of labeling candidates.

Remarks:

This method is the concrete wrapper for the abstract method GetLabelingCanidatesCore. This method determines if the feature passed in is a good candidate to be labeled based on the labeling properties set.

As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.

GetLabelingText(Feature, GeoCanvas)

Returns labeling text for the specified parameters.

protected string GetLabelingText(Feature feature, GeoCanvas canvas)

Parameters

feature Feature
The feature.

canvas GeoCanvas
The to draw to.

Returns

string
A string result.

GetLabelingTextCore(Feature, GeoCanvas)

Provides the overridable implementation that returns labeling text for the specified parameters.

protected string GetLabelingTextCore(Feature feature, GeoCanvas canvas)

Parameters

feature Feature
The feature.

canvas GeoCanvas
The to draw to.

Returns

string
A string result.

GetLabelingCandidateCore(Feature, GeoCanvas, GeoFont, float, float, double)

Provides the overridable implementation that returns labeling candidate for the specified parameters.

protected Collection<LabelingCandidate> GetLabelingCandidateCore(Feature feature, GeoCanvas canvas, GeoFont font, float xOffsetInPixel, float yOffsetInPixel, double rotationAngle)

Parameters

feature Feature
The feature.

canvas GeoCanvas
The to draw to.

font GeoFont
The font.

xOffsetInPixel float
The x offset in pixel.

yOffsetInPixel float
The y offset in pixel.

rotationAngle double
The rotation angle.

Returns

Collection<LabelingCandidate>
The result of the operation.

GetLabelingCandidateCore(Feature, string, GeoCanvas, GeoFont, float, float, double)

This method determines whether the specified feature is a good candidate to be labeled, based on the labeling properties set.

protected Collection<LabelingCandidate> GetLabelingCandidateCore(Feature feature, string text, GeoCanvas canvas, GeoFont font, float xOffsetInPixel, float yOffsetInPixel, double rotationAngle)

Parameters

feature Feature
This parameter is the feature that will be considered as a labeling candidate.

text string
Specifies the text.

canvas GeoCanvas

font GeoFont
Specifies the font.

xOffsetInPixel float
Specifies the xOffsetInPixel.

yOffsetInPixel float
Specifies the yOffsetInPixel.

rotationAngle double
Specifies the rotationAngle.

Returns

Collection<LabelingCandidate>
A collection of labeling candidates.

Remarks:

This overridden method is called from the concrete public method GetLabelingCanidate. In this method, we take the feature you passed in and determine if it is a candidate for labeling. If it is, then we will add it to the return collection. The algorithm to determine whether the label will draw is complex and determined by a number of properties and factors.

RjM=(GeoCanvas, string, GeoFont, double, float)

internal static DrawingRectangleF RjM=(GeoCanvas canvas, string text, GeoFont font, double textLetterSpacing, float textLineSpacing)

Parameters

canvas GeoCanvas

text string

font GeoFont

textLetterSpacing double

textLineSpacing float

Returns

DrawingRectangleF

CheckDuplicate(LabelingCandidate, GeoCanvas, Collection<SimpleCandidate>, Collection<SimpleCandidate>)

This method will determine whether the label will be suppressed because it is a duplicate.

protected bool CheckDuplicate(LabelingCandidate labelingCandidate, GeoCanvas canvas, Collection<SimpleCandidate> labelsInThisLayer, Collection<SimpleCandidate> labelsInAllLayers)

Parameters

labelingCandidate LabelingCandidate
This parameter is the labeling candidate that will be checked to determine if it is a

canvas GeoCanvas
This parameter is the view used for calculations.

labelsInThisLayer Collection<SimpleCandidate>
The labels will be drawn in the current layer only.

labelsInAllLayers Collection<SimpleCandidate>
The labels will be drawn in all layers.

Returns

bool
This method returns whether the label will be suppressed as a duplicate.

Remarks:

This method is the concrete wrapper for the abstract method CheckDuplicateCore. This method will determine if the label will be suppressed because it is a duplicate. It also takes into consideration the duplicate rules for the class. So, for example, if we set to allow duplicates, then the method will always return false. If the class is set to not allow duplicates and this label is a duplicate, then it will return true and be suppressed.

As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.

CheckDuplicateCore(LabelingCandidate, GeoCanvas, Collection<SimpleCandidate>, Collection<SimpleCandidate>)

This method will determine if the label will be suppressed because it is a duplicate.

protected bool CheckDuplicateCore(LabelingCandidate labelingCandidate, GeoCanvas canvas, Collection<SimpleCandidate> labelsInThisLayer, Collection<SimpleCandidate> labelsInAllLayers)

Parameters

labelingCandidate LabelingCandidate
This parameter is the labeling candidate that will be checked to determine if it is a

canvas GeoCanvas
This parameter is the view that will be used for calculations.

labelsInThisLayer Collection<SimpleCandidate>
The labels will be drawn in the current layer only.

labelsInAllLayers Collection<SimpleCandidate>
The labels will be drawn in all layers.

Returns

bool
This method returns whether the label will be suppressed as a duplicate.

Remarks:

This overridden method is called from the concrete public method CheckDuplicate. This method will determine if the label will be suppressed because it is a duplicate. It also takes into consideration the duplicate rules for the class. So, for example, if we set to allow duplicates, then the method will always return false. If the class is set to not allow duplicates and this label is a duplicate, then it will return true and be suppressed.

CheckOverlapping(LabelingCandidate, GeoCanvas, GeoFont, float, float, double, Quadtree<SimpleCandidate>)

This method will determine if the label will be suppressed because of overlapping.

protected bool CheckOverlapping(LabelingCandidate labelingCandidate, GeoCanvas canvas, GeoFont font, float xOffsetInPixel, float yOffsetInPixel, double rotationAngle, Quadtree<SimpleCandidate> labelsInAllLayersIndex)

Parameters

labelingCandidate LabelingCandidate
This parameter is the labeling candidate that will be checked to determine if it is

canvas GeoCanvas
This parameter is the view that will be used for calculations.

font GeoFont
Specifies the font.

xOffsetInPixel float
Specifies the xOffsetInPixel.

yOffsetInPixel float
Specifies the yOffsetInPixel.

rotationAngle double
Specifies the rotationAngle.

labelsInAllLayersIndex Quadtree<SimpleCandidate>
Specifies the labelsInAllLayersIndex.

Returns

bool
This method returns whether the label will be suppressed because of overlapping.

Remarks:

This method is the concrete wrapper for the abstract method CheckOverlappingCore. This method will determine if the label will be suppressed because it is overlapping another label. It also takes into consideration the overlapping rules for the class. So, for example, if we set to allow overlap, then the method will always return false. If the class is set to not allow overlap and this label is overlapping, then it will return true and be suppressed.

As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.

CheckOverlappingCore(LabelingCandidate, Quadtree<SimpleCandidate>)

This method will determine whether the label will be suppressed because of overlapping.

protected bool CheckOverlappingCore(LabelingCandidate labelingCandidate, Quadtree<SimpleCandidate> labelIndex)

Parameters

labelingCandidate LabelingCandidate
This parameter is the labeling candidate that will be checked to determine if it is overlapping.

labelIndex Quadtree<SimpleCandidate>
Specifies the labelIndex.

Returns

bool
This method returns whether the label will be suppressed because of overlapping.

Remarks:

This overridden method is called from the concrete public method CheckOverlapping. This method will determine if the label will be suppressed because it is overlapping another label. It also takes into consideration the overlapping rules for the class. So, for example, if we set to allow overlap, then the method will always return false. If the class is set to not allow overlap and this label is overlapping, then it will return true and be suppressed.

CheckOverlapping(LabelingCandidate, GeoCanvas, Collection<SimpleCandidate>, Collection<SimpleCandidate>)

Performs check overlapping.

protected bool CheckOverlapping(LabelingCandidate labelingCandidate, GeoCanvas canvas, Collection<SimpleCandidate> labelsInThisLayer, Collection<SimpleCandidate> labelsInAllLayers)

Parameters

labelingCandidate LabelingCandidate
The labeling candidate.

canvas GeoCanvas
The to draw to.

labelsInThisLayer Collection<SimpleCandidate>
The labels in this layer.

labelsInAllLayers Collection<SimpleCandidate>
A shared collection that receives label candidates generated during drawing.

Returns

bool
True if the condition is met; otherwise, false.

CheckOverlapping(LabelingCandidate, GeoCanvas, GeoFont, float, float, double, Collection<SimpleCandidate>, Collection<SimpleCandidate>)

Performs check overlapping.

protected bool CheckOverlapping(LabelingCandidate labelingCandidate, GeoCanvas canvas, GeoFont font, float xOffsetInPixel, float yOffsetInPixel, double rotationAngle, Collection<SimpleCandidate> labelsInThisLayer, Collection<SimpleCandidate> labelsInAllLayers)

Parameters

labelingCandidate LabelingCandidate
The labeling candidate.

canvas GeoCanvas
The to draw to.

font GeoFont
The font.

xOffsetInPixel float
The x offset in pixel.

yOffsetInPixel float
The y offset in pixel.

rotationAngle double
The rotation angle.

labelsInThisLayer Collection<SimpleCandidate>
The labels in this layer.

labelsInAllLayers Collection<SimpleCandidate>
A shared collection that receives label candidates generated during drawing.

Returns

bool
True if the condition is met; otherwise, false.

CheckOverlappingCore(LabelingCandidate, GeoCanvas, Collection<SimpleCandidate>, Collection<SimpleCandidate>)

Provides the overridable implementation that performs check overlapping.

protected bool CheckOverlappingCore(LabelingCandidate labelingCandidate, GeoCanvas canvas, Collection<SimpleCandidate> labelsInThisLayer, Collection<SimpleCandidate> labelsInAllLayers)

Parameters

labelingCandidate LabelingCandidate
The labeling candidate.

canvas GeoCanvas
The to draw to.

labelsInThisLayer Collection<SimpleCandidate>
The labels in this layer.

labelsInAllLayers Collection<SimpleCandidate>
A shared collection that receives label candidates generated during drawing.

Returns

bool
True if the condition is met; otherwise, false.

ConvertToScreenShape(Feature, GeoCanvas)

This method converts a feature in world coordinates to screen coordinates.

protected static BaseShape ConvertToScreenShape(Feature feature, GeoCanvas canvas)

Parameters

feature Feature
This parameter is the feature to be converted from world coordinates.

canvas GeoCanvas
This parameter is the view that will be used to convert the world coordinate feature to a screen coorindate feature.

Returns

BaseShape
A screen coordinate shape.

Remarks:

This overridden method can be called by this class and its sub concrete classes. In this method, we take the view and the feature in world coordinates and convert it to screen coordinates.

DrawSampleCore(GeoCanvas, DrawingRectangleF)

Provides the overridable implementation that draws sample.

protected void DrawSampleCore(GeoCanvas canvas, DrawingRectangleF drawingExtent)

Parameters

canvas GeoCanvas
The to draw to.

drawingExtent DrawingRectangleF
The drawing extent.

Returns

void

CloneDeepCore()

Provides the overridable implementation that performs clone deep.

protected Style CloneDeepCore()

Returns

Style
The result of the operation.

fDM=(PolygonShape, string, GeoFont, float, float, GeoCanvas, double, double, float)

internal LabelingCandidate fDM=(PolygonShape polygon, string text, GeoFont font, float xOffsetInPixel, float yOffsetInPixel, GeoCanvas canvas, double rotationAngle, double textLetterSpacing, float textLineSpacing)

Parameters

polygon PolygonShape

text string

font GeoFont

xOffsetInPixel float

yOffsetInPixel float

canvas GeoCanvas

rotationAngle double

textLetterSpacing double

textLineSpacing float

Returns

LabelingCandidate

Format(string, BaseShape)

Performs format.

protected string Format(string text, BaseShape labeledShape)

Parameters

text string
The text.

labeledShape BaseShape
The labeled shape.

Returns

string
A string result.

FormatCore(string, BaseShape)

Provides the overridable implementation that performs format.

protected string FormatCore(string text, BaseShape labeledShape)

Parameters

text string
The text.

labeledShape BaseShape
The labeled shape.

Returns

string
A string result.

OnFormatting(FormattingPositionStyleEventArgs)

Performs on formatting.

protected void OnFormatting(FormattingPositionStyleEventArgs e)

Parameters

e FormattingPositionStyleEventArgs
The e.

Returns

void

OnFormatted(FormattedPositionStyleEventArgs)

Performs on formatted.

protected void OnFormatted(FormattedPositionStyleEventArgs e)

Parameters

e FormattedPositionStyleEventArgs
The e.

Returns

void

ljM=(LabelingCandidate, GeoCanvas, Collection<SimpleCandidate>, Quadtree<SimpleCandidate>, Collection<SimpleCandidate>)

internal void ljM=(LabelingCandidate labelingCandidate, GeoCanvas canvas, Collection<SimpleCandidate> labelsInThisLayer, Quadtree<SimpleCandidate> labelsIndex, Collection<SimpleCandidate> labelsInAllLayers)

Parameters

labelingCandidate LabelingCandidate

canvas GeoCanvas

labelsInThisLayer Collection<SimpleCandidate>

labelsIndex Quadtree<SimpleCandidate>

labelsInAllLayers Collection<SimpleCandidate>

Returns

void

DrawTextCore(GeoCanvas, Feature, PolygonShape, string, GeoFont, GeoBrush, GeoPen, IEnumerable<ScreenPointF>, DrawingLevel, float, float, DrawingTextAlignment, float)

Provides the overridable implementation that draws text.

protected void DrawTextCore(GeoCanvas canvas, Feature feature, PolygonShape screenArea, string text, GeoFont font, GeoBrush fillBrush, GeoPen haloPen, IEnumerable<ScreenPointF> textPathInScreen, DrawingLevel drawingLevel, float xOffset, float yOffset, DrawingTextAlignment drawingTextAlignment, float rotateAngle)

Parameters

canvas GeoCanvas
The to draw to.

feature Feature
The feature.

screenArea PolygonShape
The screen area.

text string
The text.

font GeoFont
The font.

fillBrush GeoBrush
The brush used to fill interiors.

haloPen GeoPen
The pen used to draw outlines and strokes.

textPathInScreen IEnumerable<ScreenPointF>
The text path in screen.

drawingLevel DrawingLevel
The drawing level used for compositing and buffering.

xOffset float
The horizontal offset, in pixels, applied when drawing.

yOffset float
The vertical offset, in pixels, applied when drawing.

drawingTextAlignment DrawingTextAlignment
The drawing text alignment.

rotateAngle float
The rotation angle, in degrees.

Returns

void

mjM=(IEnumerable<Feature>, GeoCanvas)

internal IEnumerable<LabelingCandidate> mjM=(IEnumerable<Feature> features, GeoCanvas canvas)

Parameters

features IEnumerable<Feature>

canvas GeoCanvas

Returns

IEnumerable<LabelingCandidate>

Events

Formatting

Occurs when the Formatting event is raised.

public event EventHandler<FormattingPositionStyleEventArgs> Formatting;

Formatted

Occurs when the Formatted event is raised.

public event EventHandler<FormattedPositionStyleEventArgs> Formatted;