Package com.luciad.shape
Interface ILcdText
- All Superinterfaces:
Cloneable,ILcdBounded,ILcdCloneable,ILcdShape,Serializable
- All Known Subinterfaces:
ILcd2DEditableText
- All Known Implementing Classes:
TLcdCGMText,TLcdDGNDisplayableTag,TLcdDGNText2D,TLcdDWGText,TLcdXYText
An
The text size is expressed in model units, for example 500 meters wide. As such, the text automatically scales with the map scale. For text that uses screen dimensions (for example, using a font size of 10pt), refer to the labeling API.
ILcdShape representing a text string at a given position and with the given dimensions.The text size is expressed in model units, for example 500 meters wide. As such, the text automatically scales with the map scale. For text that uses screen dimensions (for example, using a font size of 10pt), refer to the labeling API.
Properties
A text object has the following characteristics:- a
text string - a
location - character
widthandheight, in model units - a
rotation, horizontalandverticalalignment (for multi-line text)
Alignment, location and rotation
The image below illustrates how to rotation, horizontal and vertical alignment is related to the text location. The dot represents thelocation of your text, while the rectangle represents the bounds or your text object.

-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intConstant for bottom text alignment.static final intConstant for center text alignment.static final intConstant for left text alignment.static final intConstant for right text alignment.static final intConstant for top text alignment. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the height of the individual text characters.doubleReturns the width of the individual text characters.intReturns the horizontal alignment of the text.Returns the location of the text.doubleReturns the angle over which this text is rotated.Returns the text string of the text.doubleReturns the width of the entire text string.intReturns the vertical alignment of the text.Methods inherited from interface com.luciad.shape.ILcdBounded
getBoundsMethods inherited from interface com.luciad.util.ILcdCloneable
cloneMethods inherited from interface com.luciad.shape.ILcdShape
contains2D, contains2D, contains3D, contains3D, getFocusPoint
-
Field Details
-
ALIGNMENT_LEFT
static final int ALIGNMENT_LEFTConstant for left text alignment. Seeclass javadocfor an illustration.- See Also:
-
ALIGNMENT_CENTER
static final int ALIGNMENT_CENTERConstant for center text alignment. Seeclass javadocfor an illustration.- See Also:
-
ALIGNMENT_RIGHT
static final int ALIGNMENT_RIGHTConstant for right text alignment. Seeclass javadocfor an illustration.- See Also:
-
ALIGNMENT_TOP
static final int ALIGNMENT_TOPConstant for top text alignment. Seeclass javadocfor an illustration.- See Also:
-
ALIGNMENT_BOTTOM
static final int ALIGNMENT_BOTTOMConstant for bottom text alignment. Seeclass javadocfor an illustration.- See Also:
-
-
Method Details
-
getTextString
String getTextString()Returns the text string of the text.- Returns:
- the text string of the text.
-
getLocation
ILcdPoint getLocation()Returns the location of the text. Seeclass javadocfor an illustration how this related to alignment.- Returns:
- the location of the text.
-
getTextWidth
double getTextWidth()Returns the width of the entire text string.- Returns:
- the width of the entire text string.
-
getCharacterWidth
double getCharacterWidth()Returns the width of the individual text characters.- Returns:
- the width of the individual text characters.
-
getCharacterHeight
double getCharacterHeight()Returns the height of the individual text characters.- Returns:
- the height of the individual text characters.
-
getHorizontalAlignment
int getHorizontalAlignment()Returns the horizontal alignment of the text. Seeclass javadocfor an illustration.- Returns:
- the horizontal alignment of the text:
ALIGNMENT_LEFT,ALIGNMENT_CENTER, orALIGNMENT_RIGHT.
-
getVerticalAlignment
int getVerticalAlignment()Returns the vertical alignment of the text. Seeclass javadocfor an illustration.- Returns:
- the vertical alignment of the text:
ALIGNMENT_TOP,ALIGNMENT_CENTER, orALIGNMENT_BOTTOM.
-
getRotAngle
double getRotAngle()Returns the angle over which this text is rotated. The angle is in degrees, positive counter-clockwise, starting a 3 o'clock. Seeclass javadocfor an illustration how this relates to the textlocationand alignment.- Returns:
- the rotation angle of the text.
-