Class ArrowPatternBuilder
java.lang.Object
com.luciad.layers.styles.complexstrokes.builders.ArrowPatternBuilder
- All Implemented Interfaces:
AutoCloseable
Creates a pattern with an arrow shape.
- Since:
- 2023.1
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the arrow pattern as configured.void
close()
fillColor
(android.graphics.Color color) Sets the fill color.protected void
finalize()
forward
(boolean forward) If true, the arrow is oriented towards the end of the line.height
(double height) The height of the arrow, in pixels.lineColor
(android.graphics.Color color) Sets the line color.lineWidth
(double lineWidth) Sets the line width.offset
(double offset) The offset of the arrow, relative to the base line, in pixels.size
(double size) The size (~length) of the arrow, in pixels.Sets the arrow's type.
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
build
Build the arrow pattern as configured.- Returns:
- the
ComplexStrokePattern
.
-
type
Sets the arrow's type.Defaults to ArrowType.RegularFilled.
- Parameters:
type
- the arrow's type.- Returns:
- this builder.
-
size
The size (~length) of the arrow, in pixels.Defaults to
5
.- Parameters:
size
- the size of the arrow.- Returns:
- this builder.
- Throws:
IllegalArgumentException
- size must be>0
.
-
height
The height of the arrow, in pixels.Must be strictly greater than
0
. If it is not set, the arrow uses a default height, depending on thearrow type
.- Parameters:
height
- the height of the arrow.- Returns:
- this builder.
- Throws:
IllegalArgumentException
- height must be>0
.
-
offset
The offset of the arrow, relative to the base line, in pixels.Defaults to
0
.- Parameters:
offset
- the offset of the arrow.- Returns:
- this builder.
-
lineWidth
Sets the line width.- Parameters:
lineWidth
- the line's width, defaults to1
.- Returns:
- this builder.
- Throws:
IllegalArgumentException
- lineWidth must be>0
.
-
lineColor
Sets the line color.- Parameters:
color
- the arrow's line color, defaults to black.- Returns:
- this builder.
-
fillColor
Sets the fill color.- Parameters:
color
- the arrow's fill color, defaults to white.- Returns:
- this builder.
-
forward
If true, the arrow is oriented towards the end of the line.Defaults to true.
- Parameters:
forward
- whether the arrow is oriented towards the end of the line.- Returns:
- this builder.
-