#include <rechsmth.h>
Inheritance diagram for BitmapSmoothingRecordHandler:
Public Member Functions | |
BitmapSmoothingRecordHandler () | |
~BitmapSmoothingRecordHandler () | |
virtual UINT32 * | GetTagList () |
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) |
Definition at line 117 of file rechsmth.h.
|
Definition at line 123 of file rechsmth.h. 00123 : CamelotRecordHandler() {}
|
|
Definition at line 124 of file rechsmth.h.
|
|
|
|
Provides the record handler system with a list of records handled by this handler.
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 }
|
|
Handles the given record.
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 }
|