Class TLcdLabelObstacle

java.lang.Object
com.luciad.view.labeling.algorithm.TLcdLabelObstacle
Direct Known Subclasses:
TLcdGXYLabelObstacle

public class TLcdLabelObstacle extends Object
An obstacle: a location where label placement should be avoided. An obstacle can be anything, such as for example the objects that are labeled themselves, other important objects on the map that should not be obscured by labels, ...

An obstacle is a rotated rectangle expressed in view coordinates (pixels), see illustration.

obstacle

Obstacles are used by the ILcdLabelConflictChecker interface and implementations.

Since:
10.1
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new, uninitialized TLcdLabelObstacle.
    TLcdLabelObstacle(int aX, int aY, int aWidth, int aHeight, double aRotation)
    Constructs a new TLcdLabelObstacle with the given parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the height.
    double
    Returns the rotation of the obstacle in radians, clockwise, 0 radians at 3 o'clock.
    int
    Returns the width.
    int
    Returns x.
    int
    Returns y.
    void
    setHeight(int aHeight)
    Sets the height of this obstacle, expressed in view coordinates (pixels).
    void
    setRotation(double aRotation)
    Sets the rotation of the obstacle in radians, counterclockwise, 0 radians at 3 o'clock.
    void
    setWidth(int aWidth)
    Sets the width of this obstacle, expressed in view coordinates (pixels).
    void
    setX(int aX)
    Sets the x-coordinate of the upper left corner of this obstacle, expressed in view coordinates (pixels).
    void
    setY(int aY)
    Sets the y-coordinate of the upper left corner of this obstacle, expressed in view coordinates (pixels).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TLcdLabelObstacle

      public TLcdLabelObstacle()
      Constructs a new, uninitialized TLcdLabelObstacle.
    • TLcdLabelObstacle

      public TLcdLabelObstacle(int aX, int aY, int aWidth, int aHeight, double aRotation)
      Constructs a new TLcdLabelObstacle with the given parameters.
      Parameters:
      aX - The x as in setX(int).
      aY - The y as in setY(int).
      aWidth - The width as in setWidth(int).
      aHeight - The height as in setHeight(int).
      aRotation - The rotation as in setRotation(double).
  • Method Details

    • getX

      public int getX()
      Returns x.
      Returns:
      x.
      See Also:
    • setX

      public void setX(int aX)
      Sets the x-coordinate of the upper left corner of this obstacle, expressed in view coordinates (pixels).
      Parameters:
      aX - The x.
    • getY

      public int getY()
      Returns y.
      Returns:
      y.
      See Also:
    • setY

      public void setY(int aY)
      Sets the y-coordinate of the upper left corner of this obstacle, expressed in view coordinates (pixels).
      Parameters:
      aY - The y.
    • getWidth

      public int getWidth()
      Returns the width.
      Returns:
      the width.
      See Also:
    • setWidth

      public void setWidth(int aWidth)
      Sets the width of this obstacle, expressed in view coordinates (pixels).
      Parameters:
      aWidth - The width.
    • getHeight

      public int getHeight()
      Returns the height.
      Returns:
      the height.
      See Also:
    • setHeight

      public void setHeight(int aHeight)
      Sets the height of this obstacle, expressed in view coordinates (pixels).
      Parameters:
      aHeight - The height.
    • getRotation

      public double getRotation()
      Returns the rotation of the obstacle in radians, clockwise, 0 radians at 3 o'clock.
      Returns:
      the rotation of the obstacle
      See Also:
    • setRotation

      public void setRotation(double aRotation)
      Sets the rotation of the obstacle in radians, counterclockwise, 0 radians at 3 o'clock.
      Parameters:
      aRotation - The rotation of the obstacle