LabelCoverage
Provides methods for populating a region with non-overlapping labels.
Constructors
Properties
Methods
CoincidentLabel
#Test whether a point is on top of one of the labels.
Parameters:
| point (PointF) | Point to test. |
Returns: Index of first label which is coincident with the point.
Draw
#Render all labels in this coverage to a graphics context.
Parameters:
| context (Context) | Graphics context. |
| frame (RectangleF) | Visible limiting frame. |
Inject
#Try to inject an existing label into the coverage.
Parameters:
| label (Label) | Label to inject. |
Returns: True if label was included in the coverage, false if it collided and was rejected.
LocalSpacing
#Compute the local spacing, ie. the distance to the nearest object.
Parameters:
| point (PointF) |
LocalSpacing
#Compute the local spacing, ie. the distance to the nearest object.
Parameters:
| box (RectangleF) |
Returns: Spacing between the specified box and all existing labels.
NearestLabel
#Find the nearest label to a point.
Parameters:
| point (PointF) | Search point. |
| distance (out float) | Distance to nearest label will be returned here. |
Returns: Index of nearest label.
ToBoxArray
#public RectangleF[] ToBoxArray()
Create an array containing all the boxes in this coverage.
Returns: Array of boxes.