OriginalBitmapRef Class Reference

A reference to the original bitmap, before it was decompressed. More...

#include <bitmap.h>

Inheritance diagram for OriginalBitmapRef:

CCObject SimpleCCObject List of all members.

Public Member Functions

 OriginalBitmapRef (BitmapSource *pSource=NULL, BaseBitmapFilter *pImportFilter=NULL)
 Constructor for a reference to the original (usually compressed) bitmap that was used to create the bitmap containing this reference.
 ~OriginalBitmapRef ()
 Destructor for a reference to the original bitmap. THIS WILL FREE UP THE ORIGINAL FILE BUFFER.
void SetOriginalSource (BitmapSource *pSource=NULL, BaseBitmapFilter *pImportFilter=NULL)
 Sets the original bitmap file associated with this reference.
BOOL GetOriginalSource (BitmapSource **ppSource=NULL, BaseBitmapFilter **ppImportFilter=NULL)
 Gets the original bitmap file buffer associated with this reference.

Protected Attributes

BitmapSourcem_pBitmapSource
BaseBitmapFilterm_pBitmapFilter

Detailed Description

A reference to the original bitmap, before it was decompressed.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
8/8/96

Definition at line 184 of file bitmap.h.


Constructor & Destructor Documentation

OriginalBitmapRef::OriginalBitmapRef BitmapSource pSource = NULL,
BaseBitmapFilter pImportFilter = NULL
 

Constructor for a reference to the original (usually compressed) bitmap that was used to create the bitmap containing this reference.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
8/8/96
Parameters:
pSource,a pointer to a BitmapSource [INPUTS] pImportFilter, pointer to the filter to use to decode the bitmap
See also:
OriginalBitmapRef::GetOriginalFile

Definition at line 172 of file bitmap.cpp.

00173 {
00174     m_pBitmapSource = pSource;
00175     m_pBitmapFilter = pImportFilter;
00176 }

OriginalBitmapRef::~OriginalBitmapRef  ) 
 

Destructor for a reference to the original bitmap. THIS WILL FREE UP THE ORIGINAL FILE BUFFER.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
8/8/96
See also:
OriginalBitmapRef::GetOriginalFile

Definition at line 192 of file bitmap.cpp.

00193 {
00194     if (m_pBitmapSource)
00195     {
00196         // Free up the original bitmap buffer
00197         delete m_pBitmapSource;
00198     }
00199 }


Member Function Documentation

BOOL OriginalBitmapRef::GetOriginalSource BitmapSource **  pSource = NULL,
BaseBitmapFilter **  ppImportFilter = NULL
 

Gets the original bitmap file buffer associated with this reference.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
8/8/96
Parameters:
pSource,ptr to a BitmapSource ptr to update to point at the original [INPUTS] BitmapSource ppFilterName, ptr to a BaseBitmapFilter ptr to update to point at the filter to use to decode the bitmap
If both these inputs are NULL, then the function will simply return whether an original file exists or not.

Parameters:
The input pointers are set if an original file is available, otherwise they [OUTPUTS] are left unchanged.
Returns:
TRUE, if an original file is available, and the pointers were set if non NULL. FALSE, if no orginal files is available.

Definition at line 257 of file bitmap.cpp.

00258 {
00259     if (pSource == NULL && ppImportFilter == NULL)
00260     {
00261         // Just return whether a file is available or not, without setting the pointers
00262         return m_pBitmapSource != NULL;
00263     }
00264 
00265     if (m_pBitmapSource != NULL)
00266     {
00267         // Set the pointers
00268         *pSource        = m_pBitmapSource;
00269         *ppImportFilter = m_pBitmapFilter;
00270 
00271         return TRUE;
00272     }
00273 
00274     // No original file available
00275     return FALSE;
00276 }

void OriginalBitmapRef::SetOriginalSource BitmapSource pSource = NULL,
BaseBitmapFilter pImportFilter = NULL
 

Sets the original bitmap file associated with this reference.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
8/8/96
Parameters:
pFileBuffer,a pointer to a buffer containing the original file. [INPUTS] pImportFilter, pointer to the filter to use to decode the bitmap
Notes: The input file buffer should be CCMalloc'd, and will be CCFree'd when the reference is destroyed, or changed to another buffer.

Definition at line 219 of file bitmap.cpp.

00220 {
00221     if (m_pBitmapSource)
00222     {
00223         // Free up the original bitmap buffer
00224         delete m_pBitmapSource;
00225     }
00226 
00227     m_pBitmapSource = pSource;
00228     m_pBitmapFilter = pImportFilter;
00229 }


Member Data Documentation

BaseBitmapFilter* OriginalBitmapRef::m_pBitmapFilter [protected]
 

Definition at line 197 of file bitmap.h.

BitmapSource* OriginalBitmapRef::m_pBitmapSource [protected]
 

Definition at line 196 of file bitmap.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:59:15 2007 for Camelot by  doxygen 1.4.4