Class FractionBasedPainter

    • Field Detail

      • fractions

        protected float[] fractions
        The fractions of this painter. If the constructor has not thrown an IllegalArgumentException, the entries in this array are strictly increasing, starting from 0.0 and ending at 1.0.
    • Constructor Detail

      • FractionBasedPainter

        public FractionBasedPainter​(String displayName,
                                    float[] fractions,
                                    ColorSchemeSingleColorQuery[] colorQueries)
        Creates a new fraction-based border painter.
        Parameters:
        displayName - The display name of this painter.
        fractions - The fractions of this painter. Must be strictly increasing, starting from 0.0 and ending at 1.0.
        colorQueries - The color queries of this painter. Must have the same size as the fractions array, and all entries must be non- null.
    • Method Detail

      • getDisplayName

        public String getDisplayName()
        Description copied from interface: SubstanceTrait
        Returns the display name of this trait. This method is part of officially supported API.
        Specified by:
        getDisplayName in interface SubstanceTrait
        Returns:
        The display name of this trait.
      • getFractions

        public float[] getFractions()
        Returns the fractions of this painter.
        Returns:
        Fractions of this painter.
      • getColorQueries

        public ColorSchemeSingleColorQuery[] getColorQueries()
        Returns the color queries of this painter.
        Returns:
        Color queries of this painter.