Package com.github.axet.starjeweled.common

Examples of com.github.axet.starjeweled.common.RangeColor


        }

        public int filterRGB(int x, int y, int rgb) {
            int na = rgb & 0x00ffffff;

            RangeColor white = ColorsTable.TABLE_WHITE;
            if (white.inRange(na))
                return WHITE_MARK;

            RangeColor black = ColorsTable.TABLE_BLACK;
            if (black.inRange(na)) // black
                return BLACK_MARK;

            return 0x00000000;
        }
View Full Code Here


        if (groups.size() == 0)
            throw new WrongBounds("too many color groups, mens wrong board bounds or more elements on screen");

        String name = groups.remove(0);
        colorSet.put(name, new TitleRangeColor(new RangeColor(color, color), name));
    }
View Full Code Here

    public void draw(BoardColorsTable colors, Matrix m) {
        for (int y = 0; y < m.cy; y++) {
            for (int x = 0; x < m.cx; x++) {
                String s = m.get(x, y);
                RangeColor r = colors.getColor(s);
                if (r == null) {
                    setColor(new MatrixPoint(x, y), Color.BLACK.getRGB());
                } else {
                    setColor(new MatrixPoint(x, y), r.average());
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.github.axet.starjeweled.common.RangeColor

Copyright © 2018 www.massapicom. 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.