Package com.luciad.view.labeling.util
Class TLcdLabelingUtil
java.lang.Object
com.luciad.view.labeling.util.TLcdLabelingUtil
Utility class for labeling.
- Since:
- 10.1
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidadjustLabelLocationFromBoundsSFCT(Point aObjectAnchorPoint, Point aLabelAnchorOffset, int aUpperLeftX, int aUpperLeftY, double aRotation, TLcdLabelLocation aLabelLocationSFCT) This method takes a rotated rectangle as input and adjusts the givenTLcdLabelLocationto describe a position based on these bounds.static voidadjustLabelLocationFromBoundsSFCT(Point aObjectAnchorPoint, Point aLabelAnchorOffset, TLcdLabelPlacement aLabelPlacementSFCT) This method takes a label placement as input and adjusts itsTLcdLabelLocationto describe a position based on its bounds.
-
Method Details
-
adjustLabelLocationFromBoundsSFCT
public static void adjustLabelLocationFromBoundsSFCT(Point aObjectAnchorPoint, Point aLabelAnchorOffset, TLcdLabelPlacement aLabelPlacementSFCT) This method takes a label placement as input and adjusts itsTLcdLabelLocationto describe a position based on its bounds. It does this using free placement (TLcdLabelLocation.getLocationIndex()== -1). The resultingTLcdLabelLocationcontains a relative location, i.e. it doesn't use theTLcdLabelLocation.ABSOLUTE_POSITIONflag.This method needs :
- a label anchor offset (see
TLcdCollectedLabelInfo.LABEL_ANCHOR_OFFSET_KEY). This offset is needed to determine the label anchor point using the upper-left corner of the bounds. - the object anchor point. The label anchor point is stored relative to the object anchor point
int the
TLcdLabelLocation
The resulting
TLcdLabelLocationdoesn't contain parent bounds. These need to be resolved later if needed.- Parameters:
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.
- a label anchor offset (see
-
adjustLabelLocationFromBoundsSFCT
public 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 givenTLcdLabelLocationto describe a position based on these bounds. It does this using free placement (TLcdLabelLocation.getLocationIndex()== -1). The resultingTLcdLabelLocationcontains a relative location, i.e. it doesn't use theTLcdLabelLocation.ABSOLUTE_POSITIONflag.This method needs
- a label anchor offset (see
TLcdCollectedLabelInfo.LABEL_ANCHOR_OFFSET_KEY). This offset is needed to determine the label anchor point using the upper-left corner of the bounds. - the object anchor point. The label anchor point is stored relative to the object anchor point
int the
TLcdLabelLocation
The resulting
TLcdLabelLocationdoesn't contain parent bounds. These need to be resolved later if needed.- Parameters:
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.
- a label anchor offset (see
-