You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CMYKColorSpace.java 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /*
  2. * Copyright 1999-2004 The Apache Software Foundation.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /* $Id$ */
  17. package org.apache.fop.util;
  18. import java.awt.color.ColorSpace;
  19. /**
  20. * This class represents an uncalibrated CMYK color space. It is used by
  21. * the JpegImage class.
  22. */
  23. public class CMYKColorSpace extends ColorSpace {
  24. private static CMYKColorSpace instance;
  25. /**
  26. * @see java.awt.color.ColorSpace#ColorSpace(int, int)
  27. */
  28. protected CMYKColorSpace(int type, int numcomponents) {
  29. super(type, numcomponents);
  30. }
  31. /**
  32. * Returns an instance of an uncalibrated CMYK color space.
  33. * @return CMYKColorSpace the requested color space object
  34. */
  35. public static CMYKColorSpace getInstance() {
  36. if (instance == null) {
  37. instance = new CMYKColorSpace(TYPE_CMYK, 4);
  38. }
  39. return instance;
  40. }
  41. /**
  42. * @see java.awt.color.ColorSpace#toRGB(float[])
  43. */
  44. public float[] toRGB(float[] colorvalue) {
  45. throw new UnsupportedOperationException("NYI");
  46. }
  47. /**
  48. * @see java.awt.color.ColorSpace#fromRGB(float[])
  49. */
  50. public float[] fromRGB(float[] rgbvalue) {
  51. throw new UnsupportedOperationException("NYI");
  52. }
  53. /**
  54. * @see java.awt.color.ColorSpace#toCIEXYZ(float[])
  55. */
  56. public float[] toCIEXYZ(float[] colorvalue) {
  57. throw new UnsupportedOperationException("NYI");
  58. }
  59. /**
  60. * @see java.awt.color.ColorSpace#fromCIEXYZ(float[])
  61. */
  62. public float[] fromCIEXYZ(float[] colorvalue) {
  63. throw new UnsupportedOperationException("NYI");
  64. }
  65. }