ColorSpace.h

Go to the documentation of this file.
00001 #ifndef JAVA_AWT_COLOR_COLORSPACE_H
00002 #define JAVA_AWT_COLOR_COLORSPACE_H 1
00003 
00004 #ifndef JAVA_LANG_OBJECT_H
00005 #include <java_lang/Object.h>
00006 #endif /* JAVA_LANG_OBJECT_H */
00007 #ifndef JAVA_AWT_SPEC
00008 #include <java_awt/Spec.h>
00009 #endif /* JAVA_AWT_SPEC */
00010 
00011 namespace java {
00012   namespace awt {
00013     namespace color {
00014 
00069       class JAVA_AWT_SPEC ColorSpace : virtual public Object {
00070 
00071       public:
00072 
00073         enum COLOR_SPACE_TYPE {
00074 
00078           TYPE_XYZ,
00079 
00083           TYPE_Lab,
00084 
00088           TYPE_Luv,
00089 
00093           TYPE_YCbCr,
00094 
00098           TYPE_Yxy,
00099 
00103           TYPE_RGB,
00104 
00108           TYPE_GRAY,
00109 
00113           TYPE_HSV,
00114 
00118           TYPE_HLS,
00119 
00123           TYPE_CMYK,
00124 
00128           TYPE_CMY,
00129 
00133           TYPE_2CLR,
00134 
00138           TYPE_3CLR,
00139 
00143           TYPE_4CLR,
00144 
00148           TYPE_5CLR,
00149 
00153           TYPE_6CLR,
00154 
00158           TYPE_7CLR,
00159 
00163           TYPE_8CLR,
00164 
00168           TYPE_9CLR,
00169 
00173           TYPE_ACLR,
00174 
00178           TYPE_BCLR,
00179 
00183           TYPE_CCLR,
00184 
00188           TYPE_DCLR,
00189 
00193           TYPE_ECLR,
00194 
00198           TYPE_FCLR,
00199 
00206           CS_sRGB = 1000,
00207 
00211           CS_CIEXYZ,
00212 
00216           CS_PYCC,
00217 
00221           CS_GRAY,
00222 
00227           CS_LINEAR_RGB,
00228 
00229         };
00230 
00239         static Ref<ColorSpace> getInstance(jint colorspace);
00240 
00246         virtual jboolean isCS_sRGB() const;
00247 
00248         /* Returns true if cspace is the XYZspace.
00249          */
00250         virtual jboolean isCS_CIEXYZ() const;
00251 
00263         virtual jint getType() const;
00264 
00269         virtual jint getNumComponents() const;
00270 
00276         virtual String getName(jint idx) const;
00277 
00289         virtual jfloat getMinValue(jint component) const;
00290 
00302         virtual jfloat getMaxValue
00303 (jint component) const;
00304 
00326         virtual Array<jfloat> toRGB(const Array<jfloat> colorvalue) const = 0;
00327 
00349         virtual Array<jfloat> fromRGB(const Array<jfloat> rgbvalue) const = 0;
00350 
00375         virtual Array<jfloat> toCIEXYZ(const Array<jfloat> colorvalue) const = 0;
00376 
00402         virtual Array<jfloat> fromCIEXYZ(const Array<jfloat> colorvalue) const = 0;
00403 
00404       protected:
00405 
00412         ColorSpace(jint type, jint numComponents);
00413 
00414       private:
00415 
00416         jint type;
00417         jint numComponents;
00418 
00419         REGISTER_MEMBERS;
00420 
00421       };
00422 
00423     } // namespace color
00424   } // namespace awt
00425 } // namespace java
00426 
00427 #endif /* JAVA_AWT_COLOR_COLORSPACE_H */

Generated on Fri May 16 11:54:42 2008 for CrossPlatformJavaLikeC++API by  doxygen 1.5.3