1 17 18 19 20 package org.apache.fop.util; 21 22 import java.awt.color.ColorSpace ; 23 24 28 public class CMYKColorSpace extends ColorSpace { 29 30 private static CMYKColorSpace instance; 31 32 35 protected CMYKColorSpace(int type, int numcomponents) { 36 super(type, numcomponents); 37 } 38 39 43 public static CMYKColorSpace getInstance() { 44 if (instance == null) { 45 instance = new CMYKColorSpace(TYPE_CMYK, 4); 46 } 47 return instance; 48 } 49 50 53 public float[] toRGB(float[] colorvalue) { 54 return new float [] { 55 (1 - colorvalue[0]) * (1 - colorvalue[3]), 56 (1 - colorvalue[1]) * (1 - colorvalue[3]), 57 (1 - colorvalue[2]) * (1 - colorvalue[3])}; 58 } 59 60 63 public float[] fromRGB(float[] rgbvalue) { 64 throw new UnsupportedOperationException ("NYI"); 65 } 66 67 70 public float[] toCIEXYZ(float[] colorvalue) { 71 throw new UnsupportedOperationException ("NYI"); 72 } 73 74 77 public float[] fromCIEXYZ(float[] colorvalue) { 78 throw new UnsupportedOperationException ("NYI"); 79 } 80 81 } 82 | Popular Tags |