Oracle® interMedia Reference 10g Release 1 (10.1) Part Number B10829-01 |
|
|
View PDF |
The SI_Color object type represents color values of a digitized image as an RGB color value. It is created in the ORDSYS schema with invoker rights. It is declared as an INSTANTIABLE and NOT FINAL type.
Note: Use the SI_Color method rather than accessing attributes directly to protect yourself from changes to the internal representation of the SI_Color object. |
The SI_Color object is defined as follows:
CREATE OR REPLACE TYPE SI_Color AUTHID CURRENT_USER AS OBJECT ( ------------------- -- TYPE ATTRIBUTES ------------------- redValue INTEGER, greenValue INTEGER, blueValue INTEGER, --------------------- -- METHOD DECLARATION --------------------- MEMBER PROCEDURE SI_RGBColor (redValue IN INTEGER, greenValue IN INTEGER, blueValue IN INTEGER) ) INSTANTIABLE NOT FINAL;
where:
redValue: the integer value of the red component of the RGB color value.
greenValue: the integer value of the green component of the RGB color value.
blueValue: the integer value of the blue component of the RGB color value.
Only a system-default constructor is provided for the SI_Color object.
This section presents reference information on the SI_Color method used for constructing an SI_Color object using RGB color values:
Format
SI_RGBColor(redValue IN INTEGER,
greenValue IN INTEGER,
blueValue IN INTEGER);
Format of Equivalent SQL Function
SI_MkRGBClr(redValue IN INTEGER,
greenValue IN INTEGER,
blueValue IN INTEGER)
RETURN SI_Color;
Description
Constructs an SI_Color object in the RGB color space using the specified red, blue, and green values.
Parameters
An integer value between 0 and 255.
An integer value between 0 and 255.
An integer value between 0 and 255.
Usage Notes
You must call the system default constructor and specify NULL values, then call the SI_RGBColor method to set the RGB values. This two-step process is required because:
The SQL/MM standard does not specify an object constructor for this type, therefore, the need to use the system default constructor.
The default constructor does not perform any argument validation. By calling the SI_RGBColor method, specified values will be validated before assigning them to the color attributes.
An error is returned if any of the specified values is NULL or if any of the specified values is not between 0 and 255.
Pragmas
None.
Exceptions
None.
Examples
Construct an SI_Color value using the SI_RGBColor( ) method:
DECLARE myColor SI_Color; BEGIN myColor := NEW SI_COLOR(null, null, null); -- Set myColor to represent the color red: myColor.SI_RGBColor(255, 0, 0); END; /
Construct an SI_Color value using the SI_MkRGBClr ( ) function:
DECLARE myColor SI_Color; BEGIN myColor := NEW SI_COLOR(null, null, null); -- Set myColor to represent the color red: myColor := SI_MkRGBClr(255, 0, 0); END; /