Color Class Documentation

class Color

Namespace:com::datalogics::PDFL

Detailed Description

A color specified by values appropriate for its color space. The values that are offered range from 0 to 1.0 for red, green, and blue (RGB) or cyan, magenta, yellow, and black (CYMK).

Constructor & Destructor Documentation

Color

Color(ColorSpace colorSpace, java.util.List< Double > values)

Parameters

colorSpace: ColorSpace

the color space in which to create the color

values: java.util.List< Double >

the values to place into the color

Create a new color in an arbitrary color space. The number of values passed must match the number of values in the color space.

Color

Color(double c, double m, double y, double k)

Parameters

c: double

the cyan color value for the new color (0.0 - 1.0)

m: double

the magenta color value for the new color (0.0 - 1.0)

y: double

the yellow color value for the new color (0.0 - 1.0)

k: double

the black color value for the new color (0.0 - 1.0)

Create a new color in the DeviceCMYK colorspace with the specified value.

Color

Color(double grey)

Parameters

grey: double

the grayscale color value for the new color (0.0 - 1.0)

Create a new color in the DeviceGray colorspace with the specified value.

Color

Color(double r, double g, double b)

Parameters

r: double

the red color value for the new color (0.0 - 1.0)

g: double

the green color value for the new color (0.0 - 1.0)

b: double

the blue color value for the new color (0.0 - 1.0)

Create a new color in the DeviceRGB colorspace with the specified value.

Color

Color(Pattern pattern)

Parameters

pattern: Pattern

The pattern to turn into a color

Create a new color in the pattern color space.

Member Function Documentation

colorFromAWTColor

static Color colorFromAWTColor(java.awt.Color c)

Parameters

c: java.awt.Color

the java.awt.Color object to use as a source

Returns:

Color

Create a Color from a standard java.awt.Color object.

delete

synchronized void delete(Boolean disposing)

Parameters

disposing: Boolean

Returns:

synchronized void

delete

synchronized void delete()

Returns:

synchronized void

equals

boolean equals(Object rhs)

Parameters

rhs: Object

Returns:

boolean

finalize

void finalize()

Returns:

void

getPattern

Pattern getPattern()

Returns:

Pattern

The Pattern associated with this color, or null if the color is not pattern-based.

The pattern of the color. Only valid for pattern-based colors.

getSpace

ColorSpace getSpace()

Returns:

ColorSpace

The ColorSpace that this color belongs to.

The color space of the color.

getValue

java.util.List< Double > getValue()

Returns:

java.util.List< Double >

A list of color component values, each ranging from 0.0 to 1.0.

The values of the color. Not valid for pattern-based colors.

toString

String toString()

Returns:

String

A string describing the color, including its color space and component values.

Returns a string representation of this Color.