#include <rechattr.h>
Inheritance diagram for FillAttrRecordHandler:

Public Member Functions | |
| FillAttrRecordHandler () | |
| ~FillAttrRecordHandler () | |
| 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 (FillAttrRecordHandler) | |
| BOOL | HandleFlatFillRecord (CXaraFileRecord *pCXaraFileRecord) |
| Handles the given record. The record has to be a flat fill record. | |
| BOOL | HandleLinearFillRecord (CXaraFileRecord *pCXaraFileRecord) |
| Handles the given record. The record has to be a linear fill record. | |
| BOOL | HandleMultiStageLinearFillRecord (CXaraFileRecord *pCXaraFileRecord) |
| Handles the given record. The record has to be a multi stage linear fill record. | |
| BOOL | HandleEllipticalFillRecord (CXaraFileRecord *pCXaraFileRecord) |
| Handles the given record. The record has to be a elliptical or circular fill record. | |
| BOOL | HandleMultiStageCircularFillRecord (CXaraFileRecord *pCXaraFileRecord) |
| Handles the given record. The record has to be a multistage circular fill. | |
| BOOL | HandleConicalFillRecord (CXaraFileRecord *pCXaraFileRecord) |
| Handles the given record. The record has to be a conical fill record. | |
| BOOL | HandleMultiStageConicalFillRecord (CXaraFileRecord *pCXaraFileRecord) |
| Handles the given record. The record has to be a multi stage conical fill record. | |
| BOOL | HandleSquareFillRecord (CXaraFileRecord *pCXaraFileRecord) |
| Handles the given record. The record has to be a square fill record. | |
| BOOL | HandleMultiStageSquareFillRecord (CXaraFileRecord *pCXaraFileRecord) |
| Handles the given record. The record has to be a multi-stage square fill record. | |
| BOOL | HandleThreeColFillRecord (CXaraFileRecord *pCXaraFileRecord) |
| Handles the given record. The record has to be a ThreeCol fill record. | |
| BOOL | HandleFourColFillRecord (CXaraFileRecord *pCXaraFileRecord) |
| Handles the given record. The record has to be a FourCol fill record. | |
| BOOL | HandleBitmapFillRecord (CXaraFileRecord *pCXaraFileRecord) |
| Handles the given record. The record has to be a bitmap or contone bitmap fill record. | |
| BOOL | HandleFractalFillRecord (CXaraFileRecord *pCXaraFileRecord) |
| Handles the given record. The record must be a fractal fill record. | |
| BOOL | HandleNoiseFillRecord (CXaraFileRecord *pCXaraFileRecord) |
| Handles the given record. The record must be a noise fill record. | |
| BOOL | HandleFlatTransparentFillRecord (CXaraFileRecord *pCXaraFileRecord) |
| Handles the given record. The record has to be a flat transparent fill record. | |
| BOOL | HandleLinearTransparentFillRecord (CXaraFileRecord *pCXaraFileRecord) |
| Handles the given record. The record has to be a Linear transparent fill record. | |
| BOOL | HandleEllipticalTransparentFillRecord (CXaraFileRecord *pCXaraFileRecord) |
| Handles the given record. The record has to be an Elliptical or circular transparent fill record. | |
| BOOL | HandleConicalTransparentFillRecord (CXaraFileRecord *pCXaraFileRecord) |
| Handles the given record. The record has to be a Conical transparent fill record. | |
| BOOL | HandleSquareTransparentFillRecord (CXaraFileRecord *pCXaraFileRecord) |
| Handles the given record. The record has to be a Square transparent fill record. | |
| BOOL | HandleThreeColTransparentFillRecord (CXaraFileRecord *pCXaraFileRecord) |
| Handles the given record. The record has to be a ThreeCol transparent fill record. | |
| BOOL | HandleFourColTransparentFillRecord (CXaraFileRecord *pCXaraFileRecord) |
| Handles the given record. The record has to be a FourCol transparent fill record. | |
| BOOL | HandleBitmapTransparentFillRecord (CXaraFileRecord *pCXaraFileRecord) |
| Handles the given record. The record has to be a Transparent bitmap fill record. | |
| BOOL | HandleFractalTransparentFillRecord (CXaraFileRecord *pCXaraFileRecord) |
| Handles the given record. The record must be a transparent fractal fill record. | |
| BOOL | HandleNoiseTransparentFillRecord (CXaraFileRecord *pCXaraFileRecord) |
| Handles the given record. The record must be a transparent noise fill record. | |
| BOOL | HandleFillRepeatRecord (CXaraFileRecord *pCXaraFileRecord) |
| Handles the given record. The record has to be a fill repeat record. | |
| BOOL | HandleTransparentFillRepeatRecord (CXaraFileRecord *pCXaraFileRecord) |
| Handles the given record. The record has to be a transparent fill repeat record. | |
| BOOL | HandleFillEffectRecord (CXaraFileRecord *pCXaraFileRecord) |
| Handles the given record. The record has to be a linear fill record. | |
Definition at line 160 of file rechattr.h.
|
|
Definition at line 166 of file rechattr.h. 00166 : CamelotRecordHandler() {}
|
|
|
Definition at line 167 of file rechattr.h.
|
|
|
|
|
|
|
Handles the given record. The record has to be a bitmap or contone bitmap fill record.
Definition at line 21534 of file fillattr.cpp. 21535 { 21536 UINT32 Tag = pCXaraFileRecord->GetTag(); 21537 21538 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 21539 ERROR2IF(Tag != TAG_BITMAPFILL && Tag != TAG_CONTONEBITMAPFILL,FALSE,"I don't handle this tag type"); 21540 21541 BOOL ok = TRUE; 21542 21543 DocCoord StartPoint, EndPoint, EndPoint2; 21544 INT32 BitmapRef,StartColRef,EndColRef; 21545 double Bias = 0, Gain = 0; 21546 double* ptrBias = &Bias, *ptrGain = &Gain; 21547 21548 // Read in the bitmap fill data 21549 if (ok) ok = pCXaraFileRecord->ReadCoord(&StartPoint); 21550 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint); 21551 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint2); 21552 21553 if (Tag == TAG_CONTONEBITMAPFILL) 21554 { 21555 if (ok) ok = pCXaraFileRecord->ReadINT32(&StartColRef); 21556 if (ok) ok = pCXaraFileRecord->ReadINT32(&EndColRef); 21557 } 21558 21559 if (ok) ok = pCXaraFileRecord->ReadINT32(&BitmapRef); 21560 if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrBias); 21561 if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrGain); 21562 21563 CProfileBiasGain Profile; 21564 21565 if ((ptrBias != NULL) && (ptrGain != NULL)) 21566 { 21567 Profile.SetBias((AFp) Bias); 21568 Profile.SetGain((AFp) Gain); 21569 } 21570 21571 if (ok) 21572 { 21573 AttrBitmapColourFill* pAttr = new AttrBitmapColourFill; 21574 if (pAttr != NULL) 21575 { 21576 // Get a ptr to the attr value object 21577 BitmapFillAttribute* pValue = (BitmapFillAttribute*)pAttr->GetAttributeValue(); 21578 21579 if (pValue != NULL) 21580 { 21581 // Store the start and end points 21582 pValue->SetStartPoint(&StartPoint); 21583 pValue->SetEndPoint(&EndPoint); 21584 pValue->SetEndPoint2(&EndPoint2); 21585 21586 if (Tag == TAG_CONTONEBITMAPFILL) 21587 { 21588 DocColour StartCol,EndCol; 21589 21590 // Convert the colour references into doc colours 21591 if (ok) ok = GetDocColour(StartColRef,&StartCol); 21592 if (ok) ok = GetDocColour(EndColRef,&EndCol); 21593 21594 if (ok) 21595 { 21596 pValue->SetStartColour(&StartCol); 21597 pValue->SetEndColour(&EndCol); 21598 } 21599 } 21600 21601 // Store the profile 21602 pValue->SetProfile (Profile); 21603 21604 // Convert the bmp reference into a kernel bmp, and insert the attr into the tree 21605 KernelBitmap * pBitmap = NULL; 21606 pBitmap = GetReadBitmapReference(BitmapRef); 21607 21608 ok = (pBitmap != NULL); 21609 if (ok) ok = pValue->AttachBitmap(pBitmap); 21610 if (ok) ok = InsertNode(pAttr); 21611 } 21612 else 21613 ok = FALSE; 21614 } 21615 else 21616 ok = FALSE; 21617 } 21618 21619 return ok; 21620 }
|
|
|
Handles the given record. The record has to be a Transparent bitmap fill record.
Definition at line 22347 of file fillattr.cpp. 22348 { 22349 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 22350 ERROR2IF(pCXaraFileRecord->GetTag() != TAG_BITMAPTRANSPARENTFILL,FALSE,"I don't handle this tag type"); 22351 22352 BOOL ok = TRUE; 22353 22354 DocCoord StartPoint, EndPoint, EndPoint2; 22355 INT32 BitmapRef; 22356 BYTE Transp,EndTransp,TranspType; 22357 double Bias = 0, Gain = 0; 22358 double* ptrBias = &Bias, *ptrGain = &Gain; 22359 22360 // Read in the bitmap fill data 22361 if (ok) ok = pCXaraFileRecord->ReadCoord(&StartPoint); 22362 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint); 22363 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint2); 22364 if (ok) ok = pCXaraFileRecord->ReadBYTE(&Transp); 22365 if (ok) ok = pCXaraFileRecord->ReadBYTE(&EndTransp); 22366 if (ok) ok = pCXaraFileRecord->ReadBYTE(&TranspType); 22367 if (ok) ok = pCXaraFileRecord->ReadINT32(&BitmapRef); 22368 if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrBias); 22369 if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrGain); 22370 22371 CProfileBiasGain Profile; 22372 22373 if ((ptrBias != NULL) && (ptrGain != NULL)) 22374 { 22375 Profile.SetBias((AFp) Bias); 22376 Profile.SetGain((AFp) Gain); 22377 } 22378 22379 if (ok) 22380 { 22381 AttrBitmapTranspFill* pAttr = new AttrBitmapTranspFill; 22382 if (pAttr != NULL) 22383 { 22384 // Get a ptr to the attr value object 22385 BitmapTranspFillAttribute* pValue = (BitmapTranspFillAttribute*)pAttr->GetAttributeValue(); 22386 22387 if (pValue != NULL) 22388 { 22389 // Store the start and end points 22390 pValue->SetStartPoint(&StartPoint); 22391 pValue->SetEndPoint(&EndPoint); 22392 pValue->SetEndPoint2(&EndPoint2); 22393 pValue->Transp = UINT32(Transp); 22394 pValue->EndTransp = UINT32(EndTransp); 22395 pValue->TranspType = UINT32(TranspType); 22396 pValue->SetProfile (Profile); 22397 22398 // Convert the bmp reference into a kernel bmp, and insert the attr into the tree 22399 KernelBitmap * pBitmap = NULL; 22400 pBitmap = GetReadBitmapReference(BitmapRef); 22401 22402 ok = (pBitmap != NULL); 22403 if (ok) ok = pValue->AttachBitmap(pBitmap); 22404 if (ok) ok = InsertNode(pAttr); 22405 } 22406 else 22407 ok = FALSE; 22408 } 22409 else 22410 ok = FALSE; 22411 } 22412 22413 return ok; 22414 }
|
|
|
Handles the given record. The record has to be a conical fill record.
Definition at line 21027 of file fillattr.cpp. 21028 { 21029 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 21030 ERROR2IF(pCXaraFileRecord->GetTag() != TAG_CONICALFILL,FALSE,"I don't handle this tag type"); 21031 21032 BOOL ok = TRUE; 21033 21034 DocCoord StartPoint, EndPoint; 21035 INT32 StartColourRef,EndColourRef; 21036 double Bias = 0, Gain = 0; 21037 double* ptrBias = &Bias, *ptrGain = &Gain; 21038 21039 // Read in the conical fill data 21040 if (ok) ok = pCXaraFileRecord->ReadCoord(&StartPoint); 21041 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint); 21042 if (ok) ok = pCXaraFileRecord->ReadINT32(&StartColourRef); 21043 if (ok) ok = pCXaraFileRecord->ReadINT32(&EndColourRef); 21044 if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrBias); 21045 if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrGain); 21046 21047 CProfileBiasGain Profile; 21048 21049 if ((ptrBias != NULL) && (ptrGain != NULL)) 21050 { 21051 Profile.SetBias((AFp) Bias); 21052 Profile.SetGain((AFp) Gain); 21053 } 21054 21055 if (ok) 21056 { 21057 AttrConicalColourFill* pAttr = new AttrConicalColourFill; 21058 if (pAttr != NULL) 21059 { 21060 // Get a ptr to the attr value object 21061 ConicalFillAttribute* pValue = (ConicalFillAttribute*)pAttr->GetAttributeValue(); 21062 21063 if (pValue != NULL) 21064 { 21065 // Store the start and end points 21066 pValue->SetStartPoint(&StartPoint); 21067 pValue->SetEndPoint(&EndPoint); 21068 pValue->SetEndPoint2(NULL); 21069 21070 // Store the profile 21071 pValue->SetProfile (Profile); 21072 21073 // Convert the colour references into doc colours, and insert the attr into the tree 21074 if (ok) ok = GetDocColour(StartColourRef,&(pValue->Colour)); 21075 if (ok) ok = GetDocColour(EndColourRef,&(pValue->EndColour)); 21076 if (ok) ok = InsertNode(pAttr); 21077 } 21078 else 21079 ok = FALSE; 21080 } 21081 else 21082 ok = FALSE; 21083 } 21084 21085 return ok; 21086 }
|
|
|
Handles the given record. The record has to be a Conical transparent fill record.
Definition at line 22058 of file fillattr.cpp. 22059 { 22060 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 22061 ERROR2IF(pCXaraFileRecord->GetTag() != TAG_CONICALTRANSPARENTFILL,FALSE,"I don't handle this tag type"); 22062 22063 BOOL ok = TRUE; 22064 22065 DocCoord StartPoint, EndPoint; 22066 BYTE Transp,EndTransp,TranspType; 22067 double Bias = 0, Gain = 0; 22068 double* ptrBias = &Bias, *ptrGain = &Gain; 22069 22070 if (ok) ok = pCXaraFileRecord->ReadCoord(&StartPoint); 22071 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint); 22072 if (ok) ok = pCXaraFileRecord->ReadBYTE(&Transp); 22073 if (ok) ok = pCXaraFileRecord->ReadBYTE(&EndTransp); 22074 if (ok) ok = pCXaraFileRecord->ReadBYTE(&TranspType); 22075 if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrBias); 22076 if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrGain); 22077 22078 CProfileBiasGain Profile; 22079 22080 if ((ptrBias != NULL) && (ptrGain != NULL)) 22081 { 22082 Profile.SetBias((AFp) Bias); 22083 Profile.SetGain((AFp) Gain); 22084 } 22085 22086 if (ok) 22087 { 22088 AttrConicalTranspFill* pAttr = new AttrConicalTranspFill; 22089 if (pAttr != NULL) 22090 { 22091 ConicalTranspFillAttribute* pValue = (ConicalTranspFillAttribute*)pAttr->GetAttributeValue(); 22092 22093 if (pValue != NULL) 22094 { 22095 pValue->SetStartPoint(&StartPoint); 22096 pValue->SetEndPoint(&EndPoint); 22097 pValue->Transp = UINT32(Transp); 22098 pValue->EndTransp = UINT32(EndTransp); 22099 pValue->TranspType = UINT32(TranspType); 22100 pValue->SetProfile (Profile); 22101 ok = InsertNode(pAttr); 22102 } 22103 else 22104 ok = FALSE; 22105 } 22106 else 22107 ok = FALSE; 22108 } 22109 22110 return ok; 22111 }
|
|
|
Handles the given record. The record has to be a elliptical or circular fill record.
Definition at line 20828 of file fillattr.cpp. 20829 { 20830 UINT32 Tag = pCXaraFileRecord->GetTag(); 20831 20832 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 20833 ERROR2IF(Tag != TAG_ELLIPTICALFILL && Tag != TAG_CIRCULARFILL,FALSE,"I don't handle this tag type"); 20834 20835 BOOL ok = TRUE; 20836 20837 DocCoord StartPoint, EndPoint, EndPoint2; 20838 INT32 StartColourRef,EndColourRef; 20839 double Bias = 0, Gain = 0; 20840 double* ptrBias = &Bias, *ptrGain = &Gain; 20841 20842 // Read in the elliptical/circular fill data 20843 if (ok) ok = pCXaraFileRecord->ReadCoord(&StartPoint); 20844 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint); 20845 20846 if (ok && Tag == TAG_ELLIPTICALFILL) // Ellipses have an extra control point 20847 ok = pCXaraFileRecord->ReadCoord(&EndPoint2); 20848 20849 if (ok) ok = pCXaraFileRecord->ReadINT32(&StartColourRef); 20850 if (ok) ok = pCXaraFileRecord->ReadINT32(&EndColourRef); 20851 if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrBias); 20852 if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrGain); 20853 20854 CProfileBiasGain Profile; 20855 20856 if ((ptrBias != NULL) && (ptrGain != NULL)) 20857 { 20858 Profile.SetBias((AFp) Bias); 20859 Profile.SetGain((AFp) Gain); 20860 } 20861 20862 if (ok) 20863 { 20864 AttrRadialColourFill* pAttr = new AttrRadialColourFill; 20865 if (pAttr != NULL) 20866 { 20867 // Get a ptr to the attr value object 20868 RadialFillAttribute* pValue = (RadialFillAttribute*)pAttr->GetAttributeValue(); 20869 20870 if (pValue != NULL) 20871 { 20872 // Store the start and end points 20873 pValue->SetStartPoint(&StartPoint); 20874 pValue->SetEndPoint(&EndPoint); 20875 20876 if (Tag == TAG_ELLIPTICALFILL) 20877 { 20878 pValue->SetEndPoint2(&EndPoint2); 20879 pValue->MakeElliptical(); 20880 } 20881 else 20882 pValue->MakeCircular(); 20883 20884 // Store the profile 20885 pValue->SetProfile (Profile); 20886 20887 // Convert the colour references into doc colours, and insert the attr into the tree 20888 if (ok) ok = GetDocColour(StartColourRef,&(pValue->Colour)); 20889 if (ok) ok = GetDocColour(EndColourRef,&(pValue->EndColour)); 20890 if (ok) ok = InsertNode(pAttr); 20891 } 20892 else 20893 ok = FALSE; 20894 } 20895 else 20896 ok = FALSE; 20897 } 20898 20899 return ok; 20900 }
|
|
|
Handles the given record. The record has to be an Elliptical or circular transparent fill record.
Definition at line 21973 of file fillattr.cpp. 21974 { 21975 UINT32 Tag = pCXaraFileRecord->GetTag(); 21976 21977 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 21978 ERROR2IF(Tag != TAG_ELLIPTICALTRANSPARENTFILL && Tag != TAG_CIRCULARTRANSPARENTFILL,FALSE,"I don't handle this tag type"); 21979 21980 BOOL ok = TRUE; 21981 21982 DocCoord StartPoint, EndPoint, EndPoint2; 21983 BYTE Transp,EndTransp,TranspType; 21984 double Bias = 0, Gain = 0; 21985 double* ptrBias = &Bias, *ptrGain = &Gain; 21986 21987 if (ok) ok = pCXaraFileRecord->ReadCoord(&StartPoint); 21988 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint); 21989 21990 if (ok && Tag == TAG_ELLIPTICALTRANSPARENTFILL) 21991 ok = pCXaraFileRecord->ReadCoord(&EndPoint2); 21992 21993 if (ok) ok = pCXaraFileRecord->ReadBYTE(&Transp); 21994 if (ok) ok = pCXaraFileRecord->ReadBYTE(&EndTransp); 21995 if (ok) ok = pCXaraFileRecord->ReadBYTE(&TranspType); 21996 if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrBias); 21997 if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrGain); 21998 21999 CProfileBiasGain Profile; 22000 22001 if ((ptrBias != NULL) && (ptrGain != NULL)) 22002 { 22003 Profile.SetBias((AFp) Bias); 22004 Profile.SetGain((AFp) Gain); 22005 } 22006 22007 if (ok) 22008 { 22009 AttrRadialTranspFill* pAttr = new AttrRadialTranspFill; 22010 if (pAttr != NULL) 22011 { 22012 RadialTranspFillAttribute* pValue = (RadialTranspFillAttribute*)pAttr->GetAttributeValue(); 22013 22014 if (pValue != NULL) 22015 { 22016 pValue->SetStartPoint(&StartPoint); 22017 pValue->SetEndPoint(&EndPoint); 22018 22019 if (Tag == TAG_ELLIPTICALTRANSPARENTFILL) 22020 { 22021 pValue->SetEndPoint2(&EndPoint2); 22022 pValue->MakeElliptical(); 22023 } 22024 else 22025 pValue->MakeCircular(); 22026 22027 pValue->Transp = UINT32(Transp); 22028 pValue->EndTransp = UINT32(EndTransp); 22029 pValue->TranspType = UINT32(TranspType); 22030 pValue->SetProfile (Profile); 22031 ok = InsertNode(pAttr); 22032 } 22033 else 22034 ok = FALSE; 22035 } 22036 else 22037 ok = FALSE; 22038 } 22039 22040 return ok; 22041 }
|
|
|
Handles the given record. The record has to be a linear fill record.
Definition at line 22725 of file fillattr.cpp. 22726 { 22727 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 22728 22729 AttrFillEffect* pAttr = NULL; 22730 switch (pCXaraFileRecord->GetTag()) 22731 { 22732 case TAG_FILLEFFECT_ALTRAINBOW: pAttr = new AttrFillEffectAltRainbow; break; 22733 case TAG_FILLEFFECT_RAINBOW: pAttr = new AttrFillEffectRainbow; break; 22734 case TAG_FILLEFFECT_FADE: pAttr = new AttrFillEffectFade; break; 22735 22736 default: 22737 ERROR3("Do what? I only do fill effect records mate"); 22738 return TRUE; 22739 break; 22740 } 22741 22742 if (pAttr != NULL) 22743 return InsertNode(pAttr); 22744 22745 return FALSE; 22746 }
|
|
|
Handles the given record. The record has to be a fill repeat record.
Definition at line 22631 of file fillattr.cpp. 22632 { 22633 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 22634 22635 INT32 Repeat; 22636 22637 switch (pCXaraFileRecord->GetTag()) 22638 { 22639 case TAG_FILL_NONREPEATING: Repeat = 1; break; 22640 case TAG_FILL_REPEATING: Repeat = 2; break; 22641 case TAG_FILL_REPEATINGINVERTED:Repeat = 3; break; 22642 //Mark Howitt, 8/10/97. Make grad fills a special case for backwards compatability 22643 #ifdef NEW_FEATURES 22644 case TAG_FILL_REPEATING_EXTRA: Repeat = 4; break; 22645 #endif 22646 default: 22647 ERROR3("Do what? I only do fill repeat records mate"); 22648 return TRUE; 22649 break; 22650 } 22651 22652 AttrFillMappingLinear* pAttr = new AttrFillMappingLinear; 22653 if (pAttr != NULL) 22654 { 22655 pAttr->Value.Repeat = Repeat; 22656 return InsertNode(pAttr); 22657 } 22658 22659 return FALSE; 22660 }
|
|
|
Handles the given record. The record has to be a flat fill record.
Definition at line 20576 of file fillattr.cpp. 20577 { 20578 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 20579 20580 INT32 ColourRef; 20581 INT32 Tag = pCXaraFileRecord->GetTag(); 20582 BOOL ok = TRUE; 20583 // If it is the plain flat fill record then read the colour 20584 // If it is one of the flat fill default colour records then this is not required 20585 switch (Tag) 20586 { 20587 case TAG_FLATFILL: 20588 ok = pCXaraFileRecord->ReadINT32(&ColourRef); 20589 break; 20590 case TAG_FLATFILL_NONE: 20591 ColourRef = REF_DEFAULTCOLOUR_TRANSPARENT; 20592 break; 20593 case TAG_FLATFILL_BLACK: 20594 ColourRef = REF_DEFAULTCOLOUR_BLACK; 20595 break; 20596 case TAG_FLATFILL_WHITE: 20597 ColourRef = REF_DEFAULTCOLOUR_WHITE; 20598 break; 20599 default: 20600 ERROR2(FALSE,"I don't handle this tag type"); 20601 } 20602 20603 if (ok) 20604 { 20605 AttrFlatColourFill* pAttr = new AttrFlatColourFill; 20606 if (pAttr != NULL) 20607 { 20608 FlatFillAttribute* pValue = (FlatFillAttribute*)pAttr->GetAttributeValue(); 20609 20610 if (pValue != NULL) 20611 { 20612 if (ok) ok = GetDocColour(ColourRef,&(pValue->Colour)); 20613 if (ok) ok = InsertNode(pAttr); 20614 } 20615 else 20616 ok = FALSE; 20617 } 20618 else 20619 ok = FALSE; 20620 } 20621 20622 return ok; 20623 }
|
|
|
Handles the given record. The record has to be a flat transparent fill record.
Definition at line 21846 of file fillattr.cpp. 21847 { 21848 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 21849 ERROR2IF(pCXaraFileRecord->GetTag() != TAG_FLATTRANSPARENTFILL,FALSE,"I don't handle this tag type"); 21850 21851 BOOL ok = TRUE; 21852 21853 BYTE Transp,TranspType; 21854 21855 if (ok) ok = pCXaraFileRecord->ReadBYTE(&Transp); 21856 if (ok) ok = pCXaraFileRecord->ReadBYTE(&TranspType); 21857 21858 if (ok) 21859 { 21860 AttrFlatTranspFill* pAttr = new AttrFlatTranspFill; 21861 if (pAttr != NULL) 21862 { 21863 FlatTranspFillAttribute* pValue = (FlatTranspFillAttribute*)pAttr->GetAttributeValue(); 21864 21865 if (pValue != NULL) 21866 { 21867 pValue->Transp = UINT32(Transp); 21868 pValue->TranspType = UINT32(TranspType); 21869 ok = InsertNode(pAttr); 21870 } 21871 else 21872 ok = FALSE; 21873 } 21874 else 21875 ok = FALSE; 21876 } 21877 21878 return ok; 21879 }
|
|
|
Handles the given record. The record has to be a FourCol fill record.
Definition at line 21460 of file fillattr.cpp. 21461 { 21462 UINT32 Tag = pCXaraFileRecord->GetTag(); 21463 21464 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 21465 ERROR2IF(Tag != TAG_FOURCOLFILL,FALSE,"I don't handle this tag type"); 21466 21467 BOOL ok = TRUE; 21468 21469 DocCoord StartPoint; 21470 DocCoord EndPoint; 21471 DocCoord EndPoint2; 21472 INT32 StartColourRef; 21473 INT32 EndColourRef; 21474 INT32 EndColour2Ref; 21475 INT32 EndColour3Ref; 21476 21477 // Read in the elliptical/circular fill data 21478 if (ok) ok = pCXaraFileRecord->ReadCoord(&StartPoint); 21479 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint); 21480 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint2); 21481 21482 if (ok) ok = pCXaraFileRecord->ReadINT32(&StartColourRef); 21483 if (ok) ok = pCXaraFileRecord->ReadINT32(&EndColourRef); 21484 if (ok) ok = pCXaraFileRecord->ReadINT32(&EndColour2Ref); 21485 if (ok) ok = pCXaraFileRecord->ReadINT32(&EndColour3Ref); 21486 21487 if (ok) 21488 { 21489 AttrFourColColourFill* pAttr = new AttrFourColColourFill; 21490 if (pAttr != NULL) 21491 { 21492 // Get a ptr to the attr value object 21493 FourColFillAttribute* pValue = (FourColFillAttribute*)pAttr->GetAttributeValue(); 21494 21495 if (pValue != NULL) 21496 { 21497 // Store the start and end points 21498 pValue->SetStartPoint(&StartPoint); 21499 pValue->SetEndPoint(&EndPoint); 21500 pValue->SetEndPoint2(&EndPoint2); 21501 21502 // Convert the colour references into doc colours, and insert the attr into the tree 21503 if (ok) ok = GetDocColour(StartColourRef,&(pValue->Colour)); 21504 if (ok) ok = GetDocColour(EndColourRef,&(pValue->EndColour)); 21505 if (ok) ok = GetDocColour(EndColour2Ref,&(pValue->EndColour2)); 21506 if (ok) ok = GetDocColour(EndColour3Ref,&(pValue->EndColour3)); 21507 if (ok) ok = InsertNode(pAttr); 21508 } 21509 else 21510 ok = FALSE; 21511 } 21512 else 21513 ok = FALSE; 21514 } 21515 21516 return ok; 21517 }
|
|
|
Handles the given record. The record has to be a FourCol transparent fill record.
Definition at line 22274 of file fillattr.cpp. 22275 { 22276 UINT32 Tag = pCXaraFileRecord->GetTag(); 22277 22278 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 22279 ERROR2IF(Tag != TAG_FOURCOLTRANSPARENTFILL,FALSE,"I don't handle this tag type"); 22280 22281 BOOL ok = TRUE; 22282 22283 DocCoord StartPoint; 22284 DocCoord EndPoint; 22285 DocCoord EndPoint2; 22286 BYTE Transp; 22287 BYTE EndTransp; 22288 BYTE EndTransp2; 22289 BYTE EndTransp3; 22290 BYTE TranspType; 22291 22292 if (ok) ok = pCXaraFileRecord->ReadCoord(&StartPoint); 22293 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint); 22294 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint2); 22295 22296 if (ok) ok = pCXaraFileRecord->ReadBYTE(&Transp); 22297 if (ok) ok = pCXaraFileRecord->ReadBYTE(&EndTransp); 22298 if (ok) ok = pCXaraFileRecord->ReadBYTE(&EndTransp2); 22299 if (ok) ok = pCXaraFileRecord->ReadBYTE(&EndTransp3); 22300 if (ok) ok = pCXaraFileRecord->ReadBYTE(&TranspType); 22301 22302 if (ok) 22303 { 22304 AttrFourColTranspFill* pAttr = new AttrFourColTranspFill; 22305 if (pAttr != NULL) 22306 { 22307 FourColTranspFillAttribute* pValue = (FourColTranspFillAttribute*)pAttr->GetAttributeValue(); 22308 22309 if (pValue != NULL) 22310 { 22311 pValue->SetStartPoint(&StartPoint); 22312 pValue->SetEndPoint(&EndPoint); 22313 pValue->SetEndPoint2(&EndPoint2); 22314 22315 pValue->Transp = UINT32(Transp); 22316 pValue->EndTransp = UINT32(EndTransp); 22317 pValue->EndTransp2 = UINT32(EndTransp2); 22318 pValue->EndTransp3 = UINT32(EndTransp3); 22319 pValue->TranspType = UINT32(TranspType); 22320 ok = InsertNode(pAttr); 22321 } 22322 else 22323 ok = FALSE; 22324 } 22325 else 22326 ok = FALSE; 22327 } 22328 22329 return ok; 22330 }
|
|
|
Handles the given record. The record must be a fractal fill record.
Definition at line 21637 of file fillattr.cpp. 21638 { 21639 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 21640 ERROR2IF(pCXaraFileRecord->GetTag() != TAG_FRACTALFILL,FALSE,"I don't handle this tag type"); 21641 21642 BOOL ok = TRUE; 21643 21644 DocCoord StartPoint, EndPoint, EndPoint2; 21645 INT32 StartColRef,EndColRef, Seed, DPI; 21646 FIXED16 Graininess, Gravity, Squash; 21647 BYTE Tileable; 21648 double Bias = 0, Gain = 0; 21649 double* ptrBias = &Bias, *ptrGain = &Gain; 21650 21651 // Read in the fractal fill data 21652 if (ok) ok = pCXaraFileRecord->ReadCoord(&StartPoint); 21653 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint); 21654 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint2); 21655 if (ok) ok = pCXaraFileRecord->ReadINT32(&StartColRef); 21656 if (ok) ok = pCXaraFileRecord->ReadINT32(&EndColRef); 21657 21658 if (ok) ok = pCXaraFileRecord->ReadINT32(&Seed); 21659 if (ok) ok = pCXaraFileRecord->ReadFIXED16(&Graininess); 21660 if (ok) ok = pCXaraFileRecord-> |