Package com.luciad.view.lightspeed.label
Class TLspLabelObstacle
java.lang.Object
com.luciad.view.lightspeed.label.TLspLabelObstacle
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 ILspLabelConflictChecker interface
and implementations.
- Since:
- 2012.0
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new, uninitializedTLspLabelObstacle.TLspLabelObstacle(double aX, double aY, double aWidth, double aHeight, double aRotation) Constructs a newTLspLabelObstaclewith the given parameters. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the height.doubleReturns the rotation of the obstacle in radians, clockwise, 0 radians at 3 o'clock.doublegetWidth()Returns the width.doublegetX()Returns x.doublegetY()Returns y.voidsetHeight(double aHeight) Sets the height of this obstacle, expressed in view coordinates (pixels).voidsetRotation(double aRotation) Sets the rotation of the obstacle in radians, clockwise, 0 radians at 3 o'clock.voidsetWidth(double aWidth) Sets the width of this obstacle, expressed in view coordinates (pixels).voidsetX(double aX) Sets the x-coordinate of the upper left corner of this obstacle, expressed in view coordinates (pixels).voidsetY(double aY) Sets the y-coordinate of the upper left corner of this obstacle, expressed in view coordinates (pixels).
-
Constructor Details
-
TLspLabelObstacle
public TLspLabelObstacle()Constructs a new, uninitializedTLspLabelObstacle. -
TLspLabelObstacle
public TLspLabelObstacle(double aX, double aY, double aWidth, double aHeight, double aRotation) Constructs a newTLspLabelObstaclewith the given parameters.- Parameters:
aX- The x as insetX(double).aY- The y as insetY(double).aWidth- The width as insetWidth(double).aHeight- The height as insetHeight(double).aRotation- The rotation as insetRotation(double).
-
-
Method Details
-
getX
public double getX()Returns x.- Returns:
- x.
- See Also:
-
setX
public void setX(double aX) Sets the x-coordinate of the upper left corner of this obstacle, expressed in view coordinates (pixels).- Parameters:
aX- The x.
-
getY
public double getY()Returns y.- Returns:
- y.
- See Also:
-
setY
public void setY(double aY) Sets the y-coordinate of the upper left corner of this obstacle, expressed in view coordinates (pixels).- Parameters:
aY- The y.
-
getWidth
public double getWidth()Returns the width.- Returns:
- the width.
- See Also:
-
setWidth
public void setWidth(double aWidth) Sets the width of this obstacle, expressed in view coordinates (pixels).- Parameters:
aWidth- The width.
-
getHeight
public double getHeight()Returns the height.- Returns:
- the height.
- See Also:
-
setHeight
public void setHeight(double 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, clockwise, 0 radians at 3 o'clock.- Parameters:
aRotation- The rotation.
-