// Called after update is done.
 public void Reset()
 {
     forceDirty        = false;
     preset            = colormap.preset;
     colormapPrecision = colormap.colormapPrecision;
     numberOfColors    = colormap.numberOfColors;
 }
Esempio n. 2
0
 public Colormap()
 {
     palette           = new Color32[256];
     numberOfColors    = 16;
     usedColors        = new bool[256];
     colormapPrecision = ColormapPrecision.Medium;
     initialized       = false;
 }
 public ColormapCalculator(ColormapPrecision precision, Color32[] palette, bool[] usedColors, int numColors, System.Action doneCallback)
 {
     this.precision    = precision;
     this.palette      = palette;
     this.usedColors   = usedColors;
     this.doneCallback = doneCallback;
     this.numColors    = numColors;
     progress          = 0;
     pixelProgress     = 0;
     SetupPixelBuffer();
 }
Esempio n. 4
0
        public Colormap()
        {
            preset            = PalettePresets.PresetName.Classic1;
            palette           = new Color[256];
            numberOfColors    = 16;
            usedColors        = new bool[256];
            colormapPrecision = ColormapPrecision.Medium;
            initialized       = false;

            PalettePresets.SetPalette(preset, this);
        }
Esempio n. 5
0
        public static int GetPrecisionColorsteps(ColormapPrecision precision)
        {
            switch (precision)
            {
            case ColormapPrecision.Low: return(16);

            case ColormapPrecision.Medium: return(32);

            case ColormapPrecision.High: return(64);

            case ColormapPrecision.Overkill: return(128);

            case ColormapPrecision.StupidOverkill: return(256);

            default: return(16);
            }
        }