// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _Image_PixMap_HeaderFile #define _Image_PixMap_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_DefineHandle_HeaderFile #include #endif #ifndef _Handle_Image_PixMap_HeaderFile #include #endif #ifndef _Image_HPrivateImage_HeaderFile #include #endif #ifndef _Aspect_PixMap_HeaderFile #include #endif #ifndef _Standard_Integer_HeaderFile #include #endif #ifndef _Image_TypeOfImage_HeaderFile #include #endif #ifndef _Standard_PByte_HeaderFile #include #endif #ifndef _Standard_Boolean_HeaderFile #include #endif #ifndef _Standard_CString_HeaderFile #include #endif #ifndef _Standard_Real_HeaderFile #include #endif #ifndef _Aspect_Handle_HeaderFile #include #endif #ifndef _Image_CRawBufferData_HeaderFile #include #endif class Aspect_PixmapDefinitionError; class Aspect_PixmapError; class Quantity_Color; //! This class defines a system-independent bitmap
class Image_PixMap : public Aspect_PixMap { public: //! Allocate the bitmap with requested dimensions.
//! Allowed image types:
//! - Image_TOI_RGB (color image, 1 byte per component);
//! - Image_TOI_RGBA (color image with alpha channel);
//! - Image_TOI_RGBF (color image, 1 float per component);
//! - Image_TOI_RGBAF (color image with alpha channel);
//! - Image_TOI_FLOAT (grey image, 1 float per pixel).
Standard_EXPORT Image_PixMap(const Standard_Integer theWidth,const Standard_Integer theHeight,const Image_TypeOfImage theType); //! Create a bitmap by copying an existing buffer.
Standard_EXPORT Image_PixMap(const Standard_PByte theDataPtr,const Standard_Integer theWidth,const Standard_Integer theHeight,const Standard_Integer thePitch,const Standard_Integer theBitsPerPixel,const Standard_Boolean theIsTopDown); //! Destroies the Bitmap
Standard_EXPORT virtual void Destroy() ; ~Image_PixMap() { Destroy(); } //! Dumps the Bitmap to an image file with
//! an optional gamma correction value
//! and returns TRUE if the dump occurs normaly.
Standard_EXPORT virtual Standard_Boolean Dump(const Standard_CString theFilename,const Standard_Real theGammaCorr = 1.0) const; //! Returns NULL handle
Standard_EXPORT virtual Aspect_Handle PixmapID() const; //! Fill the structure for low-level access to the bitmap data.
//! It is up to you to interpret these bytes correctly!
//! Important notice: image stored upside-down in the memory,
//! first image row is an last scanline in
//! the memory buffer.
//! If image was created with type Image_TOI_FLOAT buffer
//! format will be set to TDepthComponent. You can override
//! this field with another one-channel buffer format because
//! it useless for bitmap definition.
Standard_EXPORT void AccessBuffer(Image_CRawBufferData& theBufferInfo) const; //! Returns the pixel color. This function is relatively slow,
//! use AccessBuffer() instead for stream operations.
//! Note that this function convert input theY coordinate
//! to count off from top of an image (while in memory it stored
//! upside-down).
Standard_EXPORT virtual Quantity_Color PixelColor(const Standard_Integer theX,const Standard_Integer theY) const; DEFINE_STANDARD_RTTI(Image_PixMap) protected: Image_HPrivateImage myImage; private: }; // other Inline functions and methods (like "C++: function call" methods) #endif