public interface ILspLabelingAlgorithm extends ILcdCloneable
This interface can be used to compute placements for labels. It consists of a method to
compute label placements. This method gets a List
of TLspLabelID
s as input, and outputs a List
of TLspLabelPlacement
s, each pointing to its label.
The returned List
of TLcdLabelPlacement
s contains label placements
that are either visible or invisible. When a placement is present in the list, it means that
the location should be stored. When a placement in the list is marked as visible, it means that
its location should be marked as visible in the
label placer
.
Modifier and Type | Interface and Description |
---|---|
static class |
ILspLabelingAlgorithm.LabelContext
This object as passed to
placeLabels and can
be used to retrieve and store 'context' information. |
Modifier and Type | Method and Description |
---|---|
List<TLspLabelPlacement> |
placeLabels(List<TLspLabelID> aLabelIDs,
ILspLabelingAlgorithm.LabelContext aLabelContext,
ILspLabelConflictChecker aConflictChecker,
ILspView aView)
|
clone
List<TLspLabelPlacement> placeLabels(List<TLspLabelID> aLabelIDs, ILspLabelingAlgorithm.LabelContext aLabelContext, ILspLabelConflictChecker aConflictChecker, ILspView aView)
This method computes a list of label placements for the given
List
of labels. The returned label placements
should contain a valid label location and label bounds. They
should also point to their corresponding TLspLabelID
The returned List
of TLspLabelPlacement
s contains label placements
that are either visible or invisible. When a placement is present in the list, it means that
the location should be stored. When a placement in the list is marked as visible, it means that
its location should be marked as visible in the
label placer
aLabelIDs
- the labels to be placed.aLabelContext
- provides context information, such as priorities, PaintState, ...aConflictChecker
- the conflict checker that can be used to detect conflicts between labels.aView
- the view.