BitmapSmoothingRecordHandler Class Reference

Handles the reading of document bitmap smoothing flag record. More...

#include <rechsmth.h>

Inheritance diagram for BitmapSmoothingRecordHandler:

CamelotRecordHandler CXaraFileRecordHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 BitmapSmoothingRecordHandler ()
 ~BitmapSmoothingRecordHandler ()
virtual UINT32GetTagList ()
 Provides the record handler system with a list of records handled by this handler.
virtual BOOL HandleRecord (CXaraFileRecord *pCXaraFileRecord)
 Handles the given record.

Private Member Functions

 CC_DECLARE_DYNAMIC (BitmapSmoothingRecordHandler)

Detailed Description

Handles the reading of document bitmap smoothing flag record.

Author:
Andy_Hills (Xara Group Ltd) <camelotdev@xara.com>
Date:
07/11/00
See also:
-

Definition at line 117 of file rechsmth.h.


Constructor & Destructor Documentation

BitmapSmoothingRecordHandler::BitmapSmoothingRecordHandler  )  [inline]
 

Definition at line 123 of file rechsmth.h.

00123 : CamelotRecordHandler() {}

BitmapSmoothingRecordHandler::~BitmapSmoothingRecordHandler  )  [inline]
 

Definition at line 124 of file rechsmth.h.

00124 {}


Member Function Documentation

BitmapSmoothingRecordHandler::CC_DECLARE_DYNAMIC BitmapSmoothingRecordHandler   )  [private]
 

UINT32 * BitmapSmoothingRecordHandler::GetTagList  )  [virtual]
 

Provides the record handler system with a list of records handled by this handler.

Author:
Andy_Hills (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/10/00
Parameters:
- [INPUTS]
Returns:
Ptr to a list of tag values, terminated by CXFRH_TAG_LIST_END
See also:
-

Implements CXaraFileRecordHandler.

Definition at line 136 of file rechsmth.cpp.

00137 {
00138     static UINT32 TagList[] = {TAG_DOCUMENTBITMAPSMOOTHING, CXFRH_TAG_LIST_END};
00139 
00140     return (UINT32*)&TagList;
00141 }

BOOL BitmapSmoothingRecordHandler::HandleRecord CXaraFileRecord pCXaraFileRecord  )  [virtual]
 

Handles the given record.

Author:
Andy_Hills (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/10/00
Parameters:
pCXaraFileRecord = ptr to record to handle [INPUTS]
Returns:
TRUE if handled successfuly FALSE otherwise
See also:
-

Implements CXaraFileRecordHandler.

Definition at line 158 of file rechsmth.cpp.

00159 {
00160     ERROR2IF(pCXaraFileRecord == NULL,FALSE,"BitmapSmoothingRecordHandler::HandleRecord pCXaraFileRecord is NULL");
00161 
00162     BOOL ok = TRUE;
00163 
00164     // read in the record ---------------------------------------------------------
00165 
00166     BYTE Flags;
00167     if (ok) ok = pCXaraFileRecord->ReadBYTE(&Flags);    // flags byte
00168 
00169     // read other stuff
00170     BYTE Temp;
00171     for( INT32 i=0; i<4; i++ )
00172     {
00173         if (ok) ok = pCXaraFileRecord->ReadBYTE(&Temp); // 4 reserved bytes
00174     }
00175 
00176     // process the record ---------------------------------------------------------
00177 
00178     BOOL bSmoothWhenScaledUp = Flags & 0x01;
00179 
00180     // get the document
00181     Document *pDoc = GetDocument();
00182     ERROR3IF( (!pDoc), "BitmapSmoothingRecordHandler::HandleRecord - Document is NULL" );
00183 
00184     // set the document's bitmap smoothing flag accordingly
00185     pDoc->SetBitmapSmoothing (bSmoothWhenScaledUp);
00186 
00187     return ok;
00188 }


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