Interface ILcdText

All Superinterfaces:
Cloneable, ILcdBounded, ILcdCloneable, ILcdShape, Serializable
All Known Subinterfaces:
ILcd2DEditableText
All Known Implementing Classes:
TLcdCGMText, TLcdDGNDisplayableTag, TLcdDGNText2D, TLcdDWGText, TLcdXYText

public interface ILcdText extends ILcdShape
An 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: The text string may have embedded newlines ('\n'). The alignment properties specify how the text is positioned with respect to the given location. The alignment also hints at how the text should be edited: for example, centered text should be rotated around the center point.

Alignment, location and rotation

The image below illustrates how to rotation, horizontal and vertical alignment is related to the text location. The dot represents the location of your text, while the rectangle represents the bounds or your text object.

An image clarifying text alignment

  • Field Details

  • 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.

      See class javadoc for 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.

      See class javadoc for an illustration.

      Returns:
      the horizontal alignment of the text: ALIGNMENT_LEFT, ALIGNMENT_CENTER, or ALIGNMENT_RIGHT.
    • getVerticalAlignment

      int getVerticalAlignment()
      Returns the vertical alignment of the text.

      See class javadoc for an illustration.

      Returns:
      the vertical alignment of the text: ALIGNMENT_TOP, ALIGNMENT_CENTER, or ALIGNMENT_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.

      See class javadoc for an illustration how this relates to the text location and alignment.

      Returns:
      the rotation angle of the text.