Class ColorRule


  • public class ColorRule
    extends Object
    A JGrass colorrule
    Since:
    1.1.0
    Author:
    Andrea Antonello - www.hydrologis.com, John Preston
    • Constructor Summary

      Constructors 
      Constructor Description
      ColorRule​(float cat0, int r0, int g0, int b0, float cat1, int r1, int g1, int b1)
      Creates a new instance of ColorRule
      ColorRule​(int cat, int r, int g, int b)
      Creates a new instance of ColorRule
    • Constructor Detail

      • ColorRule

        public ColorRule​(int cat,
                         int r,
                         int g,
                         int b)
        Creates a new instance of ColorRule
      • ColorRule

        public ColorRule​(float cat0,
                         int r0,
                         int g0,
                         int b0,
                         float cat1,
                         int r1,
                         int g1,
                         int b1)
        Creates a new instance of ColorRule
    • Method Detail

      • compare

        public int compare​(float cat)
      • getColor

        public byte[] getColor​(float cat)
        Return the colour tupple for specified category value
      • getLowCategoryValue

        public float getLowCategoryValue()
      • getCategoryRange

        public float getCategoryRange()
      • toString

        public String toString()
        Overrides:
        toString in class Object
      • parseColorRule

        public static void parseColorRule​(String colorRule,
                                          List<Double> values,
                                          List<Color> colors)