Class LineSymbol

  • All Implemented Interfaces:
    JsonSerializable
    Direct Known Subclasses:
    SimpleLineSymbol

    public abstract class LineSymbol
    extends Symbol
    Defines a LineSymbol's basic functionality and is the base class for all LineSymbols.

    LineSymbols symbolize Graphics and Features of geometric objects.

    LineSymbols can be used to draw linear data such as water systems, boundaries, or transportation networks. LineSymbols can also be used as an outline for other FillSymbols.

    Since:
    100.0.0
    See Also:
    FillSymbol
    • Method Detail

      • getColor

        public int getColor()
        Gets the color of this symbol as a ARGB(alpha, red, green, blue) value. The default color is gray, 0xFFD3D3D3.

        When getting the color (or tint color) from a symbol, the consensus value (for all layers) is reported. If there is no consensus (one or more layers have different colors), a null value is reported for the color. Likewise, setting a value for color on a symbol will apply that color to all layers the symbol contains.

        If you don't want changes to the symbol color to propagate to some of the symbol layers it contains, you can lock the color (or tint color) for those layers. If a symbol layer is color-locked, changes to the parent symbol will not affect the symbol layer. This also means that the layer will not be considered when determining a consensus color for the symbol as a whole.

        Returns:
        an integer representing the background color as 0xAARRGGBB
        Since:
        100.0.0
      • setColor

        public void setColor​(int color)
        Sets the color of this Symbol using a ARGB(alpha, red, green, blue) value.

        When getting the color (or tint color) from a symbol, the consensus value (for all layers) is reported. If there is no consensus (one or more layers have different colors), a null value is reported for the color. Likewise, setting a value for color on a symbol will apply that color to all layers the symbol contains.

        If you don't want changes to the symbol color to propagate to some of the symbol layers it contains, you can lock the color (or tint color) for those layers. If a symbol layer is color-locked, changes to the parent symbol will not affect the symbol layer. This also means that the layer will not be considered when determining a consensus color for the symbol as a whole.

        Parameters:
        color - an integer representing the background color as 0xAARRGGBB
        Since:
        100.0.0
      • getWidth

        public float getWidth()
        Gets the thickness of this Symbol.

        The default value is 1.0.

        Returns:
        the width of this Symbol
        Since:
        100.0.0
        See Also:
        setWidth(float)
      • setWidth

        public void setWidth​(float width)
        Sets the thickness of this Symbol in density-independent pixels (dp).

        Setting a width of 0 or less will make this Symbol invisible.

        Parameters:
        width - the new width for this Symbol in dp, must be 0 or greater for Symbol to be visible.
        Since:
        100.0.0
      • isAntiAlias

        public boolean isAntiAlias()
        Indicates whether or not anti aliasing is enabled for this Symbol.

        The default value is set to true.

        Returns:
        true if anti aliased is set; false otherwise.
        Since:
        100.0.0
        See Also:
        setAntiAlias(boolean)
      • setAntiAlias

        public void setAntiAlias​(boolean antiAlias)
        Sets whether or not the line used for this Symbol should be drawn with anti aliasing.

        Anti aliasing helps to smooth out an image by providing better image quality but also increases the time it takes to render an image.

        Parameters:
        antiAlias - true turns anti aliasing on, false turns it off
        Since:
        100.0.0