#include <cdrfiltr.h>
Inheritance diagram for CDRActionTransform:
Public Member Functions | |
CDRActionTransform () | |
~CDRActionTransform () | |
destructor | |
BOOL | Init (RIFFFile *RIFF, CDRVersion Version) |
sets up a transform action - stored given chunk | |
BOOL | DoAction (CDRFilter *C) |
transforms the last object converted | |
void | ImportFailure (CDRFilter *C) |
don't actually need to do anything - the chunk will be deleted on object destruction | |
void | SetIsAGroupTransform (BOOL IsOne) |
Public Attributes | |
ADDR | Chunk |
INT32 | ChunkSize |
BOOL | LinkTrans |
Private Member Functions | |
CC_DECLARE_DYNAMIC (CDRActionTransform) | |
Private Attributes | |
friend | CDRActionList |
friend | CDRFilter |
BOOL | IsAGroupTransform |
Definition at line 551 of file cdrfiltr.h.
|
Definition at line 559 of file cdrfiltr.h. 00559 {Chunk = 0; LinkTrans = FALSE; IsAGroupTransform = FALSE;};
|
|
destructor
Definition at line 1951 of file cdrfiltr.cpp.
|
|
|
|
transforms the last object converted
Implements CDRActionListItem. Definition at line 1879 of file cdrfiltr.cpp. 01880 { 01881 ERROR3IF(Chunk == 0, "CDRActionTransform not initialised"); 01882 01883 if(LinkTrans) 01884 { 01885 return TRUE; 01886 } 01887 01888 ADDR Transform = Chunk; 01889 01890 // if this is a version 3 file we need to find the transform in the data - it's in 01891 // a standard offset header 01892 if(C->Version == CDRVERSION_3) 01893 { 01894 cdrfOffsetHeader *Header = (cdrfOffsetHeader *)Chunk; 01895 01896 // if there isn't a transform, then we're not worried 01897 if((Transform = C->FindDataInObject(Header, cdrfOBJOFFSETTYPE_TRANSFORM_V3)) == 0) 01898 return TRUE; 01899 } 01900 01901 // transform the last node created 01902 01903 // unlink it from the tree first... 01904 Node *pNext = C->pLevelNodeList->FindNext(); 01905 C->pLevelNodeList->UnlinkNodeFromTree(); 01906 01907 // we don't want to scale it to translate the origin because it's already been done 01908 if(!LinkTrans && C->pLevelNodeList != 0) 01909 C->TransformConvertedObject(&C->pLevelNodeList, Transform, ChunkSize, FALSE, IsAGroupTransform, TRUE); 01910 01911 // relink it in 01912 if(pNext != 0) 01913 C->pLevelNodeList->AttachNode(pNext, PREV); 01914 01915 return TRUE; 01916 }
|
|
don't actually need to do anything - the chunk will be deleted on object destruction
Implements CDRActionListItem. Definition at line 1933 of file cdrfiltr.cpp.
|
|
sets up a transform action - stored given chunk
Definition at line 1832 of file cdrfiltr.cpp. 01833 { 01834 if(Version == CDRVERSION_3) 01835 { 01836 // it's a version 3 file, so get the chunk 01837 ERROR3IF(RIFF->GetObjType() != RIFFOBJECTTYPE_CHUNK, "CDRActionTransform::Init called with RIFFFile in wrong state"); 01838 01839 ERROR3IF(Chunk != 0, "CDRActionTransform::Init called more than once"); 01840 01841 // claim some memory to put the transform in 01842 if((Chunk = (ADDR)CCMalloc(RIFF->GetObjSize())) == 0) 01843 return FALSE; 01844 01845 // and get the chunk data into this nice block 01846 if(!RIFF->GetChunkData(Chunk, RIFF->GetObjSize())) 01847 return FALSE; 01848 } 01849 else 01850 { 01851 // it's a version 5 file, so get the list contents 01852 ERROR3IF(RIFF->GetObjType() != RIFFOBJECTTYPE_LISTSTART, "CDRActionTransform::Init called with RIFFFile in wrong state"); 01853 01854 ERROR3IF(Chunk != 0, "CDRActionTransform::Init called more than once"); 01855 01856 // get the list contents 01857 if(!RIFF->GetListContents(&Chunk, &ChunkSize)) 01858 return FALSE; 01859 } 01860 01861 // that's it for now 01862 return TRUE; 01863 }
|
|
Definition at line 567 of file cdrfiltr.h. 00567 {IsAGroupTransform = IsOne;};
|
|
Reimplemented from CDRActionListItem. Definition at line 553 of file cdrfiltr.h. |
|
Definition at line 554 of file cdrfiltr.h. |
|
Definition at line 567 of file cdrfiltr.h. |
|
Definition at line 571 of file cdrfiltr.h. |
|
Definition at line 574 of file cdrfiltr.h. |
|
Definition at line 572 of file cdrfiltr.h. |