JHotDraw 7.2

org.jhotdraw.color
Class CMYKICCColorSystem

java.lang.Object
  extended by org.jhotdraw.color.AbstractColorSystem
      extended by org.jhotdraw.color.CMYKICCColorSystem
All Implemented Interfaces:
ColorSystem

public class CMYKICCColorSystem
extends AbstractColorSystem

A ColorSystem for CMYK color components (cyan, magenta, yellow, black) in a color space defined by a ICC color profile (International Color Consortium).

XXX - This does not work. I think this is because of Java bug #4760025 at http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4760025 but maybe I am doing something in the wrong way.

Version:
2.0 2008-04-23 Added component conversion methods.
1.1 2008-04-23 Added constructor without parameters.
1.0 May 22, 2005 Created.
Author:
Werner Randelshofer

Constructor Summary
CMYKICCColorSystem()
          Creates a new instance.
CMYKICCColorSystem(java.io.InputStream iccProfile)
          Creates a new instance.
 
Method Summary
 int getComponentCount()
          Returns the number of color components used by the color system.
 void read(java.io.InputStream iccProfile)
           
 float[] toComponents(int r, int g, int b, float[] component)
           
 int toRGB(float... component)
          Converts the specified color components to RGB.
 
Methods inherited from class org.jhotdraw.color.AbstractColorSystem
toComponents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CMYKICCColorSystem

public CMYKICCColorSystem()
Creates a new instance.


CMYKICCColorSystem

public CMYKICCColorSystem(java.io.InputStream iccProfile)
                   throws java.io.IOException
Creates a new instance.

Throws:
java.io.IOException
Method Detail

read

public void read(java.io.InputStream iccProfile)
          throws java.io.IOException
Throws:
java.io.IOException

toComponents

public float[] toComponents(int r,
                            int g,
                            int b,
                            float[] component)
Specified by:
toComponents in class AbstractColorSystem

toRGB

public int toRGB(float... component)
Description copied from interface: ColorSystem
Converts the specified color components to RGB.

Parameters:
component - The color components.
Returns:
rgb value.

getComponentCount

public int getComponentCount()
Description copied from interface: ColorSystem
Returns the number of color components used by the color system.

Returns:
component count.

Copyright 1996-2009 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.