BITMAP_COMPRESSED
};
+ enum ReleaseFunction
+ {
+ FREE, ///< Use free function to release the buffer
+ DELETE_ARRAY, ///< Use delete[] operator to release the buffer
+ };
+
/**
* Create a new instance of a Bitmap with the required profile.
* @return Pointer to created Bitmap subclass. Clients should immediately
return !(HasAlphaChannel() && mAlphaChannelUsed);
}
+ /**
+ * Returns which release function has to be called to release the data in the bitmap
+ * @return FREE if memory has been allocated with malloc DELETE_ARRAY if memory has been allocated with new
+ */
+ virtual ReleaseFunction GetReleaseFunction() = 0;
+
/**@}*/ ///< End of generic features
* This property can then be tested for with IsFullyOpaque().
*/
virtual void TestForTransparency() = 0;
+
+ protected:
+
+ /**
+ * Virtual destructor, no deletion through this interface
+ */
+ virtual ~PackedPixelsProfile() {}
};
/**
const unsigned width,
const unsigned height,
const size_t numBytes ) = 0;
+ protected:
+
+ /**
+ * Virtual destructor, no deletion through this interface
+ */
+ virtual ~CompressedProfile() {}
};
virtual const CompressedProfile* GetCompressedProfile() const { return 0; }
*/
void DeletePixelBuffer();
+protected:
+
/**
* A reference counted object may only be deleted by calling Unreference()
*/