Package com.google.code.appengine.awt

Examples of com.google.code.appengine.awt.Color


        EscherOptRecord opt = (EscherOptRecord)getEscherChild(_escherContainer, EscherOptRecord.RECORD_ID);

        EscherSimpleProperty p = (EscherSimpleProperty)getEscherProperty(opt, EscherProperties.LINESTYLE__NOLINEDRAWDASH);
        if(p != null && (p.getPropertyValue() & 0x8) == 0) return null;

        Color clr = getColor(EscherProperties.LINESTYLE__COLOR, EscherProperties.LINESTYLE__OPACITY, -1);
        return clr == null ? Color.black : clr;
    }
View Full Code Here


    public int readULONG() throws IOException {
        return (int) readUnsignedInt();
    }

    public Color readCOLORREF() throws IOException {
        Color c = new Color(readUnsignedByte(), readUnsignedByte(),
                readUnsignedByte());
        readByte();
        return c;
    }
View Full Code Here

        readByte();
        return c;
    }

    public Color readCOLOR16() throws IOException {
        return new Color(readShort() >> 8, readShort() >> 8, readShort() >> 8,
                readShort() >> 8);
    }
View Full Code Here

        return cs;
    }

    public Color darker() {
        return new Color(
                (int)(getRed()*SCALE_FACTOR),
                (int)(getGreen()*SCALE_FACTOR),
                (int)(getBlue()*SCALE_FACTOR));
    }
View Full Code Here

        int r = getRed();
        int b = getBlue();
        int g = getGreen();

        if(r == 0 && b == 0 && g == 0) {
            return new Color(MIN_SCALABLE, MIN_SCALABLE, MIN_SCALABLE);
        }

        if(r < MIN_SCALABLE && r != 0) {
            r = MIN_SCALABLE;
        } else {
            r = (int) (r/SCALE_FACTOR);
            r = (r > 255) ? 255 : r;
        }

        if(b < MIN_SCALABLE && b != 0) {
            b = MIN_SCALABLE;
        } else {
            b = (int) (b/SCALE_FACTOR);
            b = (b > 255) ? 255 : b;
        }

        if(g < MIN_SCALABLE && g != 0) {
            g = MIN_SCALABLE;
        } else {
            g = (int) (g/SCALE_FACTOR);
            g = (g > 255) ? 255 : g;
        }

        return new Color(r, g, b);
    }
View Full Code Here

        if (integer == null) {
            return def;
        }

        return new Color(integer.intValue());
    }
View Full Code Here

    public static Color getColor(String nm, int def) {
        Integer integer = Integer.getInteger(nm);

        if (integer == null) {
            return new Color(def);
        }

        return new Color(integer.intValue());
    }
View Full Code Here

        if (integer == null) {
            return null;
        }

        return new Color(integer.intValue());
    }
View Full Code Here

        return new Color(integer.intValue());
    }

    public static Color decode(String nm) throws NumberFormatException {
        Integer integer = Integer.decode(nm);
        return new Color(integer.intValue());
    }
View Full Code Here

        Integer integer = Integer.decode(nm);
        return new Color(integer.intValue());
    }

    public static Color getHSBColor(float h, float s, float b) {
        return new Color(HSBtoRGB(h, s, b));
    }
View Full Code Here

TOP

Related Classes of com.google.code.appengine.awt.Color

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.