Image moniker class. Implements the interface Interop::Runtime28::IImage but does not allocate memory.
This class implements the basic functionality for an image, but does not create its own memory block. Instead, it can hold the pointer to an image memory block created by some other means. This class therefore does not free the memory the data pointer points to, when it is deleted.
Inherits Rx::Interop::Runtime28::IImage.
Public Member Functions | |
CRxImageMoniker () | |
Default constructor. More... | |
CRxImageMoniker (const CRxImageMoniker &xMoniker) | |
Constructor. More... | |
CRxImageMoniker (CRxImageMoniker &&xMoniker) | |
Move constructor. More... | |
CRxImageMoniker (const CRxImageFormat &xFormat, const void *pvData=nullptr) | |
Sets the internal image format to the given format and the internal data pointer to given data pointer. More... | |
virtual | ~CRxImageMoniker () |
Destructor. More... | |
virtual bool | Create (const Interop::Runtime28::IImage *pImage) |
Creates an image moniker for given image. More... | |
virtual bool | Create (int iWidth, int iHeight, Interop::Runtime28::EPixelType::ID ePixelType, Interop::Runtime28::EDataType::ID eDataType) |
Sets image format data to given type and size. No memory is allocated and internal data pointer is set to zero. More... | |
virtual bool | Create (int iWidth, int iHeight, Interop::Runtime28::EPixelType::ID ePixelType, Interop::Runtime28::EDataType::ID eDataType, const void *pvData) |
Sets image format to given type and size and set internal data pointer to given data pointer. More... | |
void | Create (int iWidth, int iHeight, int iPixelType, int iDataType, const void *pvData=nullptr) |
Sets image format to given type and size and set internal data pointer to given data pointer. More... | |
void | Create (const CRxImageFormat &xFormat, const void *pvData=nullptr) |
Sets the internal image format to the given format and the internal data pointer to given data pointer. More... | |
void | Create (const CRxImage &xImage) |
Sets image format to image format of given image and set internal data pointer to data pointer of given image. More... | |
virtual bool | Destroy () |
Sets internal data pointer to zero and reset image format data. More... | |
virtual unsigned | GetByteCount () const |
Gets the number of bytes of the whole image. More... | |
virtual int | GetBytesPerPixel () const |
Gets number of bytes per pixel. More... | |
virtual void * | GetDataPtr () |
Returns the pointer to the data array. More... | |
virtual const void * | GetDataPtr () const |
Returns the constant pointer to the data array. More... | |
const CRxImageFormat & | GetFormat () const |
Gets the image format. More... | |
virtual unsigned | GetPixelCount () const |
Gets the number of pixels. More... | |
virtual void | GetSize (int &iWidth, int &iHeight) const |
Gets width and height of image. More... | |
virtual void | GetType (int &iPixelType, int &iDataType) const |
Gets pixel and data type of image. More... | |
void | GetType (Interop::Runtime28::EPixelType::ID &ePixelType, Interop::Runtime28::EDataType::ID &eDataType) const |
Gets pixel and data type of image. More... | |
bool | IsOfType (Interop::Runtime28::EPixelType::ID ePixelType, Interop::Runtime28::EDataType::ID eDataType) const |
Tests whether image is of a particular pixel and data type. More... | |
virtual bool | IsValid () const |
Tests whether data pointer is not zero. More... | |
CRxImageMoniker & | operator= (const CRxImageMoniker &xMoniker) |
Assignment operator. More... | |
CRxImageMoniker & | operator= (CRxImageMoniker &&xMoniker) |
Move assignment operator. More... | |
void | Set (const void *pvData) |
Sets internal data pointer to given data pointer. More... | |
Protected Attributes | |
void * | m_pvData |
CRxImageFormat | m_xFormat |
Rx::CRxImageMoniker::CRxImageMoniker | ( | ) |
Default constructor.
Rx::CRxImageMoniker::CRxImageMoniker | ( | const CRxImageMoniker & | xMoniker | ) |
Constructor.
xMoniker | The moniker. |
Rx::CRxImageMoniker::CRxImageMoniker | ( | CRxImageMoniker && | xMoniker | ) |
Move constructor.
xMoniker | [in] The moniker to move. Is invalid after this call. |
Rx::CRxImageMoniker::CRxImageMoniker | ( | const CRxImageFormat & | xFormat, |
const void * | pvData = nullptr |
||
) |
Sets the internal image format to the given format and the internal data pointer to given data pointer.
xFormat | The image format. |
pvData | (Optional) The image data pointer. |
|
virtual |
Destructor.
|
virtual |
Creates an image moniker for given image.
pImage | The image. |
Implements Rx::Interop::Runtime28::IImage.
|
virtual |
Sets image format data to given type and size. No memory is allocated and internal data pointer is set to zero.
iWidth | The width. |
iHeight | The weight. |
ePixelType | The pixel type. |
eDataType | The data type. |
Implements Rx::Interop::Runtime28::IImage.
|
virtual |
Sets image format to given type and size and set internal data pointer to given data pointer.
iWidth | The width. |
iHeight | The weight. |
ePixelType | The pixel type. |
eDataType | The data type. |
pvData | The data pointer. |
Implements Rx::Interop::Runtime28::IImage.
void Rx::CRxImageMoniker::Create | ( | int | iWidth, |
int | iHeight, | ||
int | iPixelType, | ||
int | iDataType, | ||
const void * | pvData = nullptr |
||
) |
Sets image format to given type and size and set internal data pointer to given data pointer.
iWidth | The width. |
iHeight | The weight. |
iPixelType | The pixel type. |
iDataType | The data type. |
pvData | (Optional) The data pointer. |
void Rx::CRxImageMoniker::Create | ( | const CRxImageFormat & | xFormat, |
const void * | pvData = nullptr |
||
) |
Sets the internal image format to the given format and the internal data pointer to given data pointer.
xFormat | The image format. |
pvData | (Optional) The data pointer. |
void Rx::CRxImageMoniker::Create | ( | const CRxImage & | xImage | ) |
Sets image format to image format of given image and set internal data pointer to data pointer of given image.
xImage | The image. |
|
virtual |
Sets internal data pointer to zero and reset image format data.
Implements Rx::Interop::Runtime28::IImage.
|
inlinevirtual |
Gets the number of bytes of the whole image.
Implements Rx::Interop::Runtime28::IImage.
|
inlinevirtual |
Gets number of bytes per pixel.
Implements Rx::Interop::Runtime28::IImage.
|
inlinevirtual |
Returns the pointer to the data array.
Implements Rx::Interop::Runtime28::IImage.
|
inlinevirtual |
Returns the constant pointer to the data array.
Implements Rx::Interop::Runtime28::IImage.
|
inline |
Gets the image format.
|
inlinevirtual |
|
inlinevirtual |
Gets width and height of image.
iWidth | [out] The width. |
iHeight | [out] The height. |
Implements Rx::Interop::Runtime28::IImage.
|
inlinevirtual |
Gets pixel and data type of image.
iPixelType | [out] The pixel type. |
iDataType | [out] The data type. |
|
inlinevirtual |
Gets pixel and data type of image.
ePixelType | [out] The pixel type. |
eDataType | [out] The data type. |
Implements Rx::Interop::Runtime28::IImage.
|
inline |
Tests whether image is of a particular pixel and data type.
ePixelType | The pixel type. |
eDataType | The data type. |
|
inlinevirtual |
Tests whether data pointer is not zero.
Implements Rx::Interop::Runtime28::IImage.
CRxImageMoniker& Rx::CRxImageMoniker::operator= | ( | const CRxImageMoniker & | xMoniker | ) |
CRxImageMoniker& Rx::CRxImageMoniker::operator= | ( | CRxImageMoniker && | xMoniker | ) |
Move assignment operator.
xMoniker | [in] The moniker to move. Is invalid after this call. |
void Rx::CRxImageMoniker::Set | ( | const void * | pvData | ) |
Sets internal data pointer to given data pointer.
pvData | The data pointer. |
|
protected |
|
protected |