#include <bmpsrc.h>
Inheritance diagram for BitmapSource:
Public Member Functions | |
BitmapSource (OFFSET Size) | |
Constructor providing BitmapSource objects of the given size. We construct objects of the required size, and associate bitmaps with them via SetOriginalSource. | |
virtual | ~BitmapSource () |
Destructor for BitmapSource objects. | |
BOOL | IsOK () const |
Since the constructor can fail, this member function determines whether or not it was wholly successful. Users should always call this function after constructing BitmapSource objects. | |
virtual BOOL | GetByte (BYTE &byte) |
Allows this BitmapSource to be copied elsewhere (to disk) a byte at a time. Notes: SeekPos() should be called to reset the current position. | |
virtual BOOL | PutByte (const BYTE byte) |
Adds a byte to this BitmapSorce object. | |
virtual BOOL | SeekPos (OFFSET pos) |
Sets the position in the BitmapSource at which the next GetByte/PutByte will occur. Usually this function will just be used to start from the beginning of the BitmapSource, by passing zero for nPos. | |
BOOL | AttachToBufferFile (CCBufferFile *pFile) const |
The entry points to filters need a CCFile object. This function provides a CCFile object which uses this BitmapSource when calling the CCFile member functions. Notes: The returned CCFile should be destroyed using delete when no longer needed. | |
virtual BOOL | IsJPEG () |
OFFSET | GetSize () const |
Protected Attributes | |
ADDR | m_pBuffer |
OFFSET | m_nSize |
OFFSET | m_ReadWritePosition |
Private Member Functions | |
CC_DECLARE_MEMDUMP (BitmapSource) |
Definition at line 117 of file bmpsrc.h.
|
Constructor providing BitmapSource objects of the given size. We construct objects of the required size, and associate bitmaps with them via SetOriginalSource.
Definition at line 134 of file bmpsrc.cpp. 00135 { 00136 m_pBuffer = NULL; 00137 m_nSize = 0; 00138 m_ReadWritePosition = 0; 00139 00140 if (Size > 0) 00141 { 00142 m_pBuffer = new BYTE[Size]; 00143 m_nSize = Size; 00144 } 00145 }
|
|
Destructor for BitmapSource objects.
Definition at line 158 of file bmpsrc.cpp. 00159 { 00160 if (m_pBuffer != NULL) 00161 { 00162 delete m_pBuffer; 00163 m_pBuffer = NULL; 00164 } 00165 m_nSize = 0; 00166 }
|
|
The entry points to filters need a CCFile object. This function provides a CCFile object which uses this BitmapSource when calling the CCFile member functions. Notes: The returned CCFile should be destroyed using delete when no longer needed.
Definition at line 292 of file bmpsrc.cpp. 00293 { 00294 ERROR3IF(!pFile->IS_KIND_OF(CCBufferFile), "pFile is not"); 00295 00296 pFile->init(m_pBuffer, m_nSize); 00297 00298 return TRUE; 00299 }
|
|
|
|
Allows this BitmapSource to be copied elsewhere (to disk) a byte at a time. Notes: SeekPos() should be called to reset the current position.
Definition at line 208 of file bmpsrc.cpp. 00209 { 00210 ERROR2IF(m_ReadWritePosition > GetSize(), FALSE, "m_ReadWritePosition > GetSize()"); 00211 00212 byte = m_pBuffer[m_ReadWritePosition]; 00213 ++m_ReadWritePosition; 00214 00215 return TRUE; 00216 }
|
|
Definition at line 134 of file bmpsrc.h. 00134 {return m_nSize;}
|
|
Reimplemented in JPEGBitmapSource. Definition at line 132 of file bmpsrc.h. 00132 { return FALSE; }
|
|
Since the constructor can fail, this member function determines whether or not it was wholly successful. Users should always call this function after constructing BitmapSource objects.
Definition at line 187 of file bmpsrc.cpp.
|
|
Adds a byte to this BitmapSorce object.
Definition at line 234 of file bmpsrc.cpp. 00235 { 00236 ERROR2IF(m_ReadWritePosition > GetSize(), FALSE, "m_ReadWritePosition > GetSize()"); 00237 00238 m_pBuffer[m_ReadWritePosition] = byte; 00239 ++m_ReadWritePosition; 00240 00241 return TRUE; 00242 }
|
|
Sets the position in the BitmapSource at which the next GetByte/PutByte will occur. Usually this function will just be used to start from the beginning of the BitmapSource, by passing zero for nPos.
Definition at line 265 of file bmpsrc.cpp. 00266 { 00267 ERROR2IF(nPos > GetSize(), FALSE, "nPos > GetSize()"); 00268 00269 m_ReadWritePosition = nPos; 00270 return TRUE; 00271 }
|
|
|
|
|
|
|