public final class ComplexStrokeLineStyle extends Object implements AutoCloseable
See the step-by-step guide to complex strokes for more information.
A complex stroke line style can be used instead of a LineStyle
in the GeometryDrawCommand#stroke
method.
It is composed of a series of patterns
, which are repeated along the line as a regular
and fallback
pattern, or which are positioned once at a specific location as decorations
.
decorations
: patterns
that are painted once at a specific position along the line. For example, an arrow at the start or end of a line or some text in the middle of the line.
regular
: a pattern
that is repeated infinitely along the line. For example, a dash or wave pattern.
fallback
: a pattern
that is drawn if there is not enough room to draw decorations
or the regular
pattern. This pattern is usually kept as simple as possible, for example a simple parallel line
or a simple dash pattern.
In 3D, non-draped complex stroke lines are painted using an area that either faces the camera
, or that is positioned parallel to the earth surface
. By default, it faces the camera. This works well for simple and narrow strokes, but for more complex patterns, this may introduces some unwanted effects, such as:
modifying the orientation
of the complex stroked line to be parallel with the earth surface.Modifier and Type | Class and Description |
---|---|
static class |
ComplexStrokeLineStyle.Builder
A builder to create
ComplexStrokeLineStyle objects. |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected void |
finalize() |
static ComplexStrokeLineStyle.Builder |
newBuilder()
Creates a new
ComplexStrokeLineStyle Builder . |
public void close()
close
in interface AutoCloseable
@NotNull public static ComplexStrokeLineStyle.Builder newBuilder()
ComplexStrokeLineStyle
Builder
.ComplexStrokeLineStyle
Builder
.