public class TLcdLabelingUtil extends Object
Modifier and Type | Method and Description |
---|---|
static void |
adjustLabelLocationFromBoundsSFCT(Point aObjectAnchorPoint,
Point aLabelAnchorOffset,
int aUpperLeftX,
int aUpperLeftY,
double aRotation,
TLcdLabelLocation aLabelLocationSFCT)
This method takes a rotated rectangle as input and adjusts the given
TLcdLabelLocation
to describe a position based on these bounds. |
static void |
adjustLabelLocationFromBoundsSFCT(Point aObjectAnchorPoint,
Point aLabelAnchorOffset,
TLcdLabelPlacement aLabelPlacementSFCT)
This method takes a label placement as input and adjusts its
TLcdLabelLocation
to describe a position based on its bounds. |
public static void adjustLabelLocationFromBoundsSFCT(Point aObjectAnchorPoint, Point aLabelAnchorOffset, TLcdLabelPlacement aLabelPlacementSFCT)
TLcdLabelLocation
to describe a position based on its bounds. It does this using free placement
(TLcdLabelLocation.getLocationIndex()
== -1). The resulting TLcdLabelLocation
contains a relative location, i.e. it doesn't use the TLcdLabelLocation.ABSOLUTE_POSITION
flag.
This method needs :
TLcdCollectedLabelInfo.LABEL_ANCHOR_OFFSET_KEY
). This
offset is needed to determine the label anchor point using the upper-left corner of the bounds.TLcdLabelLocation
The resulting TLcdLabelLocation
doesn't contain parent bounds. These need to be
resolved later if needed.
aObjectAnchorPoint
- an anchor point.aLabelAnchorOffset
- a label anchor offset. This offset should be valid for a label
with zero rotation.aLabelPlacementSFCT
- the label placement to adjust.public static void adjustLabelLocationFromBoundsSFCT(Point aObjectAnchorPoint, Point aLabelAnchorOffset, int aUpperLeftX, int aUpperLeftY, double aRotation, TLcdLabelLocation aLabelLocationSFCT)
TLcdLabelLocation
to describe a position based on these bounds. It does this using free placement
(TLcdLabelLocation.getLocationIndex()
== -1). The resulting TLcdLabelLocation
contains a relative location, i.e. it doesn't use the TLcdLabelLocation.ABSOLUTE_POSITION
flag.
This method needs
TLcdCollectedLabelInfo.LABEL_ANCHOR_OFFSET_KEY
). This
offset is needed to determine the label anchor point using the upper-left corner of the bounds.TLcdLabelLocation
The resulting TLcdLabelLocation
doesn't contain parent bounds. These need to be
resolved later if needed.
aObjectAnchorPoint
- an anchor point.aLabelAnchorOffset
- a label anchor offset. This offset should be valid for a label
with zero rotation.aUpperLeftX
- the x-coordinate of the upper-left point of the label bounds in absolute view coordinates.aUpperLeftY
- the y-coordinate of the upper-left point of the label bounds in absolute view coordinates.aRotation
- the label rotation around the upper left corner of the bounds.
In radians, clockwise, 0 radians at 3 'o clock.aLabelLocationSFCT
- the label location to be calculated.