public final class ArrowPatternBuilder extends Object implements AutoCloseable
ComplexStrokePatternFactory#arrowBuilder()
Modifier and Type | Method and Description |
---|---|
ComplexStrokePattern |
build()
Build the arrow pattern as configured.
|
void |
close() |
ArrowPatternBuilder |
fillColor(android.graphics.Color color)
Sets the fill color.
|
protected void |
finalize() |
ArrowPatternBuilder |
forward(boolean forward)
If true, the arrow is oriented towards the end of the line.
|
ArrowPatternBuilder |
height(double height)
The height of the arrow, in pixels.
|
ArrowPatternBuilder |
lineColor(android.graphics.Color color)
Sets the line color.
|
ArrowPatternBuilder |
lineWidth(double lineWidth)
Sets the line width.
|
ArrowPatternBuilder |
offset(double offset)
The offset of the arrow, relative to the base line, in pixels.
|
ArrowPatternBuilder |
size(double size)
The size (~length) of the arrow, in pixels.
|
ArrowPatternBuilder |
type(ComplexStrokePatternArrowType type)
Sets the arrow's type.
|
public void close()
close
in interface AutoCloseable
@NotNull public ComplexStrokePattern build()
ComplexStrokePattern
.@NotNull public ArrowPatternBuilder type(@NotNull ComplexStrokePatternArrowType type)
Defaults to ArrowType.RegularFilled.
type
- the arrow's type.@NotNull public ArrowPatternBuilder size(double size) throws IllegalArgumentException
Defaults to 5
.
size
- the size of the arrow.IllegalArgumentException
- size must be >0
.@NotNull public ArrowPatternBuilder height(double height) throws IllegalArgumentException
Must be strictly greater than 0
. If it is not set, the arrow uses a default height, depending on the arrow type
.
height
- the height of the arrow.IllegalArgumentException
- height must be >0
.@NotNull public ArrowPatternBuilder offset(double offset)
Defaults to 0
.
offset
- the offset of the arrow.@NotNull public ArrowPatternBuilder lineWidth(double lineWidth) throws IllegalArgumentException
lineWidth
- the line's width, defaults to 1
.IllegalArgumentException
- lineWidth must be >0
.@NotNull public ArrowPatternBuilder lineColor(@NotNull android.graphics.Color color)
color
- the arrow's line color, defaults to black.@NotNull public ArrowPatternBuilder fillColor(@NotNull android.graphics.Color color)
color
- the arrow's fill color, defaults to white.@NotNull public ArrowPatternBuilder forward(boolean forward)
Defaults to true.
forward
- whether the arrow is oriented towards the end of the line.