#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->ReadFIXED16(&Gravity); 21661 if (ok) ok = pCXaraFileRecord->ReadFIXED16(&Squash); 21662 if (ok) ok = pCXaraFileRecord->ReadINT32(&DPI); 21663 if (ok) ok = pCXaraFileRecord->ReadBYTE(&Tileable); 21664 if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrBias); 21665 if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrGain); 21666 21667 CProfileBiasGain Profile; 21668 21669 if ((ptrBias != NULL) && (ptrGain != NULL)) 21670 { 21671 Profile.SetBias((AFp) Bias); 21672 Profile.SetGain((AFp) Gain); 21673 } 21674 21675 if (ok) 21676 { 21677 AttrFractalColourFill* pAttr = new AttrFractalColourFill; 21678 if (pAttr != NULL) 21679 { 21680 // Get a ptr to the attr value object 21681 FractalFillAttribute* pValue = (FractalFillAttribute*)pAttr->GetAttributeValue(); 21682 21683 if (pValue != NULL) 21684 { 21685 // Store the start and end points 21686 pValue->SetStartPoint(&StartPoint); 21687 pValue->SetEndPoint(&EndPoint); 21688 pValue->SetEndPoint2(&EndPoint2); 21689 21690 // Store the fractal data 21691 pValue->SetSeed(Seed); 21692 pValue->SetGraininess(Graininess); 21693 pValue->SetGravity(Gravity); 21694 pValue->SetSquash(Squash); 21695 pValue->SetFractalDPI(DPI); 21696 pValue->SetTileable(Tileable); 21697 21698 DocColour StartCol,EndCol; 21699 21700 // Convert the colour references into doc colours 21701 if (ok) ok = GetDocColour(StartColRef,&StartCol); 21702 if (ok) ok = GetDocColour(EndColRef,&EndCol); 21703 if (ok) 21704 { 21705 pValue->SetStartColour(&StartCol); 21706 pValue->SetEndColour(&EndCol); 21707 } 21708 21709 // Store the profile 21710 pValue->SetProfile (Profile); 21711 21712 // Recreate the fractal, and insert the attr into the tree 21713 if (ok) ok = pValue->RecalcFractal(); 21714 if (ok) ok = InsertNode(pAttr); 21715 } 21716 else 21717 ok = FALSE; 21718 } 21719 else 21720 ok = FALSE; 21721 } 21722 21723 return ok; 21724 }
|
|
Handles the given record. The record must be a transparent fractal fill record.
Definition at line 22431 of file fillattr.cpp. 22432 { 22433 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 22434 ERROR2IF(pCXaraFileRecord->GetTag() != TAG_FRACTALTRANSPARENTFILL,FALSE,"I don't handle this tag type"); 22435 22436 BOOL ok = TRUE; 22437 22438 DocCoord StartPoint, EndPoint, EndPoint2; 22439 BYTE Transp,EndTransp,TranspType; 22440 INT32 Seed, DPI; 22441 FIXED16 Graininess, Gravity, Squash; 22442 BYTE Tileable; 22443 double Bias = 0, Gain = 0; 22444 double* ptrBias = &Bias, *ptrGain = &Gain; 22445 22446 // Read in the fractal fill data 22447 if (ok) ok = pCXaraFileRecord->ReadCoord(&StartPoint); 22448 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint); 22449 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint2); 22450 if (ok) ok = pCXaraFileRecord->ReadBYTE(&Transp); 22451 if (ok) ok = pCXaraFileRecord->ReadBYTE(&EndTransp); 22452 if (ok) ok = pCXaraFileRecord->ReadBYTE(&TranspType); 22453 22454 if (ok) ok = pCXaraFileRecord->ReadINT32(&Seed); 22455 if (ok) ok = pCXaraFileRecord->ReadFIXED16(&Graininess); 22456 if (ok) ok = pCXaraFileRecord->ReadFIXED16(&Gravity); 22457 if (ok) ok = pCXaraFileRecord->ReadFIXED16(&Squash); 22458 if (ok) ok = pCXaraFileRecord->ReadINT32(&DPI); 22459 if (ok) ok = pCXaraFileRecord->ReadBYTE(&Tileable); 22460 if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrBias); 22461 if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrGain); 22462 22463 CProfileBiasGain Profile; 22464 22465 if ((ptrBias != NULL) && (ptrGain != NULL)) 22466 { 22467 Profile.SetBias((AFp) Bias); 22468 Profile.SetGain((AFp) Gain); 22469 } 22470 22471 if (ok) 22472 { 22473 AttrFractalTranspFill* pAttr = new AttrFractalTranspFill; 22474 if (pAttr != NULL) 22475 { 22476 // Get a ptr to the attr value object 22477 FractalTranspFillAttribute* pValue = (FractalTranspFillAttribute*)pAttr->GetAttributeValue(); 22478 22479 if (pValue != NULL) 22480 { 22481 // Store the start and end points 22482 pValue->SetStartPoint(&StartPoint); 22483 pValue->SetEndPoint(&EndPoint); 22484 pValue->SetEndPoint2(&EndPoint2); 22485 pValue->Transp = UINT32(Transp); 22486 pValue->EndTransp = UINT32(EndTransp); 22487 pValue->TranspType = UINT32(TranspType); 22488 22489 // Store the fractal data 22490 pValue->SetSeed(Seed); 22491 pValue->SetGraininess(Graininess); 22492 pValue->SetGravity(Gravity); 22493 pValue->SetSquash(Squash); 22494 pValue->SetFractalDPI(DPI); 22495 pValue->SetTileable(Tileable); 22496 pValue->SetProfile (Profile); 22497 22498 // Recreate the fractal, and insert the attr into the tree 22499 if (ok) ok = pValue->RecalcFractal(); 22500 if (ok) ok = InsertNode(pAttr); 22501 } 22502 else 22503 ok = FALSE; 22504 } 22505 else 22506 ok = FALSE; 22507 } 22508 22509 return ok; 22510 }
|
|
Handles the given record. The record has to be a linear fill record.
Definition at line 20640 of file fillattr.cpp. 20641 { 20642 UINT32 tag = pCXaraFileRecord->GetTag(); 20643 ERROR2IF(pCXaraFileRecord == NULL, FALSE, "pCXaraFileRecord is NULL"); 20644 ERROR2IF(tag!=TAG_LINEARFILL && tag!=TAG_LINEARFILL3POINT, FALSE, "I don't handle this tag type"); 20645 20646 BOOL ok = TRUE; 20647 BOOL b3PointLinear = (tag==TAG_LINEARFILL3POINT); 20648 20649 DocCoord StartPoint, EndPoint, EndPoint2; 20650 INT32 StartColourRef,EndColourRef; 20651 double Bias = 0, Gain = 0; 20652 double* ptrBias = &Bias, *ptrGain = &Gain; 20653 20654 // Read in the linear fill data 20655 if (ok) ok = pCXaraFileRecord->ReadCoord(&StartPoint); 20656 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint); 20657 if (ok && b3PointLinear) ok = pCXaraFileRecord->ReadCoord(&EndPoint2); 20658 if (ok) ok = pCXaraFileRecord->ReadINT32(&StartColourRef); 20659 if (ok) ok = pCXaraFileRecord->ReadINT32(&EndColourRef); 20660 if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrBias); 20661 if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrGain); 20662 20663 CProfileBiasGain Profile; 20664 20665 if ((ptrBias != NULL) && (ptrGain != NULL)) 20666 { 20667 Profile.SetBias((AFp) Bias); 20668 Profile.SetGain((AFp) Gain); 20669 } 20670 20671 if (ok) 20672 { 20673 AttrLinearColourFill* pAttr = new AttrLinearColourFill; 20674 if (pAttr != NULL) 20675 { 20676 // Get a ptr to the attr value object 20677 LinearFillAttribute* pValue = (LinearFillAttribute*)pAttr->GetAttributeValue(); 20678 20679 if (pValue != NULL) 20680 { 20681 // Store the start and end points 20682 pValue->SetStartPoint(&StartPoint); 20683 pValue->SetEndPoint(&EndPoint); 20684 if (b3PointLinear) 20685 pValue->SetEndPoint2(&EndPoint2); 20686 else 20687 pValue->SetEndPoint2(NULL); 20688 20689 // Store the profile 20690 pValue->SetProfile (Profile); 20691 20692 // Convert the colour references into doc colours, and insert the attr into the tree 20693 if (ok) ok = GetDocColour(StartColourRef,&(pValue->Colour)); 20694 if (ok) ok = GetDocColour(EndColourRef,&(pValue->EndColour)); 20695 if (ok) ok = InsertNode(pAttr); 20696 } 20697 else 20698 ok = FALSE; 20699 } 20700 else 20701 ok = FALSE; 20702 } 20703 20704 return ok; 20705 }
|
|
Handles the given record. The record has to be a Linear transparent fill record.
Definition at line 21896 of file fillattr.cpp. 21897 { 21898 UINT32 tag = pCXaraFileRecord->GetTag(); 21899 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 21900 ERROR2IF(tag!=TAG_LINEARTRANSPARENTFILL && tag!=TAG_LINEARTRANSPARENTFILL3POINT, FALSE, "I don't handle this tag type"); 21901 21902 BOOL ok = TRUE; 21903 BOOL b3PointLinear = (tag==TAG_LINEARTRANSPARENTFILL3POINT); 21904 21905 DocCoord StartPoint, EndPoint, EndPoint2; 21906 BYTE Transp,EndTransp,TranspType; 21907 double Bias = 0, Gain = 0; 21908 double* ptrBias = &Bias, *ptrGain = &Gain; 21909 21910 if (ok) ok = pCXaraFileRecord->ReadCoord(&StartPoint); 21911 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint); 21912 if (ok && b3PointLinear) ok = pCXaraFileRecord->ReadCoord(&EndPoint2); 21913 if (ok) ok = pCXaraFileRecord->ReadBYTE(&Transp); 21914 if (ok) ok = pCXaraFileRecord->ReadBYTE(&EndTransp); 21915 if (ok) ok = pCXaraFileRecord->ReadBYTE(&TranspType); 21916 if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrBias); 21917 if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrGain); 21918 21919 CProfileBiasGain Profile; 21920 21921 if ((ptrBias != NULL) && (ptrGain != NULL)) 21922 { 21923 Profile.SetBias((AFp) Bias); 21924 Profile.SetGain((AFp) Gain); 21925 } 21926 21927 if (ok) 21928 { 21929 AttrLinearTranspFill* pAttr = new AttrLinearTranspFill; 21930 if (pAttr != NULL) 21931 { 21932 LinearTranspFillAttribute* pValue = (LinearTranspFillAttribute*)pAttr->GetAttributeValue(); 21933 21934 if (pValue != NULL) 21935 { 21936 pValue->SetStartPoint(&StartPoint); 21937 pValue->SetEndPoint(&EndPoint); 21938 if (b3PointLinear) 21939 pValue->SetEndPoint2(&EndPoint2); 21940 else 21941 pValue->SetEndPoint2(NULL); 21942 pValue->Transp = UINT32(Transp); 21943 pValue->EndTransp = UINT32(EndTransp); 21944 pValue->TranspType = UINT32(TranspType); 21945 pValue->SetProfile (Profile); 21946 ok = InsertNode(pAttr); 21947 } 21948 else 21949 ok = FALSE; 21950 } 21951 else 21952 ok = FALSE; 21953 } 21954 21955 return ok; 21956 }
|
|
Handles the given record. The record has to be a multistage circular fill.
Definition at line 20918 of file fillattr.cpp. 20920 { 20921 UINT32 Tag = pCXaraFileRecord->GetTag(); 20922 20923 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 20924 ERROR2IF(Tag != TAG_CIRCULARFILLMULTISTAGE && 20925 Tag != TAG_ELLIPTICALFILLMULTISTAGE,FALSE,"I don't handle this tag type"); 20926 20927 BOOL ok = TRUE; 20928 20929 DocCoord StartPoint, EndPoint, EndPoint2; 20930 INT32 StartColourRef,EndColourRef; 20931 20932 // Read in the elliptical/circular fill data 20933 if (ok) ok = pCXaraFileRecord->ReadCoord(&StartPoint); 20934 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint); 20935 20936 if (ok && Tag == TAG_ELLIPTICALFILLMULTISTAGE) // Ellipses have an extra control point 20937 ok = pCXaraFileRecord->ReadCoord(&EndPoint2); 20938 20939 if (ok) ok = pCXaraFileRecord->ReadINT32(&StartColourRef); 20940 if (ok) ok = pCXaraFileRecord->ReadINT32(&EndColourRef); 20941 20942 // now, read all the multi stage records 20943 INT32 * pColRecs = NULL; 20944 UINT32 NumRecords = 0; 20945 20946 if (ok) ok = pCXaraFileRecord->ReadUINT32(&NumRecords); 20947 20948 pColRecs = new INT32[NumRecords]; 20949 20950 double *pPositions = new double[NumRecords]; 20951 20952 for (UINT32 i = 0 ; i < NumRecords; i++) 20953 { 20954 if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&(pPositions[i])); 20955 if (ok) ok = pCXaraFileRecord->ReadINT32(&(pColRecs[i])); 20956 } 20957 20958 DocColour Colour; 20959 20960 if (ok) 20961 { 20962 AttrRadialColourFill* pAttr = new AttrRadialColourFill; 20963 if (pAttr != NULL) 20964 { 20965 // Get a ptr to the attr value object 20966 RadialFillAttribute* pValue = (RadialFillAttribute*)pAttr->GetAttributeValue(); 20967 20968 if (pValue != NULL) 20969 { 20970 // Store the start and end points 20971 pValue->SetStartPoint(&StartPoint); 20972 pValue->SetEndPoint(&EndPoint); 20973 20974 if (Tag == TAG_ELLIPTICALFILLMULTISTAGE) 20975 { 20976 pValue->SetEndPoint2(&EndPoint2); 20977 pValue->MakeElliptical(); 20978 } 20979 else 20980 pValue->MakeCircular(); 20981 20982 // Convert the colour references into doc colours, and insert the attr into the tree 20983 if (ok) ok = GetDocColour(StartColourRef,&(pValue->Colour)); 20984 if (ok) ok = GetDocColour(EndColourRef,&(pValue->EndColour)); 20985 20986 // create the colour ramp 20987 ColourRamp * pRamp = pValue->MakeNewColourRamp(); 20988 20989 for (UINT32 i = 0 ; i < NumRecords; i++) 20990 { 20991 // add a new ramp item 20992 if (ok) ok = GetDocColour(pColRecs[i], &Colour); 20993 20994 if (ok) pRamp->AddEntry((float)pPositions[i], &Colour); 20995 } 20996 20997 if (ok) ok = InsertNode(pAttr); 20998 } 20999 else 21000 ok = FALSE; 21001 } 21002 else 21003 ok = FALSE; 21004 } 21005 21006 delete [] pPositions; 21007 delete [] pColRecs; 21008 21009 return ok; 21010 }
|
|
Handles the given record. The record has to be a multi stage conical fill record.
Definition at line 21104 of file fillattr.cpp. 21105 { 21106 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 21107 ERROR2IF(pCXaraFileRecord->GetTag() != TAG_CONICALFILLMULTISTAGE,FALSE,"I don't handle this tag type"); 21108 21109 BOOL ok = TRUE; 21110 21111 DocCoord StartPoint, EndPoint; 21112 INT32 StartColourRef,EndColourRef; 21113 21114 // Read in the conical fill data 21115 if (ok) ok = pCXaraFileRecord->ReadCoord(&StartPoint); 21116 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint); 21117 if (ok) ok = pCXaraFileRecord->ReadINT32(&StartColourRef); 21118 if (ok) ok = pCXaraFileRecord->ReadINT32(&EndColourRef); 21119 21120 // now, read all the multi stage records 21121 INT32 * pColRecs = NULL; 21122 UINT32 NumRecords = 0; 21123 21124 if (ok) ok = pCXaraFileRecord->ReadUINT32(&NumRecords); 21125 21126 pColRecs = new INT32[NumRecords]; 21127 21128 double *pPositions = new double[NumRecords]; 21129 21130 UINT32 i; 21131 for( i = 0 ; i < NumRecords; i++) 21132 { 21133 if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&(pPositions[i])); 21134 if (ok) ok = pCXaraFileRecord->ReadINT32(&(pColRecs[i])); 21135 } 21136 21137 DocColour Colour; 21138 21139 if (ok) 21140 { 21141 AttrConicalColourFill* pAttr = new AttrConicalColourFill; 21142 if (pAttr != NULL) 21143 { 21144 // Get a ptr to the attr value object 21145 ConicalFillAttribute* pValue = (ConicalFillAttribute*)pAttr->GetAttributeValue(); 21146 21147 if (pValue != NULL) 21148 { 21149 // Store the start and end points 21150 pValue->SetStartPoint(&StartPoint); 21151 pValue->SetEndPoint(&EndPoint); 21152 pValue->SetEndPoint2(NULL); 21153 21154 // Convert the colour references into doc colours, and insert the attr into the tree 21155 if (ok) ok = GetDocColour(StartColourRef,&(pValue->Colour)); 21156 if (ok) ok = GetDocColour(EndColourRef,&(pValue->EndColour)); 21157 21158 // create the colour ramp 21159 ColourRamp * pRamp = pValue->MakeNewColourRamp(); 21160 21161 for (i = 0 ; i < NumRecords; i++) 21162 { 21163 // add a new ramp item 21164 if (ok) ok = GetDocColour(pColRecs[i], &Colour); 21165 21166 if (ok) pRamp->AddEntry((float)pPositions[i], &Colour); 21167 } 21168 21169 if (ok) ok = InsertNode(pAttr); 21170 } 21171 else 21172 ok = FALSE; 21173 } 21174 else 21175 ok = FALSE; 21176 } 21177 21178 if (pPositions) 21179 delete [] pPositions; 21180 21181 if (pColRecs) 21182 delete [] pColRecs; 21183 21184 return ok; 21185 }
|
|
Handles the given record. The record has to be a multi stage linear fill record.
Definition at line 20723 of file fillattr.cpp. 20724 { 20725 UINT32 tag = pCXaraFileRecord->GetTag(); 20726 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 20727 ERROR2IF(tag!=TAG_LINEARFILLMULTISTAGE && tag!=TAG_LINEARFILLMULTISTAGE3POINT, FALSE, "I don't handle this tag type"); 20728 20729 BOOL ok = TRUE; 20730 BOOL b3PointLinear = (tag==TAG_LINEARFILLMULTISTAGE3POINT); 20731 20732 DocCoord StartPoint, EndPoint, EndPoint2; 20733 INT32 StartColourRef,EndColourRef; 20734 20735 // Read in the linear fill data 20736 if (ok) ok = pCXaraFileRecord->ReadCoord(&StartPoint); 20737 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint); 20738 if (ok && b3PointLinear) ok = pCXaraFileRecord->ReadCoord(&EndPoint2); 20739 if (ok) ok = pCXaraFileRecord->ReadINT32(&StartColourRef); 20740 if (ok) ok = pCXaraFileRecord->ReadINT32(&EndColourRef); 20741 20742 // now, read all the multi stage records 20743 INT32 * pColRecs = NULL; 20744 UINT32 NumRecords = 0; 20745 20746 if (ok) ok = pCXaraFileRecord->ReadUINT32(&NumRecords); 20747 20748 pColRecs = new INT32[NumRecords]; 20749 20750 double *pPositions = new double[NumRecords]; 20751 20752 UINT32 i; 20753 for( i = 0 ; i < NumRecords; i++) 20754 { 20755 if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&(pPositions[i])); 20756 if (ok) ok = pCXaraFileRecord->ReadINT32(&(pColRecs[i])); 20757 } 20758 20759 DocColour Colour; 20760 20761 if (ok) 20762 { 20763 AttrLinearColourFill* pAttr = new AttrLinearColourFill; 20764 if (pAttr != NULL) 20765 { 20766 // Get a ptr to the attr value object 20767 LinearFillAttribute* pValue = (LinearFillAttribute*)pAttr->GetAttributeValue(); 20768 20769 if (pValue != NULL) 20770 { 20771 // Store the start and end points 20772 pValue->SetStartPoint(&StartPoint); 20773 pValue->SetEndPoint(&EndPoint); 20774 if (b3PointLinear) 20775 pValue->SetEndPoint2(&EndPoint2); 20776 else 20777 pValue->SetEndPoint2(NULL); 20778 20779 // Convert the colour references into doc colours, and insert the attr into the tree 20780 if (ok) ok = GetDocColour(StartColourRef,&(pValue->Colour)); 20781 if (ok) ok = GetDocColour(EndColourRef,&(pValue->EndColour)); 20782 20783 // create the colour ramp 20784 ColourRamp * pRamp = pValue->MakeNewColourRamp(); 20785 20786 for (i = 0 ; i < NumRecords; i++) 20787 { 20788 // add a new ramp item 20789 if (ok) ok = GetDocColour(pColRecs[i], &Colour); 20790 20791 if (ok) pRamp->AddEntry((float)pPositions[i], &Colour); 20792 } 20793 20794 if (ok) ok = InsertNode(pAttr); 20795 } 20796 else 20797 ok = FALSE; 20798 } 20799 else 20800 ok = FALSE; 20801 } 20802 20803 if (pPositions) 20804 delete [] pPositions; 20805 20806 if (pColRecs) 20807 delete [] pColRecs; 20808 20809 return ok; 20810 }
|
|
Handles the given record. The record has to be a multi-stage square fill record.
Definition at line 21283 of file fillattr.cpp. 21284 { 21285 UINT32 Tag = pCXaraFileRecord->GetTag(); 21286 21287 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 21288 ERROR2IF(Tag != TAG_SQUAREFILLMULTISTAGE,FALSE,"I don't handle this tag type"); 21289 21290 BOOL ok = TRUE; 21291 21292 DocCoord StartPoint, EndPoint, EndPoint2; 21293 INT32 StartColourRef,EndColourRef; 21294 // double Bias = 0, Gain = 0; 21295 // double* ptrBias = &Bias, *ptrGain = &Gain; 21296 21297 // Read in the elliptical/circular fill data 21298 if (ok) ok = pCXaraFileRecord->ReadCoord(&StartPoint); 21299 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint); 21300 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint2); 21301 21302 if (ok) ok = pCXaraFileRecord->ReadINT32(&StartColourRef); 21303 if (ok) ok = pCXaraFileRecord->ReadINT32(&EndColourRef); 21304 // if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrBias); 21305 // if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrGain); 21306 21307 // now, read all the multi stage records 21308 INT32 * pColRecs = NULL; 21309 UINT32 NumRecords = 0; 21310 21311 if (ok) ok = pCXaraFileRecord->ReadUINT32(&NumRecords); 21312 21313 pColRecs = new INT32[NumRecords]; 21314 21315 double *pPositions = new double[NumRecords]; 21316 21317 UINT32 i; 21318 for( i = 0 ; i < NumRecords; i++) 21319 { 21320 if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&(pPositions[i])); 21321 if (ok) ok = pCXaraFileRecord->ReadINT32(&(pColRecs[i])); 21322 } 21323 21324 DocColour Colour; 21325 21326 if (ok) 21327 { 21328 AttrSquareColourFill* pAttr = new AttrSquareColourFill; 21329 if (pAttr != NULL) 21330 { 21331 // Get a ptr to the attr value object 21332 SquareFillAttribute* pValue = (SquareFillAttribute*)pAttr->GetAttributeValue(); 21333 21334 if (pValue != NULL) 21335 { 21336 // Store the start and end points 21337 pValue->SetStartPoint(&StartPoint); 21338 pValue->SetEndPoint(&EndPoint); 21339 pValue->SetEndPoint2(&EndPoint2); 21340 21341 // Convert the colour references into doc colours, and insert the attr into the tree 21342 if (ok) ok = GetDocColour(StartColourRef,&(pValue->Colour)); 21343 if (ok) ok = GetDocColour(EndColourRef,&(pValue->EndColour)); 21344 21345 // create the colour ramp 21346 ColourRamp * pRamp = pValue->MakeNewColourRamp(); 21347 21348 for (i = 0 ; i < NumRecords; i++) 21349 { 21350 // add a new ramp item 21351 if (ok) ok = GetDocColour(pColRecs[i], &Colour); 21352 21353 if (ok) pRamp->AddEntry((float)pPositions[i], &Colour); 21354 } 21355 21356 if (ok) ok = InsertNode(pAttr); 21357 } 21358 else 21359 ok = FALSE; 21360 } 21361 else 21362 ok = FALSE; 21363 } 21364 21365 if (pPositions) 21366 delete [] pPositions; 21367 21368 if (pColRecs) 21369 delete [] pColRecs; 21370 21371 return ok; 21372 }
|
|
Handles the given record. The record must be a noise fill record.
Definition at line 21742 of file fillattr.cpp. 21743 { 21744 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 21745 ERROR2IF(pCXaraFileRecord->GetTag() != TAG_NOISEFILL,FALSE,"I don't handle this tag type"); 21746 21747 BOOL ok = TRUE; 21748 21749 DocCoord StartPoint, EndPoint, EndPoint2; 21750 INT32 StartColRef,EndColRef, DPI; 21751 FIXED16 Grain; 21752 INT32 Seed; 21753 BYTE Tileable; 21754 double Bias = 0, Gain = 0; 21755 double* ptrBias = &Bias, *ptrGain = &Gain; 21756 21757 // Read in the fractal fill data 21758 if (ok) ok = pCXaraFileRecord->ReadCoord(&StartPoint); 21759 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint); 21760 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint2); 21761 if (ok) ok = pCXaraFileRecord->ReadINT32(&StartColRef); 21762 if (ok) ok = pCXaraFileRecord->ReadINT32(&EndColRef); 21763 if (ok) ok = pCXaraFileRecord->ReadFIXED16(&Grain); 21764 if (ok) ok = pCXaraFileRecord->ReadINT32(&Seed); 21765 if (ok) ok = pCXaraFileRecord->ReadINT32(&DPI); 21766 if (ok) ok = pCXaraFileRecord->ReadBYTE(&Tileable); 21767 if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrBias); 21768 if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrGain); 21769 21770 CProfileBiasGain Profile; 21771 21772 if ((ptrBias != NULL) && (ptrGain != NULL)) 21773 { 21774 Profile.SetBias((AFp) Bias); 21775 Profile.SetGain((AFp) Gain); 21776 } 21777 21778 if (ok) 21779 { 21780 AttrNoiseColourFill* pAttr = new AttrNoiseColourFill; 21781 if (pAttr != NULL) 21782 { 21783 // Get a ptr to the attr value object 21784 NoiseFillAttribute* pValue = (NoiseFillAttribute*)pAttr->GetAttributeValue(); 21785 21786 if (pValue != NULL) 21787 { 21788 // Store the start and end points 21789 pValue->SetStartPoint(&StartPoint); 21790 pValue->SetEndPoint(&EndPoint); 21791 pValue->SetEndPoint2(&EndPoint2); 21792 21793 // Store the noise data 21794 pValue->SetGraininess(Grain); 21795 pValue->SetSeed(Seed); 21796 pValue->SetFractalDPI(DPI); 21797 pValue->SetTileable(Tileable); 21798 21799 DocColour StartCol,EndCol; 21800 21801 // Convert the colour references into doc colours 21802 if (ok) ok = GetDocColour(StartColRef,&StartCol); 21803 if (ok) ok = GetDocColour(EndColRef,&EndCol); 21804 if (ok) 21805 { 21806 pValue->SetStartColour(&StartCol); 21807 pValue->SetEndColour(&EndCol); 21808 } 21809 21810 // Store the profile 21811 pValue->SetProfile (Profile); 21812 21813 // Recreate the fractal, and insert the attr into the tree 21814 if (ok) ok = pValue->RecalcFractal(); 21815 if (ok) ok = InsertNode(pAttr); 21816 } 21817 else 21818 ok = FALSE; 21819 } 21820 else 21821 ok = FALSE; 21822 } 21823 21824 return ok; 21825 }
|
|
Handles the given record. The record must be a transparent noise fill record.
Definition at line 22529 of file fillattr.cpp. 22530 { 22531 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 22532 ERROR2IF(pCXaraFileRecord->GetTag() != TAG_NOISETRANSPARENTFILL,FALSE,"I don't handle this tag type"); 22533 22534 BOOL ok = TRUE; 22535 22536 DocCoord StartPoint, EndPoint, EndPoint2; 22537 BYTE Transp,EndTransp,TranspType; 22538 INT32 DPI; 22539 FIXED16 Grain; 22540 INT32 Seed; 22541 BYTE Tileable; 22542 double Bias = 0, Gain = 0; 22543 double* ptrBias = &Bias, *ptrGain = &Gain; 22544 22545 // Read in the fractal fill data 22546 if (ok) ok = pCXaraFileRecord->ReadCoord(&StartPoint); 22547 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint); 22548 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint2); 22549 if (ok) ok = pCXaraFileRecord->ReadBYTE(&Transp); 22550 if (ok) ok = pCXaraFileRecord->ReadBYTE(&EndTransp); 22551 if (ok) ok = pCXaraFileRecord->ReadBYTE(&TranspType); 22552 if (ok) ok = pCXaraFileRecord->ReadFIXED16(&Grain); 22553 if (ok) ok = pCXaraFileRecord->ReadINT32(&Seed); 22554 if (ok) ok = pCXaraFileRecord->ReadINT32(&DPI); 22555 if (ok) ok = pCXaraFileRecord->ReadBYTE(&Tileable); 22556 if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrBias); 22557 if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrGain); 22558 22559 CProfileBiasGain Profile; 22560 22561 if ((ptrBias != NULL) && (ptrGain != NULL)) 22562 { 22563 Profile.SetBias((AFp) Bias); 22564 Profile.SetGain((AFp) Gain); 22565 } 22566 22567 if (ok) 22568 { 22569 AttrNoiseTranspFill* pAttr = new AttrNoiseTranspFill; 22570 if (pAttr != NULL) 22571 { 22572 // Get a ptr to the attr value object 22573 NoiseTranspFillAttribute* pValue = (NoiseTranspFillAttribute*)pAttr->GetAttributeValue(); 22574 22575 if (pValue != NULL) 22576 { 22577 // Store the start and end points 22578 pValue->SetStartPoint(&StartPoint); 22579 pValue->SetEndPoint(&EndPoint); 22580 pValue->SetEndPoint2(&EndPoint2); 22581 pValue->Transp = UINT32(Transp); 22582 pValue->EndTransp = UINT32(EndTransp); 22583 pValue->TranspType = UINT32(TranspType); 22584 22585 // Store the fractal data 22586 pValue->SetGraininess(Grain); 22587 pValue->SetSeed(Seed); 22588 pValue->SetFractalDPI(DPI); 22589 pValue->SetTileable(Tileable); 22590 pValue->SetProfile (Profile); 22591 22592 // Recreate the fractal, and insert the attr into the tree 22593 if (ok) ok = pValue->RecalcFractal(); 22594 if (ok) ok = InsertNode(pAttr); 22595 } 22596 else 22597 ok = FALSE; 22598 } 22599 else 22600 ok = FALSE; 22601 } 22602 22603 return ok; 22604 }
|
|
Handles the given record.
Implements CXaraFileRecordHandler. Definition at line 20486 of file fillattr.cpp. 20487 { 20488 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 20489 20490 BOOL ok = TRUE; 20491 20492 switch (pCXaraFileRecord->GetTag()) 20493 { 20494 case TAG_FLATFILL: 20495 case TAG_FLATFILL_NONE: 20496 case TAG_FLATFILL_BLACK: 20497 case TAG_FLATFILL_WHITE: ok = HandleFlatFillRecord(pCXaraFileRecord); break; 20498 20499 case TAG_LINEARFILL3POINT: 20500 case TAG_LINEARFILL: ok = HandleLinearFillRecord(pCXaraFileRecord); break; 20501 case TAG_LINEARFILLMULTISTAGE3POINT: 20502 case TAG_LINEARFILLMULTISTAGE: ok = HandleMultiStageLinearFillRecord(pCXaraFileRecord); break; 20503 case TAG_ELLIPTICALFILL: 20504 case TAG_CIRCULARFILL: ok = HandleEllipticalFillRecord(pCXaraFileRecord); break; 20505 case TAG_ELLIPTICALFILLMULTISTAGE: 20506 case TAG_CIRCULARFILLMULTISTAGE: ok = HandleMultiStageCircularFillRecord(pCXaraFileRecord); break; 20507 case TAG_CONICALFILL: ok = HandleConicalFillRecord(pCXaraFileRecord); break; 20508 case TAG_CONICALFILLMULTISTAGE: ok = HandleMultiStageConicalFillRecord(pCXaraFileRecord); break; 20509 case TAG_SQUAREFILL: ok = HandleSquareFillRecord(pCXaraFileRecord); break; 20510 case TAG_SQUAREFILLMULTISTAGE: ok = HandleMultiStageSquareFillRecord(pCXaraFileRecord); break; 20511 case TAG_THREECOLFILL: ok = HandleThreeColFillRecord(pCXaraFileRecord); break; 20512 case TAG_FOURCOLFILL: ok = HandleFourColFillRecord(pCXaraFileRecord); break; 20513 case TAG_BITMAPFILL: 20514 case TAG_CONTONEBITMAPFILL: ok = HandleBitmapFillRecord(pCXaraFileRecord); break; 20515 case TAG_FRACTALFILL: ok = HandleFractalFillRecord(pCXaraFileRecord); break; 20516 case TAG_NOISEFILL: ok = HandleNoiseFillRecord(pCXaraFileRecord); break; 20517 20518 case TAG_FLATTRANSPARENTFILL: ok = HandleFlatTransparentFillRecord(pCXaraFileRecord); break; 20519 case TAG_LINEARTRANSPARENTFILL3POINT: 20520 case TAG_LINEARTRANSPARENTFILL: ok = HandleLinearTransparentFillRecord(pCXaraFileRecord); break; 20521 case TAG_ELLIPTICALTRANSPARENTFILL: 20522 case TAG_CIRCULARTRANSPARENTFILL: ok = HandleEllipticalTransparentFillRecord(pCXaraFileRecord); break; 20523 case TAG_CONICALTRANSPARENTFILL: ok = HandleConicalTransparentFillRecord(pCXaraFileRecord); break; 20524 case TAG_SQUARETRANSPARENTFILL: ok = HandleSquareTransparentFillRecord(pCXaraFileRecord); break; 20525 case TAG_THREECOLTRANSPARENTFILL: ok = HandleThreeColTransparentFillRecord(pCXaraFileRecord); break; 20526 case TAG_FOURCOLTRANSPARENTFILL: ok = HandleFourColTransparentFillRecord(pCXaraFileRecord); break; 20527 20528 case TAG_BITMAPTRANSPARENTFILL: ok = HandleBitmapTransparentFillRecord(pCXaraFileRecord); break; 20529 case TAG_FRACTALTRANSPARENTFILL: ok = HandleFractalTransparentFillRecord(pCXaraFileRecord); break; 20530 case TAG_NOISETRANSPARENTFILL: ok = HandleNoiseTransparentFillRecord(pCXaraFileRecord); break; 20531 20532 case TAG_FILL_REPEATING: 20533 //Mark Howitt, 7/10/97. using new fill modes 20534 #ifdef NEW_FEATURES 20535 case TAG_FILL_REPEATING_EXTRA: 20536 #endif 20537 case TAG_FILL_NONREPEATING: 20538 case TAG_FILL_REPEATINGINVERTED: ok = HandleFillRepeatRecord(pCXaraFileRecord); break; 20539 //Chris Snook, 8/12/99. using new fill modes 20540 #ifdef NEW_FEATURES 20541 case TAG_TRANSPARENTFILL_REPEATING_EXTRA: 20542 #endif 20543 case TAG_TRANSPARENTFILL_REPEATING: 20544 case TAG_TRANSPARENTFILL_NONREPEATING: 20545 case TAG_TRANSPARENTFILL_REPEATINGINVERTED: ok = HandleTransparentFillRepeatRecord(pCXaraFileRecord); break; 20546 20547 case TAG_FILLEFFECT_ALTRAINBOW: 20548 case TAG_FILLEFFECT_RAINBOW: 20549 case TAG_FILLEFFECT_FADE: ok = HandleFillEffectRecord(pCXaraFileRecord); break; 20550 20551 default: 20552 ok = FALSE; 20553 ERROR3_PF(("I don't handle records with the tag (%d)\n",pCXaraFileRecord->GetTag())); 20554 break; 20555 } 20556 20557 return ok; 20558 }
|
|
Handles the given record. The record has to be a square fill record.
Definition at line 21203 of file fillattr.cpp. 21204 { 21205 UINT32 Tag = pCXaraFileRecord->GetTag(); 21206 21207 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 21208 ERROR2IF(Tag != TAG_SQUAREFILL,FALSE,"I don't handle this tag type"); 21209 21210 BOOL ok = TRUE; 21211 21212 DocCoord StartPoint, EndPoint, EndPoint2; 21213 INT32 StartColourRef,EndColourRef; 21214 double Bias = 0, Gain = 0; 21215 double* ptrBias = &Bias, *ptrGain = &Gain; 21216 21217 // Read in the elliptical/circular fill data 21218 if (ok) ok = pCXaraFileRecord->ReadCoord(&StartPoint); 21219 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint); 21220 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint2); 21221 21222 if (ok) ok = pCXaraFileRecord->ReadINT32(&StartColourRef); 21223 if (ok) ok = pCXaraFileRecord->ReadINT32(&EndColourRef); 21224 if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrBias); 21225 if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrGain); 21226 21227 CProfileBiasGain Profile; 21228 21229 if ((ptrBias != NULL) && (ptrGain != NULL)) 21230 { 21231 Profile.SetBias((AFp) Bias); 21232 Profile.SetGain((AFp) Gain); 21233 } 21234 21235 if (ok) 21236 { 21237 AttrSquareColourFill* pAttr = new AttrSquareColourFill; 21238 if (pAttr != NULL) 21239 { 21240 // Get a ptr to the attr value object 21241 SquareFillAttribute* pValue = (SquareFillAttribute*)pAttr->GetAttributeValue(); 21242 21243 if (pValue != NULL) 21244 { 21245 // Store the start and end points 21246 pValue->SetStartPoint(&StartPoint); 21247 pValue->SetEndPoint(&EndPoint); 21248 pValue->SetEndPoint2(&EndPoint2); 21249 21250 // Store the profile 21251 pValue->SetProfile (Profile); 21252 21253 // Convert the colour references into doc colours, and insert the attr into the tree 21254 if (ok) ok = GetDocColour(StartColourRef,&(pValue->Colour)); 21255 if (ok) ok = GetDocColour(EndColourRef,&(pValue->EndColour)); 21256 if (ok) ok = InsertNode(pAttr); 21257 } 21258 else 21259 ok = FALSE; 21260 } 21261 else 21262 ok = FALSE; 21263 } 21264 21265 return ok; 21266 }
|
|
Handles the given record. The record has to be a Square transparent fill record.
Definition at line 22128 of file fillattr.cpp. 22129 { 22130 UINT32 Tag = pCXaraFileRecord->GetTag(); 22131 22132 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 22133 ERROR2IF(Tag != TAG_SQUARETRANSPARENTFILL,FALSE,"I don't handle this tag type"); 22134 22135 BOOL ok = TRUE; 22136 22137 DocCoord StartPoint, EndPoint, EndPoint2; 22138 BYTE Transp,EndTransp,TranspType; 22139 double Bias = 0, Gain = 0; 22140 double* ptrBias = &Bias, *ptrGain = &Gain; 22141 22142 if (ok) ok = pCXaraFileRecord->ReadCoord(&StartPoint); 22143 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint); 22144 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint2); 22145 22146 if (ok) ok = pCXaraFileRecord->ReadBYTE(&Transp); 22147 if (ok) ok = pCXaraFileRecord->ReadBYTE(&EndTransp); 22148 if (ok) ok = pCXaraFileRecord->ReadBYTE(&TranspType); 22149 if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrBias); 22150 if (ok) ok = pCXaraFileRecord->ReadDOUBLEnoError (ptrGain); 22151 22152 CProfileBiasGain Profile; 22153 22154 if ((ptrBias != NULL) && (ptrGain != NULL)) 22155 { 22156 Profile.SetBias((AFp) Bias); 22157 Profile.SetGain((AFp) Gain); 22158 } 22159 22160 if (ok) 22161 { 22162 AttrSquareTranspFill* pAttr = new AttrSquareTranspFill; 22163 if (pAttr != NULL) 22164 { 22165 SquareTranspFillAttribute* pValue = (SquareTranspFillAttribute*)pAttr->GetAttributeValue(); 22166 22167 if (pValue != NULL) 22168 { 22169 pValue->SetStartPoint(&StartPoint); 22170 pValue->SetEndPoint(&EndPoint); 22171 pValue->SetEndPoint2(&EndPoint2); 22172 22173 pValue->Transp = UINT32(Transp); 22174 pValue->EndTransp = UINT32(EndTransp); 22175 pValue->TranspType = UINT32(TranspType); 22176 pValue->SetProfile (Profile); 22177 ok = InsertNode(pAttr); 22178 } 22179 else 22180 ok = FALSE; 22181 } 22182 else 22183 ok = FALSE; 22184 } 22185 22186 return ok; 22187 }
|
|
Handles the given record. The record has to be a ThreeCol fill record.
Definition at line 21389 of file fillattr.cpp. 21390 { 21391 UINT32 Tag = pCXaraFileRecord->GetTag(); 21392 21393 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 21394 ERROR2IF(Tag != TAG_THREECOLFILL,FALSE,"I don't handle this tag type"); 21395 21396 BOOL ok = TRUE; 21397 21398 DocCoord StartPoint; 21399 DocCoord EndPoint; 21400 DocCoord EndPoint2; 21401 INT32 StartColourRef; 21402 INT32 EndColourRef; 21403 INT32 EndColour2Ref; 21404 21405 // Read in the elliptical/circular fill data 21406 if (ok) ok = pCXaraFileRecord->ReadCoord(&StartPoint); 21407 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint); 21408 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint2); 21409 21410 if (ok) ok = pCXaraFileRecord->ReadINT32(&StartColourRef); 21411 if (ok) ok = pCXaraFileRecord->ReadINT32(&EndColourRef); 21412 if (ok) ok = pCXaraFileRecord->ReadINT32(&EndColour2Ref); 21413 21414 if (ok) 21415 { 21416 AttrThreeColColourFill* pAttr = new AttrThreeColColourFill; 21417 if (pAttr != NULL) 21418 { 21419 // Get a ptr to the attr value object 21420 ThreeColFillAttribute* pValue = (ThreeColFillAttribute*)pAttr->GetAttributeValue(); 21421 21422 if (pValue != NULL) 21423 { 21424 // Store the start and end points 21425 pValue->SetStartPoint(&StartPoint); 21426 pValue->SetEndPoint(&EndPoint); 21427 pValue->SetEndPoint2(&EndPoint2); 21428 21429 // Convert the colour references into doc colours, and insert the attr into the tree 21430 if (ok) ok = GetDocColour(StartColourRef,&(pValue->Colour)); 21431 if (ok) ok = GetDocColour(EndColourRef,&(pValue->EndColour)); 21432 if (ok) ok = GetDocColour(EndColour2Ref,&(pValue->EndColour2)); 21433 if (ok) ok = InsertNode(pAttr); 21434 } 21435 else 21436 ok = FALSE; 21437 } 21438 else 21439 ok = FALSE; 21440 } 21441 21442 return ok; 21443 }
|
|
Handles the given record. The record has to be a ThreeCol transparent fill record.
Definition at line 22204 of file fillattr.cpp. 22205 { 22206 UINT32 Tag = pCXaraFileRecord->GetTag(); 22207 22208 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 22209 ERROR2IF(Tag != TAG_THREECOLTRANSPARENTFILL,FALSE,"I don't handle this tag type"); 22210 22211 BOOL ok = TRUE; 22212 22213 DocCoord StartPoint; 22214 DocCoord EndPoint; 22215 DocCoord EndPoint2; 22216 BYTE Transp; 22217 BYTE EndTransp; 22218 BYTE EndTransp2; 22219 BYTE TranspType; 22220 22221 if (ok) ok = pCXaraFileRecord->ReadCoord(&StartPoint); 22222 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint); 22223 if (ok) ok = pCXaraFileRecord->ReadCoord(&EndPoint2); 22224 22225 if (ok) ok = pCXaraFileRecord->ReadBYTE(&Transp); 22226 if (ok) ok = pCXaraFileRecord->ReadBYTE(&EndTransp); 22227 if (ok) ok = pCXaraFileRecord->ReadBYTE(&EndTransp2); 22228 if (ok) ok = pCXaraFileRecord->ReadBYTE(&TranspType); 22229 22230 if (ok) 22231 { 22232 AttrThreeColTranspFill* pAttr = new AttrThreeColTranspFill; 22233 if (pAttr != NULL) 22234 { 22235 ThreeColTranspFillAttribute* pValue = (ThreeColTranspFillAttribute*)pAttr->GetAttributeValue(); 22236 22237 if (pValue != NULL) 22238 { 22239 pValue->SetStartPoint(&StartPoint); 22240 pValue->SetEndPoint(&EndPoint); 22241 pValue->SetEndPoint2(&EndPoint2); 22242 22243 pValue->Transp = UINT32(Transp); 22244 pValue->EndTransp = UINT32(EndTransp); 22245 pValue->EndTransp2 = UINT32(EndTransp2); 22246 pValue->TranspType = UINT32(TranspType); 22247 ok = InsertNode(pAttr); 22248 } 22249 else 22250 ok = FALSE; 22251 } 22252 else 22253 ok = FALSE; 22254 } 22255 22256 return ok; 22257 }
|
|
Handles the given record. The record has to be a transparent fill repeat record.
Definition at line 22677 of file fillattr.cpp. 22678 { 22679 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"pCXaraFileRecord is NULL"); 22680 22681 INT32 Repeat; 22682 22683 switch (pCXaraFileRecord->GetTag()) 22684 { 22685 case TAG_TRANSPARENTFILL_NONREPEATING: Repeat = 1; break; 22686 case TAG_TRANSPARENTFILL_REPEATING: Repeat = 2; break; 22687 case TAG_TRANSPARENTFILL_REPEATINGINVERTED: Repeat = 3; break; 22688 //Mark Howitt. 8/10/97. (well actually Chris Snook - 8/12/99); cause we need to do it here 22689 //as well - Make repeating grad fills a special case 22690 #ifdef NEW_FEATURES 22691 case TAG_TRANSPARENTFILL_REPEATING_EXTRA: Repeat = 4; break; 22692 #endif 22693 22694 default: 22695 ERROR3("Do what? I only do trans fill repeat records mate"); 22696 return TRUE; 22697 break; 22698 } 22699 22700 AttrTranspFillMappingLinear* pAttr = new AttrTranspFillMappingLinear; 22701 if (pAttr != NULL) 22702 { 22703 pAttr->Value.Repeat = Repeat; 22704 return InsertNode(pAttr); 22705 } 22706 22707 return FALSE; 22708 }
|