Class FractionBasedDecorationPainter

java.lang.Object
org.pushingpixels.substance.api.painter.FractionBasedPainter
org.pushingpixels.substance.api.painter.decoration.FractionBasedDecorationPainter
All Implemented Interfaces:
SubstanceDecorationPainter, SubstanceTrait

public class FractionBasedDecorationPainter extends FractionBasedPainter implements SubstanceDecorationPainter
Decoration painter with fraction-based stops and a color query associated with each stop. This class allows creating multi-gradient decorations with exact control over which color is used at every gradient control point.
  • Constructor Details

    • FractionBasedDecorationPainter

      public FractionBasedDecorationPainter(String displayName, float[] fractions, ColorSchemeSingleColorQuery[] colorQueries)
      Creates a new fraction-based decoration 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.
    • FractionBasedDecorationPainter

      public FractionBasedDecorationPainter(String displayName, float[] fractions, ColorSchemeSingleColorQuery[] colorQueries, DecorationAreaType... decorationAreas)
      Creates a new fraction-based decoration 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.
      decorationAreas - Decoration areas that should be painted based on the color queries. All the rest will be filled with a solid color from the background color scheme of the matching decoration area.
  • Method Details