java.awt.color

Class ColorSpace

Implemented Interfaces:
Serializable
Known Direct Subclasses:
ICC_ColorSpace, YCbCr_ColorSpace

public abstract class ColorSpace
extends Object
implements Serializable

NEEDS DOCUMENTATION
Since:
1.2
See Also:
Serialized Form

Field Summary

static int
CS_CIEXYZ
static int
CS_GRAY
static int
CS_LINEAR_RGB
static int
CS_PYCC
static int
CS_sRGB
static int
TYPE_2CLR
static int
TYPE_3CLR
static int
TYPE_4CLR
static int
TYPE_5CLR
static int
TYPE_6CLR
static int
TYPE_7CLR
static int
TYPE_8CLR
static int
TYPE_9CLR
static int
TYPE_ACLR
static int
TYPE_BCLR
static int
TYPE_CCLR
static int
TYPE_CMY
static int
TYPE_CMYK
static int
TYPE_DCLR
static int
TYPE_ECLR
static int
TYPE_FCLR
static int
TYPE_GRAY
static int
TYPE_HLS
static int
TYPE_HSV
static int
TYPE_Lab
static int
TYPE_Luv
static int
TYPE_RGB
static int
TYPE_XYZ
static int
TYPE_YCbCr
static int
TYPE_Yxy

Constructor Summary

ColorSpace(int type, int numcomponents)

Method Summary

abstract float[]
fromCIEXYZ(float[] colorvalue)
abstract float[]
fromRGB(float[] rgbvalue)
static ColorSpace
getInstance(int colorspace)
float
getMaxValue(int idx)
float
getMinValue(int idx)
String
getName(int idx)
int
getNumComponents()
int
getType()
boolean
isCS_sRGB()
abstract float[]
toCIEXYZ(float[] colorvalue)
abstract float[]
toRGB(float[] colorvalue)
Transforms a color value assumed to be in this ColorSpace into a value in the default CS_sRGB color space.

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

CS_CIEXYZ

public static final int CS_CIEXYZ
Field Value:
1001

CS_GRAY

public static final int CS_GRAY
Field Value:
1003

CS_LINEAR_RGB

public static final int CS_LINEAR_RGB
Field Value:
1004

CS_PYCC

public static final int CS_PYCC
Field Value:
1002

CS_sRGB

public static final int CS_sRGB
Field Value:
1000

TYPE_2CLR

public static final int TYPE_2CLR
Field Value:
12

TYPE_3CLR

public static final int TYPE_3CLR
Field Value:
13

TYPE_4CLR

public static final int TYPE_4CLR
Field Value:
14

TYPE_5CLR

public static final int TYPE_5CLR
Field Value:
15

TYPE_6CLR

public static final int TYPE_6CLR
Field Value:
16

TYPE_7CLR

public static final int TYPE_7CLR
Field Value:
17

TYPE_8CLR

public static final int TYPE_8CLR
Field Value:
18

TYPE_9CLR

public static final int TYPE_9CLR
Field Value:
19

TYPE_ACLR

public static final int TYPE_ACLR
Field Value:
20

TYPE_BCLR

public static final int TYPE_BCLR
Field Value:
21

TYPE_CCLR

public static final int TYPE_CCLR
Field Value:
22

TYPE_CMY

public static final int TYPE_CMY
Field Value:
11

TYPE_CMYK

public static final int TYPE_CMYK
Field Value:
9

TYPE_DCLR

public static final int TYPE_DCLR
Field Value:
23

TYPE_ECLR

public static final int TYPE_ECLR
Field Value:
24

TYPE_FCLR

public static final int TYPE_FCLR
Field Value:
25

TYPE_GRAY

public static final int TYPE_GRAY
Field Value:
6

TYPE_HLS

public static final int TYPE_HLS
Field Value:
8

TYPE_HSV

public static final int TYPE_HSV
Field Value:
7

TYPE_Lab

public static final int TYPE_Lab
Field Value:
1

TYPE_Luv

public static final int TYPE_Luv
Field Value:
2

TYPE_RGB

public static final int TYPE_RGB
Field Value:
5

TYPE_XYZ

public static final int TYPE_XYZ
Field Value:
0

TYPE_YCbCr

public static final int TYPE_YCbCr
Field Value:
3

TYPE_Yxy

public static final int TYPE_Yxy
Field Value:
4

Constructor Details

ColorSpace

protected ColorSpace(int type,
                     int numcomponents)

Method Details

fromCIEXYZ

public abstract float[] fromCIEXYZ(float[] colorvalue)

fromRGB

public abstract float[] fromRGB(float[] rgbvalue)

getInstance

public static ColorSpace getInstance(int colorspace)

getMaxValue

public float getMaxValue(int idx)
Since:
1.4

getMinValue

public float getMinValue(int idx)
Since:
1.4

getName

public String getName(int idx)

getNumComponents

public int getNumComponents()

getType

public int getType()

isCS_sRGB

public boolean isCS_sRGB()

toCIEXYZ

public abstract float[] toCIEXYZ(float[] colorvalue)

toRGB

public abstract float[] toRGB(float[] colorvalue)
Transforms a color value assumed to be in this ColorSpace into a value in the default CS_sRGB color space.
Throws:
ArrayIndexOutOfBoundsException - If array length is not at least the number of components in this ColorSpace.

ColorSpace.java -- transforms between color spaces Copyright (C) 2000, 2002 Free Software Foundation This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.