Class TLcdLabelObstacle
java.lang.Object
com.luciad.view.labeling.algorithm.TLcdLabelObstacle
- Direct Known Subclasses:
TLcdGXYLabelObstacle
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.
Obstacles are used by the ILcdLabelConflictChecker
interface and implementations.
- Since:
- 10.1
-
Constructor Summary
ConstructorDescriptionConstructs a new, uninitializedTLcdLabelObstacle
.TLcdLabelObstacle
(int aX, int aY, int aWidth, int aHeight, double aRotation) Constructs a newTLcdLabelObstacle
with the given parameters. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the height.double
Returns the rotation of the obstacle in radians, clockwise, 0 radians at 3 o'clock.int
getWidth()
Returns the width.int
getX()
Returns x.int
getY()
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).
-
Constructor Details
-
TLcdLabelObstacle
public TLcdLabelObstacle()Constructs a new, uninitializedTLcdLabelObstacle
. -
TLcdLabelObstacle
public TLcdLabelObstacle(int aX, int aY, int aWidth, int aHeight, double aRotation) Constructs a newTLcdLabelObstacle
with the given parameters.- Parameters:
aX
- The x as insetX(int)
.aY
- The y as insetY(int)
.aWidth
- The width as insetWidth(int)
.aHeight
- The height as insetHeight(int)
.aRotation
- The rotation as insetRotation(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
-