java.lang.Object | |||
↳ | com.carto.styles.StyleBuilder | ||
↳ | com.carto.styles.BillboardStyleBuilder | ||
↳ | com.carto.styles.LabelStyleBuilder |
![]() |
A builder class for LabelStyle.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
LabelStyleBuilder()
Constructs a LabelStyleBuilder object with all parameters set to defaults.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
LabelStyle |
buildStyle()
Builds a new instance of the LabelStyle object using previously set parameters.
| ||||||||||
synchronized void | delete() | ||||||||||
float |
getAnchorPointX()
Returns the horizontal anchor point of the label.
| ||||||||||
float |
getAnchorPointY()
Returns the vertical anchor point of the label.
| ||||||||||
BillboardOrientation |
getOrientationMode()
Returns the orientation mode of the label.
| ||||||||||
float |
getRenderScale()
Returns the relative rendering scale for the label.
| ||||||||||
BillboardScaling |
getScalingMode()
Returns the scaling mode of the label.
| ||||||||||
boolean |
isFlippable()
Returns the state of the flippable flag.
| ||||||||||
void |
setAnchorPoint(float anchorPointX, float anchorPointY)
Sets the anchor point for the label.
| ||||||||||
void |
setAnchorPointX(float anchorPointX)
Sets the horizontal anchor point of the label.
| ||||||||||
void |
setAnchorPointY(float anchorPointY)
Sets the vertical anchor point of the label.
| ||||||||||
void |
setFlippable(boolean flippable)
Sets the state of the flippable flag.
| ||||||||||
void |
setOrientationMode(BillboardOrientation orientationMode)
Sets the orientation mode for the label.
| ||||||||||
void |
setRenderScale(float renderScale)
Sets the relative rendering scale for the label.
| ||||||||||
void |
setScalingMode(BillboardScaling scalingMode)
Sets the scaling mode for the label.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Constructs a LabelStyleBuilder object with all parameters set to defaults.
Builds a new instance of the LabelStyle object using previously set parameters.
Returns the horizontal anchor point of the label.
Returns the vertical anchor point of the label.
Returns the orientation mode of the label.
Returns the relative rendering scale for the label.
Returns the scaling mode of the label.
Returns the state of the flippable flag.
Sets the anchor point for the label. Values will be clamped to [-1, 1] range.
anchorPointX | The new horizontal anchor point for the label. -1 means the left side, 0 the center and 1 the right side of the label. The default is 0. |
---|---|
anchorPointY | The vertical anchor point for the label. -1 means the bottom, 0 the center and 1 the top of the label. The default is -1. |
Sets the horizontal anchor point of the label.
anchorPointX | The new horizontal anchor point for the label. -1 means the left side, 0 the center and 1 the right side of the label. The default is 0. |
---|
Sets the vertical anchor point of the label.
anchorPointY | The vertical anchor point for the label. -1 means the bottom, 0 the center and 1 the top of the label. The default is -1. |
---|
Sets the state of the flippable flag. If set to true and the orientation mode is set to
GROUND the label is allowed to flip 180 degrees to try and face the camera better. This is
useful for street names and some other texts. The default is true.
flippable | The new state of the flippable flag. |
---|
Sets the orientation mode for the label. The default is BillboardOrientation::FACE_CAMERA_BILLBOARD.
orientationMode | The new orientation mode for the label. |
---|
Sets the relative rendering scale for the label. The default is 1.0. For sharper labels, this should be larger.
renderScale | The new rendering scale value. |
---|
Sets the scaling mode for the label. The default is BillboardScaling::CONST_SCREEN_SIZE.
scalingMode | The new scaling mode for the label. |
---|