ColorModel.h

Go to the documentation of this file.
00001 #ifndef JAVA_AWT_IMAGE_COLORMODEL_H
00002 #define JAVA_AWT_IMAGE_COLORMODEL_H 1
00003 
00004 #ifndef JAVA_AWT_TRANSPARENCY_H
00005 #include <java_awt/Transparency.h>
00006 #endif /* JAVA_AWT_TRANSPARENCY_H */
00007 #ifndef JAVA_AWT_COLOR_COLORSPACE_H
00008 #include <java_awt_color/ColorSpace.h>
00009 #endif /* JAVA_AWT_COLOR_COLORSPACE_H */
00010 #ifndef JAVA_AWT_SPEC
00011 #include <java_awt/Spec.h>
00012 #endif /* JAVA_AWT_SPEC */
00013 
00014 namespace java {
00015   namespace awt {
00016     namespace image {
00017 
00018       using namespace java::awt::color;
00019 
00138       class JAVA_AWT_SPEC ColorModel 
00139         : virtual public Object
00140         , virtual public Transparency {
00141 
00142       public:
00143 
00160         static ColorModel& getRGBdefault();
00161 
00168         jboolean hasAlpha() const;
00169 
00182         jboolean isAlphaPremultiplied() const;
00183 
00190         jint getTransferType() const;
00191 
00198         Ref<ColorSpace> getColorSpace() const;
00199 
00205         virtual jint getPixelSize() const;
00206 
00225         virtual jint getComponentSize(jint componentIdx) const;
00226 
00234         virtual const Array<jint>& getComponentSize() const;
00235 
00244         virtual jint getTransparency() const;
00245 
00252         virtual jint getNumComponents() const;
00253 
00263         virtual jint getNumColorComponents() const;
00264 
00278         virtual jint getRed(jint pixel) const = 0;
00279 
00293         virtual jint getGreen(jint pixel) const = 0;
00294 
00308         virtual jint getBlue(jint pixel) const = 0;
00309 
00319         virtual jint getAlpha(jint pixel) const = 0;
00320 
00336         virtual jint getRGB(jint pixel) const;
00337 
00374         virtual jint getRed(const Object& inData) const;
00375 
00412         virtual jint getGreen(const Object& inData) const;
00413 
00450         virtual jint getBlue(const Object& inData) const;
00451 
00484         virtual jint getAlpha(const Object& inData) const;
00485 
00503         virtual jint getRGB(const Object& inData) const;
00504 
00514         virtual jboolean equals(const Object& obj) const;
00515 
00521         virtual jint hashCode() const;
00522 
00529         virtual String toString() const;
00530 
00531       protected:
00532 
00553         ColorModel(jint bits);
00554         
00601         ColorModel
00602           (jint pixel_bits, 
00603            const Array<jint>& bits, 
00604            const Ref<ColorSpace>& cspace,
00605            jboolean hasAlpha,
00606            jboolean isAlphaPremultiplied,
00607            jint transparency,
00608            jint transferType);
00609 
00610         ObjectRef impl;
00611         REGISTER_MEMBERS;
00612 
00613       };
00614 
00615     } // namespace image
00616   } // namespace awt
00617 } // namespace java
00618 
00619 #endif /* JAVA_AWT_IMAGE_COLORMODEL_H */

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