Beispiel #1
0
        protected Cairo.Color CalcValueColor(float val)
        {
            double factor = (val - valuesMin) / (valuesMax - valuesMin);

            // should be able to handle division by zero (NaN)
            return(coloring.GetColor(factor));
        }
Beispiel #2
0
 // must be able to handle double.NaN !
 public System.Drawing.Color GetColor(double prop)
 {
     // can handle NaN, returns Cairo.Color, must convert to Drawing.Color
     return(coloring.GetColor(prop).ToWinformsColor());
 }