public class TLspLabelObstacle extends Object
An obstacle is a rotated rectangle expressed in view coordinates (pixels), see illustration.
Obstacles are used by the ILspLabelConflictChecker
interface
and implementations.
Constructor and Description |
---|
TLspLabelObstacle()
Constructs a new, uninitialized
TLspLabelObstacle . |
TLspLabelObstacle(double aX,
double aY,
double aWidth,
double aHeight,
double aRotation)
Constructs a new
TLspLabelObstacle with the given parameters. |
Modifier and Type | Method and Description |
---|---|
double |
getHeight()
Returns the height.
|
double |
getRotation()
Returns the rotation of the obstacle in radians, clockwise, 0 radians at 3 o'clock.
|
double |
getWidth()
Returns the width.
|
double |
getX()
Returns x.
|
double |
getY()
Returns y.
|
void |
setHeight(double aHeight)
Sets the height of this obstacle, expressed in view coordinates (pixels).
|
void |
setRotation(double aRotation)
Sets the rotation of the obstacle in radians, clockwise, 0 radians at 3 o'clock.
|
void |
setWidth(double aWidth)
Sets the width of this obstacle, expressed in view coordinates (pixels).
|
void |
setX(double aX)
Sets the x-coordinate of the upper left corner of this obstacle, expressed
in view coordinates (pixels).
|
void |
setY(double aY)
Sets the y-coordinate of the upper left corner of this obstacle, expressed
in view coordinates (pixels).
|
public TLspLabelObstacle()
TLspLabelObstacle
.public TLspLabelObstacle(double aX, double aY, double aWidth, double aHeight, double aRotation)
TLspLabelObstacle
with the given parameters.aX
- The x as in setX(double)
.aY
- The y as in setY(double)
.aWidth
- The width as in setWidth(double)
.aHeight
- The height as in setHeight(double)
.aRotation
- The rotation as in setRotation(double)
.public double getX()
setX(double)
public void setX(double aX)
aX
- The x.public double getY()
setY(double)
public void setY(double aY)
aY
- The y.public double getWidth()
setWidth(double)
public void setWidth(double aWidth)
aWidth
- The width.public double getHeight()
setHeight(double)
public void setHeight(double aHeight)
aHeight
- The height.public double getRotation()
setRotation(double)
public void setRotation(double aRotation)
aRotation
- The rotation.