java.lang.Object | ||
↳ | com.carto.styles.StyleBuilder | |
↳ | com.carto.styles.LineStyleBuilder |
A builder class for LineStyle.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
LineStyleBuilder()
Constructs a LineStyleBuilder object with all parameters set to defaults.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
LineStyle |
buildStyle()
Builds a new instance of the LineStyle object using previously set parameters.
| ||||||||||
synchronized void | delete() | ||||||||||
Bitmap |
getBitmap()
Returns the bitmap of the line.
| ||||||||||
float |
getClickWidth()
Returns the width of the line used for click detection.
| ||||||||||
LineEndType |
getLineEndType()
Returns the end point type of the line.
| ||||||||||
LineJoinType |
getLineJoinType()
Returns the join type of the line.
| ||||||||||
float |
getStretchFactor()
Returns the stretch factor of the line.
| ||||||||||
float |
getWidth()
Returns the width of the line.
| ||||||||||
void |
setBitmap(Bitmap bitmap)
Sets the bitmap that will be used for drawing the line.
| ||||||||||
void |
setClickWidth(float clickWidth)
Sets the width for the line that will be used for click detection.
| ||||||||||
void |
setLineEndType(LineEndType lineEndType)
Sets the style in which the end points of the line will be drawn.
| ||||||||||
void |
setLineJoinType(LineJoinType lineJoinType)
Sets the style in which the line segments will be connected with each other.
| ||||||||||
void |
setStretchFactor(float stretchFactor)
Sets the relative stretching coefficient for the line.
| ||||||||||
void |
setWidth(float width)
Sets the width of line in screen density independent pixels (DP or DIP).
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Constructs a LineStyleBuilder object with all parameters set to defaults.
Builds a new instance of the LineStyle object using previously set parameters.
Returns the width of the line used for click detection.
Returns the end point type of the line.
Returns the join type of the line.
Returns the stretch factor of the line.
Returns the width of the line.
Sets the bitmap that will be used for drawing the line. The bitmap will be stretched
horizontally to match the width of the line and repeated vertically along the lengtht of the line.
The default is "default_line.png".
bitmap | The new bitmap for the line. |
---|
Sets the width for the line that will be used for click detection.
Units are screen density independent pixels (DP or DIP). If set to -1 the click width will be
calculated automatically. The default is -1.
clickWidth | The new point size in dp. |
---|
Sets the style in which the end points of the line will be drawn. The default is LineEndType::ROUND.
lineEndType | The new line end point type. |
---|
Sets the style in which the line segments will be connected with each other. The default is LineJoinType::MITER.
lineJoinType | The new line join type. |
---|
Sets the relative stretching coefficient for the line. The bitmap of the line will be stretched
vertically by the stretch factor and then repeated along the length of the line. For example,
setting the stretch factor to 2.0 will stretch the bitmap vertically to double the original height
and reduces the number of times the bitmap gets repeated by half. The default is 1.0.
stretchFactor | The new relative stretching coefficient for the line. |
---|
Sets the width of line in screen density independent pixels (DP or DIP). The default is 12.
width | The new line width in dp. |
---|