soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
IBitmapS Struct Reference

Bitmap object interface. More...

#include <SRender-i.h>

Inheritance diagram for IBitmapS:
IRenderObj IObjRef

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.
 
IRenderFactoryGetRenderFactory () 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.
 
- Public Member Functions inherited from IRenderObj
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.
 
IRenderFactoryGetRenderFactory () SCONST PURE
 Obtains the render factory that created this rendering object.
 
OBJTYPE ObjectType () SCONST PURE
 Queries the type of the rendering object.
 
- Public Member Functions inherited from IObjRef
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.
 

Detailed Description

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.

Member Function Documentation

◆ AddRef()

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.

Returns
long The new reference count after incrementing.

◆ Clone()

HRESULT IBitmapS::Clone ( IBitmapS ** ppClone)

Clones the bitmap.

Creates a copy of the bitmap.

Parameters
ppClonePointer to receive the cloned bitmap object.
Returns
HRESULT indicating success or failure.

◆ GetPixelBits()

const LPVOID IBitmapS::GetPixelBits ( )

Retrieves the pixel bits of the bitmap for reading.

Retrieves the pixel data of the bitmap for reading operations.

Returns
const LPVOID Pointer to the pixel data.

◆ GetRenderFactory()

IRenderFactory * IBitmapS::GetRenderFactory ( )

Obtains the render factory that created this rendering object.

Retrieves a pointer to the render factory responsible for creating this object.

Returns
IRenderFactory* Pointer to the render factory.

◆ Height()

UINT IBitmapS::Height ( )

Retrieves the height of the bitmap.

Returns the current height of the bitmap.

Returns
UINT The height of the bitmap.

◆ Init()

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.

Parameters
nWidThe width of the bitmap.
nHeiThe height of the bitmap.
pBitsPointer to the 32-bit bitmap data.
Returns
HRESULT indicating success or failure.

◆ Init2()

HRESULT IBitmapS::Init2 ( IImgFrame * pImgFrame)

Initializes the bitmap from an IImgFrame object.

Initializes the bitmap using the data from the specified IImgFrame object.

Parameters
pImgFramePointer to the IImgFrame object.
Returns
HRESULT indicating success or failure.

◆ LoadFromFile()

HRESULT IBitmapS::LoadFromFile ( LPCTSTR pszFileName)

Loads the bitmap from a file.

Loads the bitmap data from the specified file.

Parameters
pszFileNamePath to the file containing the bitmap data.
Returns
HRESULT indicating success or failure.

◆ LoadFromMemory()

HRESULT IBitmapS::LoadFromMemory ( LPBYTE pBuf,
size_t szLen )

Loads the bitmap from memory.

Loads the bitmap data from the specified memory buffer.

Parameters
pBufPointer to the memory buffer containing the bitmap data.
szLenSize of the memory buffer.
Returns
HRESULT indicating success or failure.

◆ LockPixelBits()

LPVOID IBitmapS::LockPixelBits ( )

Locks the pixel bits of the bitmap for writing.

Locks the pixel data of the bitmap for writing operations.

Returns
LPVOID Pointer to the locked pixel data.

◆ ObjectType()

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).

Returns
OBJTYPE The type of the rendering object.

◆ OnFinalRelease()

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.

◆ Release()

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.

Returns
long The new reference count after decrementing.

◆ Save()

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.

Parameters
pszFileNamePath to the file where the bitmap data will be saved.
pFormatFormat of the saved file.
Returns
HRESULT indicating success or failure.

◆ Save2()

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.

Parameters
pszFileNamePath to the file where the bitmap data will be saved.
imgFmtImage format for saving.
Returns
HRESULT indicating success or failure.

◆ Scale()

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.

Parameters
pOutputPointer to receive the scaled bitmap object.
nScaleScaling factor.
filterLevelFilter level for scaling.
Returns
HRESULT indicating success or failure.

◆ Scale2()

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.

Parameters
pOutputPointer to receive the scaled bitmap object.
nWidNew width of the bitmap.
nHeiNew height of the bitmap.
filterLevelFilter level for scaling.
Returns
HRESULT indicating success or failure.

◆ Size()

SIZE IBitmapS::Size ( )

Retrieves the size of the bitmap.

Returns the current size of the bitmap as a SIZE structure.

Returns
SIZE The size of the bitmap.

◆ UnlockPixelBits()

void IBitmapS::UnlockPixelBits ( LPVOID pBuf)

Unlocks the pixel bits of the bitmap.

Unlocks the pixel data of the bitmap after writing operations.

Parameters
pBufPointer to the locked pixel data.

◆ Width()

UINT IBitmapS::Width ( )

Retrieves the width of the bitmap.

Returns the current width of the bitmap.

Returns
UINT The width of the bitmap.

The documentation for this struct was generated from the following file: