Bitmap object interface. More...
#include <SRender-i.h>
Public Member Functions | |
long | AddRef () PURE |
Increments the reference count for the object. | |
long | Release () PURE |
Decrements the reference count for the object. | |
void | OnFinalRelease () PURE |
Called when the final release of the object occurs. | |
IRenderFactory * | GetRenderFactory () SCONST PURE |
Obtains the render factory that created this rendering object. | |
OBJTYPE | ObjectType () SCONST PURE |
Queries the type of the rendering object. | |
HRESULT | Init (int nWid, int nHei, const LPVOID pBits) PURE |
Initializes the bitmap from 32-bit bitmap data. | |
HRESULT | Init2 (IImgFrame *pImgFrame) PURE |
Initializes the bitmap from an IImgFrame object. | |
HRESULT | LoadFromFile (LPCTSTR pszFileName) PURE |
Loads the bitmap from a file. | |
HRESULT | LoadFromMemory (LPBYTE pBuf, size_t szLen) PURE |
Loads the bitmap from memory. | |
UINT | Width () SCONST PURE |
Retrieves the width of the bitmap. | |
UINT | Height () SCONST PURE |
Retrieves the height of the bitmap. | |
SIZE | Size () SCONST PURE |
Retrieves the size of the bitmap. | |
LPVOID | LockPixelBits () PURE |
Locks the pixel bits of the bitmap for writing. | |
void | UnlockPixelBits (LPVOID pBuf) PURE |
Unlocks the pixel bits of the bitmap. | |
const LPVOID | GetPixelBits () SCONST PURE |
Retrieves the pixel bits of the bitmap for reading. | |
HRESULT | Clone (IBitmapS **ppClone) SCONST PURE |
Clones the bitmap. | |
HRESULT | Scale (IBitmapS **pOutput, int nScale, FilterLevel filterLevel) SCONST PURE |
Scales the bitmap and clones it. | |
HRESULT | Scale2 (IBitmapS **pOutput, int nWid, int nHei, FilterLevel filterLevel) SCONST PURE |
Scales the bitmap to specified dimensions and clones it. | |
HRESULT | Save (LPCWSTR pszFileName, const LPVOID pFormat) SCONST PURE |
Saves the bitmap to a file. | |
HRESULT | Save2 (LPCWSTR pszFileName, ImgFmt imgFmt) SCONST PURE |
Saves the bitmap to a file with a specified format. | |
![]() | |
long | AddRef () PURE |
Increments the reference count for the object. | |
long | Release () PURE |
Decrements the reference count for the object. | |
void | OnFinalRelease () PURE |
Called when the final release of the object occurs. | |
IRenderFactory * | GetRenderFactory () SCONST PURE |
Obtains the render factory that created this rendering object. | |
OBJTYPE | ObjectType () SCONST PURE |
Queries the type of the rendering object. | |
![]() | |
long | AddRef () PURE |
Increases the reference count. | |
long | Release () PURE |
Decreases the reference count. | |
void | OnFinalRelease () PURE |
Called when the reference count reaches zero and the object is about to be released. | |
Bitmap object interface.
This interface represents a bitmap used for rendering operations. It inherits from the IRenderObj interface and provides methods to manage the bitmap's properties and lifecycle, including initialization, loading, saving, and scaling operations.
Definition at line 419 of file SRender-i.h.
long IBitmapS::AddRef | ( | ) |
Increments the reference count for the object.
This method is used to increase the reference count of the object, ensuring it remains valid as long as references exist.
HRESULT IBitmapS::Clone | ( | IBitmapS ** | ppClone | ) |
Clones the bitmap.
Creates a copy of the bitmap.
ppClone | Pointer to receive the cloned bitmap object. |
const LPVOID IBitmapS::GetPixelBits | ( | ) |
Retrieves the pixel bits of the bitmap for reading.
Retrieves the pixel data of the bitmap for reading operations.
IRenderFactory * IBitmapS::GetRenderFactory | ( | ) |
Obtains the render factory that created this rendering object.
Retrieves a pointer to the render factory responsible for creating this object.
UINT IBitmapS::Height | ( | ) |
Retrieves the height of the bitmap.
Returns the current height of the bitmap.
HRESULT IBitmapS::Init | ( | int | nWid, |
int | nHei, | ||
const LPVOID | pBits ) |
Initializes the bitmap from 32-bit bitmap data.
Initializes the bitmap with the specified width, height, and pixel data.
nWid | The width of the bitmap. |
nHei | The height of the bitmap. |
pBits | Pointer to the 32-bit bitmap data. |
HRESULT IBitmapS::Init2 | ( | IImgFrame * | pImgFrame | ) |
HRESULT IBitmapS::LoadFromFile | ( | LPCTSTR | pszFileName | ) |
Loads the bitmap from a file.
Loads the bitmap data from the specified file.
pszFileName | Path to the file containing the bitmap data. |
HRESULT IBitmapS::LoadFromMemory | ( | LPBYTE | pBuf, |
size_t | szLen ) |
Loads the bitmap from memory.
Loads the bitmap data from the specified memory buffer.
pBuf | Pointer to the memory buffer containing the bitmap data. |
szLen | Size of the memory buffer. |
LPVOID IBitmapS::LockPixelBits | ( | ) |
Locks the pixel bits of the bitmap for writing.
Locks the pixel data of the bitmap for writing operations.
OBJTYPE IBitmapS::ObjectType | ( | ) |
Queries the type of the rendering object.
Returns an enumeration value representing the type of the object (e.g., brush, pen, bitmap).
void IBitmapS::OnFinalRelease | ( | ) |
Called when the final release of the object occurs.
This method is invoked when the reference count reaches zero, allowing for any necessary cleanup before the object is destroyed.
long IBitmapS::Release | ( | ) |
Decrements the reference count for the object.
This method decreases the reference count of the object. When the count reaches zero, the object may be released.
HRESULT IBitmapS::Save | ( | LPCWSTR | pszFileName, |
const LPVOID | pFormat ) |
Saves the bitmap to a file.
Saves the bitmap data to the specified file with the given format.
pszFileName | Path to the file where the bitmap data will be saved. |
pFormat | Format of the saved file. |
HRESULT IBitmapS::Save2 | ( | LPCWSTR | pszFileName, |
ImgFmt | imgFmt ) |
Saves the bitmap to a file with a specified format.
Saves the bitmap data to the specified file with the given image format.
pszFileName | Path to the file where the bitmap data will be saved. |
imgFmt | Image format for saving. |
HRESULT IBitmapS::Scale | ( | IBitmapS ** | pOutput, |
int | nScale, | ||
FilterLevel | filterLevel ) |
Scales the bitmap and clones it.
Scales the bitmap by the specified factor and creates a copy.
pOutput | Pointer to receive the scaled bitmap object. |
nScale | Scaling factor. |
filterLevel | Filter level for scaling. |
HRESULT IBitmapS::Scale2 | ( | IBitmapS ** | pOutput, |
int | nWid, | ||
int | nHei, | ||
FilterLevel | filterLevel ) |
Scales the bitmap to specified dimensions and clones it.
Scales the bitmap to the specified width and height and creates a copy.
pOutput | Pointer to receive the scaled bitmap object. |
nWid | New width of the bitmap. |
nHei | New height of the bitmap. |
filterLevel | Filter level for scaling. |
SIZE IBitmapS::Size | ( | ) |
Retrieves the size of the bitmap.
Returns the current size of the bitmap as a SIZE structure.
void IBitmapS::UnlockPixelBits | ( | LPVOID | pBuf | ) |
Unlocks the pixel bits of the bitmap.
Unlocks the pixel data of the bitmap after writing operations.
pBuf | Pointer to the locked pixel data. |
UINT IBitmapS::Width | ( | ) |
Retrieves the width of the bitmap.
Returns the current width of the bitmap.