#include <ncntrcnt.h>
Inheritance diagram for ContourRecordHandler:
Public Member Functions | |
ContourRecordHandler () | |
Destructor. | |
~ContourRecordHandler () | |
Destructor. | |
virtual UINT32 * | GetTagList () |
Gets the tag list for this handler to handle. | |
virtual BOOL | HandleRecord (CXaraFileRecord *pCXaraFileRecord) |
Handles the bevel record - basically creates a BevelController node & creates all the attributes. |
Definition at line 386 of file ncntrcnt.h.
|
Destructor.
Definition at line 3179 of file ncntrcnt.cpp.
|
|
Destructor.
Definition at line 3194 of file ncntrcnt.cpp.
|
|
Gets the tag list for this handler to handle.
Implements CXaraFileRecordHandler. Definition at line 3207 of file ncntrcnt.cpp. 03208 { 03209 static UINT32 TagList[] = { TAG_CONTOURCONTROLLER, 03210 TAG_CONTOUR, 03211 CXFRH_TAG_LIST_END}; 03212 03213 return (UINT32*)&TagList; 03214 }
|
|
Handles the bevel record - basically creates a BevelController node & creates all the attributes.
Implements CXaraFileRecordHandler. Definition at line 3226 of file ncntrcnt.cpp. 03227 { 03228 INT32 Steps = 0; 03229 INT32 Width = 0; 03230 BYTE Type = 0; 03231 03232 BOOL ok = TRUE; 03233 03234 double ObjBias = 0; 03235 double ObjGain = 0; 03236 double AttrBias = 0; 03237 double AttrGain = 0; 03238 03239 if (pCXaraFileRecord->GetTag() == TAG_CONTOURCONTROLLER) 03240 { 03241 ok = pCXaraFileRecord->ReadINT32(&Steps); 03242 03243 if (ok) ok = pCXaraFileRecord->ReadINT32(&Width); 03244 if (ok) ok = pCXaraFileRecord->ReadBYTE(&Type); 03245 if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&ObjBias); 03246 if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&ObjGain); 03247 if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&AttrBias); 03248 if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&AttrGain); 03249 03250 NodeContourController * pNode = new NodeContourController; 03251 03252 if (!pNode) 03253 { 03254 ERROR3("Can't create contour controller"); 03255 return FALSE; 03256 } 03257 03258 pNode->SetWidth(Width); 03259 pNode->SetNumberOfSteps(Steps); 03260 03261 if ((Type & 128) != 0) 03262 { 03263 Type = Type - 128; 03264 pNode->SetInsetPathFlag(TRUE); 03265 } 03266 03267 pNode->SetColourBlendType((ColourBlendType)Type); 03268 03269 pNode->SetObjectProfile( CProfileBiasGain( (AFp)ObjBias, (AFp)ObjGain ) ); 03270 pNode->SetAttrProfile( CProfileBiasGain( (AFp)AttrBias, (AFp)AttrGain ) ); 03271 03272 if (ok) 03273 { 03274 InsertNode(pNode); 03275 } 03276 } 03277 else if (pCXaraFileRecord->GetTag() == TAG_CONTOUR) 03278 { 03279 NodeContour * pNode = new NodeContour; 03280 03281 if (!pNode) 03282 { 03283 ERROR3("Can't create NodeContour"); 03284 return FALSE; 03285 } 03286 03287 InsertNode(pNode); 03288 } 03289 else 03290 { 03291 ERROR3("Contour file record handler - unrecognised tag"); 03292 ok = FALSE; 03293 } 03294 03295 return ok; 03296 }
|