Examples of ColorEntry


Examples of org.geotools.image.palette.ColorMap.ColorEntry

        // nope, we need to add a new one, add at the beginning of the list for that bucket
        addEntry(color, increment, index);
    }

    private void addEntry(int color, int value, int index) {
        ColorEntry entry = new ColorEntry(color, value, table[index]);
        table[index] = entry;
        size++;
        modificationCount++;

        // do we need to rehash?
View Full Code Here

Examples of org.geotools.image.palette.ColorMap.ColorEntry

     */
    public boolean remove(int r, int g, int b, int a) {
        int color = color(r, g, b, a);
        int index = indexFor(hash(color), table.length);
    
        ColorEntry prev = null;
        for (ColorEntry e = table[index]; e != null; e = e.next) {
            if (e.color == color) {
                if(prev == null) {
                    table[index] = null;
                } else {
View Full Code Here

Examples of org.geotools.image.palette.ColorMap.ColorEntry

        for (ColorEntry bucketStart : oldTable) {
            for (ColorEntry e = bucketStart; e != null; e = e.next) {
                // no need for fancy checks, we know each color is unique in the table
                int index = indexFor(hash(e.color), table.length);
                ColorEntry newEntry = new ColorEntry(e.color, e.value, table[index]);
                table[index] = newEntry;

            }
        }
    }
View Full Code Here

Examples of org.geotools.image.palette.ColorMap.ColorEntry

        int sum = 0;
        for (int i = 0; i < table.length; i++) {
            if(table[i] == null) {
                empty++;
            } else {
                ColorEntry ce = table[i];
                int count = 0;
                while(ce != null) {
                    count++;
                    ce = ce.next;
                }
View Full Code Here

Examples of org.geotools.image.palette.ColorMap.ColorEntry

        public ColorEntry next() {
            if (!hasNext()) {
                throw new NoSuchElementException();
            }

            ColorEntry result = current;
            current = result.next;
            return result;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.