Example #1
0
        public Rgba32 GetColor(long val)
        {
            if (transform == null)
            {
                transform = new Transform1D();

                transform.InputRange(minVal, maxVal);
                transform.OutputRange(128, 255);
            }

            var red = (byte)transform.Transform(val);

            return(new Rgba32(red, 0x00, 0x00, 0xFF));
        }
Example #2
0
        public void AddSample(long val)
        {
            if (val < minVal)
            {
                minVal = val;
            }

            if (val > maxVal)
            {
                maxVal = val;
            }

            transform = null;
        }