Examples of CMYKColor


Examples of com.lowagie.text.pdf.CMYKColor

        if (color instanceof FSRGBColor) {
            FSRGBColor rgb = (FSRGBColor) color;
            _color = new Color(rgb.getRed(), rgb.getGreen(), rgb.getBlue());
        } else if (color instanceof FSCMYKColor) {
            FSCMYKColor cmyk = (FSCMYKColor) color;
            _color = new CMYKColor(cmyk.getCyan(), cmyk.getMagenta(), cmyk.getYellow(), cmyk.getBlack());
        } else {
            throw new RuntimeException("internal error: unsupported color class " + color.getClass().getName());
        }
    }
View Full Code Here

Examples of com.scriptographer.ai.CMYKColor

      }
    } else if (reader.isArray()) {
      int size = reader.size();
      if (size == 4) {
        // CMYK
        return new CMYKColor(
            reader.readFloat(0),
            reader.readFloat(0),
            reader.readFloat(0),
            reader.readFloat(0)
        );
      } else  if (size == 3) {
        // RGB
        return new RGBColor(
            reader.readFloat(0),
            reader.readFloat(0),
            reader.readFloat(0)
        );
      } else  if (size == 1) {
        // Gray
        return new GrayColor(
            reader.readFloat(0)
        );
      }
    } else if (reader.isMap()) {
      if (reader.has("red")) {
        return new RGBColor(
            reader.readFloat("red", 0),
            reader.readFloat("green", 0),
            reader.readFloat("blue", 0),
            reader.readFloat("alpha", 1)
        );
      } else if (reader.has("cyan")) {
        return new CMYKColor(
            reader.readFloat("cyan", 0),
            reader.readFloat("magenta", 0),
            reader.readFloat("yellow", 0),
            reader.readFloat("black", 0),
            reader.readFloat("alpha", 1)
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.