SignDoc SDK (Java)  5.0.0
SignDocColor Class Reference

A color. More...

Inheritance diagram for SignDocColor:

Public Member Functions

SignDocColor clone ()
 Clone this object. More...
 
int getType ()
 Get the color type of this object. More...
 
int getNumberOfComponents ()
 Get the number of color components (channels). More...
 
int getComponent (int aIndex)
 Get one color component (channel). More...
 
int getIntensity ()
 Get the intensity of a gray-scale color object. More...
 
int getRed ()
 Get the red component of an RGB color object. More...
 
int getGreen ()
 Get the green component of an RGB color object. More...
 
int getBlue ()
 Get the blue component of an RGB color object. More...
 
int getRGB ()
 Get the color as integer (0x00rrggbb). More...
 

Static Public Member Functions

static SignDocColor createGray (int aIntensity)
 Create a new gray-scale color object. More...
 
static SignDocColor createRGB (int aRed, int aGreen, int aBlue)
 Create a new RGB color object. More...
 
static SignDocColor createRGB (int aRGB)
 Create a new RGB color object from a single integer. More...
 

Static Public Attributes

static final int t_gray = 0
 Color type: Gray scale. More...
 
static final int t_rgb = 1
 Color type: RGB color. More...
 

Detailed Description

A color.

Use the static factory functions to create SignDocColor objects.

Member Function Documentation

SignDocColor clone ( )

Clone this object.

Returns
A clone of this object.
static SignDocColor createGray ( int  aIntensity)
static

Create a new gray-scale color object.

Parameters
[in]aIntensityThe intensity (0 through 255, 0 is black).
Returns
A new color object.
static SignDocColor createRGB ( int  aRed,
int  aGreen,
int  aBlue 
)
static

Create a new RGB color object.

The values are in 0 through 255, 0 is black.

Parameters
[in]aRedThe value of the red channel.
[in]aGreenThe value of the green channel.
[in]aBlueThe value of the blue channel.
Returns
A new color object.
static SignDocColor createRGB ( int  aRGB)
static

Create a new RGB color object from a single integer.

Parameters
[in]aRGB0x00rrggbb (rr is the red component, gg is the green component, bb is the blue component).
Returns
A new color object.
int getBlue ( )

Get the blue component of an RGB color object.

Returns
The blue component (0 through 255, 0 is black) of an RGB color object, undefined for other color types.
int getComponent ( int  aIndex)

Get one color component (channel).

Parameters
[in]aIndexThe index of the color component (0 through 2). The meaning depends on the color type.
Returns
The value (0 through 255) of the color component aIndex or 0 if aIndex is out of range.
int getGreen ( )

Get the green component of an RGB color object.

Returns
The green component (0 through 255, 0 is black) of an RGB color object, undefined for other color types.
int getIntensity ( )

Get the intensity of a gray-scale color object.

Returns
The intensity (0 through 255, 0 is black) for a gray-scale color object, undefined for other color types.
int getNumberOfComponents ( )

Get the number of color components (channels).

Returns
1 for gray scale, 3 for RGB.
int getRed ( )

Get the red component of an RGB color object.

Returns
The red component (0 through 255, 0 is black) of an RGB color object, undefined for other color types.
int getRGB ( )

Get the color as integer (0x00rrggbb).

rr is the red component, gg is the green component, bb is the blue component.

Returns
The color as integer (0x00rrggbb).
int getType ( )

Get the color type of this object.

Returns
The color type: t_gray or t_rgb.

Member Data Documentation

final int t_gray = 0
static

Color type: Gray scale.

final int t_rgb = 1
static

Color type: RGB color.


The documentation for this class was generated from the following file: