public static final class LineStyle.Builder extends Object implements AutoCloseable
Constructor and Description |
---|
Builder(LineStyle.Builder other) |
Modifier and Type | Method and Description |
---|---|
LineStyle |
build()
Returns a newly created line style, based on the properties set on this builder.
|
void |
close() |
LineStyle.Builder |
color(android.graphics.Color color)
Sets the line color.
|
protected void |
finalize() |
LineStyle.Builder |
inMeters()
Interpret the
line width as meters instead of pixels. |
LineStyle.Builder |
width(double width)
Sets the line width.
|
public Builder(@NotNull LineStyle.Builder other)
public void close()
close
in interface AutoCloseable
@NotNull public LineStyle build()
@NotNull public LineStyle.Builder width(double width) throws IllegalArgumentException
By default, the width is 1.
width
- The line width in device independent pixels. This value must be > 0.IllegalArgumentException
- when width is <= 0.@NotNull public LineStyle.Builder color(@NotNull android.graphics.Color color)
By default, the color is white.
color
- The line color@NotNull public LineStyle.Builder inMeters()
line width
as meters instead of pixels.
This method is optional. By default, the line width is interpreted as device independent pixels.