public class TLspLabelPlacement extends Object
A label placement defines a location of a label. This location is specified by an
ALspLabelLocation
and label bounds.
The label bounds is a rotated rectangle expressed in view coordinates (pixels), see illustration.
A TLspLabelPlacement
is always created for a specific TLspLabelID
, which is also stored inside this class.
Constructor and Description |
---|
TLspLabelPlacement(TLspLabelID aId,
ALspLabelLocation aLocation,
boolean aVisible,
double aX,
double aY,
double aWidth,
double aHeight,
double aRotation)
Creates a new label placement for the given label, with the given location, visibility and
rotated bounds (in view coordinates).
|
Modifier and Type | Method and Description |
---|---|
double |
getCosRotation()
Returns the cached cosine value of the rotation in this label placement.
|
double |
getHeight()
Returns the height of the bounds, in view coordinates.
|
TLspLabelID |
getLabelID()
Returns the placements label.
|
ALspLabelLocation |
getLocation()
Returns the label location.
|
double |
getRotation()
Returns the rotation of the label bounds around its anchor point.
|
double |
getSinRotation()
Returns the cached sine value of the rotation in this label placement.
|
double |
getWidth()
Returns the width of the bounds, in view coordinates.
|
double |
getX()
Returns the x coordinate of the upper left corner of the bounds, in view coordinates.
|
double |
getY()
Returns the y coordinate of the upper left corner of the bounds, in view coordinates.
|
boolean |
isVisible()
Returns the label visibility.
|
public TLspLabelPlacement(TLspLabelID aId, ALspLabelLocation aLocation, boolean aVisible, double aX, double aY, double aWidth, double aHeight, double aRotation)
aId
- the label.aLocation
- the location.aVisible
- the visibility.aX
- the x coordinate of the upper left corner of the bounds, in view coordinates.aY
- the y coordinate of the upper left corner of the bounds, in view coordinates.aWidth
- the width of the bounds, in view coordinates.aHeight
- the height of the bounds, in view coordinates.aRotation
- the rotation of the bounds, given in radians, clockwise and with 0 radians at 3 o'clock.public TLspLabelID getLabelID()
public ALspLabelLocation getLocation()
public boolean isVisible()
public double getX()
public double getY()
public double getWidth()
public double getHeight()
public double getRotation()
public double getSinRotation()
getRotation()
public double getCosRotation()
getRotation()