Class SolidFillSymbolLayer


  • public final class SolidFillSymbolLayer
    extends FillSymbolLayer
    Represents a symbol layer used to fill a polygon geometry with a solid color. If it is the only symbol layer in a MultilayerPolygonSymbol, it will fill the geometry with the specified color. It can have transparency applied.

    A SolidFillSymbolLayer is like a SimpleFillSymbol with a solid style. Unlike SimpleFillSymbol, which includes hatch fill styles, SolidFillSymbolLayer is used to symbolize a solid fill exclusively and therefore only exposes a color property. To use a hatch fill style, use HatchFillSymbolLayer.

    Since:
    100.5.0
    • Constructor Detail

      • SolidFillSymbolLayer

        public SolidFillSymbolLayer()
        Creates a SolidFillSymbolLayer. The color of the created layer will be fully opaque black - 0xFF000000.
        Since:
        100.5.0
      • SolidFillSymbolLayer

        public SolidFillSymbolLayer​(int color)
        Creates a SolidFillSymbolLayer with the given color.
        Parameters:
        color - the color of the fill in the format 0xAARRGGBB
        Since:
        100.5.0
    • Method Detail

      • getColor

        public int getColor()
        Gets the color of the fill. If a color is not explicitly set, the default will be fully opaque black - 0xFF000000.

        When getting the 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 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:
        the color of the fill in the format 0xAARRGGBB
        Since:
        100.5.0
      • setColor

        public void setColor​(int color)
        Sets the color of the fill. If a color is not explicitly set, the default will be fully opaque black - 0xFF000000.

        When getting the 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 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 - the color of the fill in the format 0xAARRGGBB
        Since:
        100.5.0