Class SolidStrokeSymbolLayer


  • public final class SolidStrokeSymbolLayer
    extends StrokeSymbolLayer
    Represents a polyline geometry symbolized with a solid color.

    This symbol layer, if it is the sole symbol layer in a MultilayerSymbol, colors the geometry of the line with the specified solid color. The class also allows setting a collection of GeometricEffect which modify the stroke in various ways.

    It is also used to represent the Web Scene specification's LineSymbol3DLayer and PathSymbol3DLayer. LineSymbol3DLayer is represented by StrokeSymbolLayer.LineStyle3D.STRIP, and PathSymbol3DLayer is represented by StrokeSymbolLayer.LineStyle3D.TUBE.

    The SolidStrokeSymbolLayer provides a similar user experience to the SimpleLineSymbolHandle, but, since it is a symbol layer, can be used in a MultilayerSymbol. The simple line styles of the SimpleLineSymbol are represented here by DashGeometricEffect, but all dash patterns are custom.

    A SolidStrokeSymbolLayer in a MultilayerPolygonSymbol will act as the outline of the fill.

    Since:
    100.5.0
    • Constructor Detail

      • SolidStrokeSymbolLayer

        public SolidStrokeSymbolLayer​(double width,
                                      int color,
                                      Iterable<GeometricEffect> geometricEffects,
                                      StrokeSymbolLayer.LineStyle3D lineStyle3D)
        Creates a solid stroke symbol layer with the given width, color, geometric effects and 3D line style. Cap style is defaulted to StrokeSymbolLayer.CapStyle.ROUND.
        Parameters:
        width - the width of the stroke in dp (density-independent pixels) for all line styles except StrokeSymbolLayer.LineStyle3D.TUBE, which is defined in meters.
        color - the color of the stroke in the format 0xAARRGGBB
        geometricEffects - the geometric effects of the stroke
        lineStyle3D - the 3D line style of the stroke
        Throws:
        IllegalArgumentException - if geometricEffects or lineStyle3D are null
        Since:
        100.5.0
    • Method Detail

      • getColor

        public int getColor()
        Gets the color. The default color is opaque black, 0xff000000.
        Returns:
        the color of the stroke in the format 0xAARRGGBB
        Since:
        100.5.0
      • setColor

        public void setColor​(int color)
        Sets the color. The default color is opaque black, 0xff000000.
        Parameters:
        color - the color of the stroke in the format 0xAARRGGBB
        Since:
        100.5.0
      • getGeometricEffects

        public List<GeometricEffect> getGeometricEffects()
        Gets a list of the geometric effects. The list is modifiable and effects can be added or removed.
        Returns:
        the collection of geometric effects
        Since:
        100.5.0