fillattr2.h

Go to the documentation of this file.
00001 // $Id: fillattr.h 1269 2006-06-08 09:27:36Z alex $
00002 /* @@tag:xara-cn@@ DO NOT MODIFY THIS LINE
00003 ================================XARAHEADERSTART===========================
00004  
00005                Xara LX, a vector drawing and manipulation program.
00006                     Copyright (C) 1993-2006 Xara Group Ltd.
00007        Copyright on certain contributions may be held in joint with their
00008               respective authors. See AUTHORS file for details.
00009 
00010 LICENSE TO USE AND MODIFY SOFTWARE
00011 ----------------------------------
00012 
00013 This file is part of Xara LX.
00014 
00015 Xara LX is free software; you can redistribute it and/or modify it
00016 under the terms of the GNU General Public License version 2 as published
00017 by the Free Software Foundation.
00018 
00019 Xara LX and its component source files are distributed in the hope
00020 that it will be useful, but WITHOUT ANY WARRANTY; without even the
00021 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00022 See the GNU General Public License for more details.
00023 
00024 You should have received a copy of the GNU General Public License along
00025 with Xara LX (see the file GPL in the root directory of the
00026 distribution); if not, write to the Free Software Foundation, Inc., 51
00027 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
00028 
00029 
00030 ADDITIONAL RIGHTS
00031 -----------------
00032 
00033 Conditional upon your continuing compliance with the GNU General Public
00034 License described above, Xara Group Ltd grants to you certain additional
00035 rights. 
00036 
00037 The additional rights are to use, modify, and distribute the software
00038 together with the wxWidgets library, the wxXtra library, and the "CDraw"
00039 library and any other such library that any version of Xara LX relased
00040 by Xara Group Ltd requires in order to compile and execute, including
00041 the static linking of that library to XaraLX. In the case of the
00042 "CDraw" library, you may satisfy obligation under the GNU General Public
00043 License to provide source code by providing a binary copy of the library
00044 concerned and a copy of the license accompanying it.
00045 
00046 Nothing in this section restricts any of the rights you have under
00047 the GNU General Public License.
00048 
00049 
00050 SCOPE OF LICENSE
00051 ----------------
00052 
00053 This license applies to this program (XaraLX) and its constituent source
00054 files only, and does not necessarily apply to other Xara products which may
00055 in part share the same code base, and are subject to their own licensing
00056 terms.
00057 
00058 This license does not apply to files in the wxXtra directory, which
00059 are built into a separate library, and are subject to the wxWindows
00060 license contained within that directory in the file "WXXTRA-LICENSE".
00061 
00062 This license does not apply to the binary libraries (if any) within
00063 the "libs" directory, which are subject to a separate license contained
00064 within that directory in the file "LIBS-LICENSE".
00065 
00066 
00067 ARRANGEMENTS FOR CONTRIBUTION OF MODIFICATIONS
00068 ----------------------------------------------
00069 
00070 Subject to the terms of the GNU Public License (see above), you are
00071 free to do whatever you like with your modifications. However, you may
00072 (at your option) wish contribute them to Xara's source tree. You can
00073 find details of how to do this at:
00074   http://www.xaraxtreme.org/developers/
00075 
00076 Prior to contributing your modifications, you will need to complete our
00077 contributor agreement. This can be found at:
00078   http://www.xaraxtreme.org/developers/contribute/
00079 
00080 Please note that Xara will not accept modifications which modify any of
00081 the text between the start and end of this header (marked
00082 XARAHEADERSTART and XARAHEADEREND).
00083 
00084 
00085 MARKS
00086 -----
00087 
00088 Xara, Xara LX, Xara X, Xara X/Xtreme, Xara Xtreme, the Xtreme and Xara
00089 designs are registered or unregistered trademarks, design-marks, and/or
00090 service marks of Xara Group Ltd. All rights in these marks are reserved.
00091 
00092 
00093       Xara Group Ltd, Gaddesden Place, Hemel Hempstead, HP2 6EX, UK.
00094                         http://www.xara.com/
00095 
00096 =================================XARAHEADEREND============================
00097  */
00098 
00099 // This file holds all the AttributeValue and NodeAttribute classes to do with path
00100 // filling attributes.
00101 // fillattr.h has been split into two. This contains essentially the implementation or
00102 // specific classes. Not many files should need to include this. This includes fillval.h
00103 
00104 #ifndef INC_FILLATTR2
00105 #define INC_FILLATTR2
00106 
00107 //#include "fillattr.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00108 //#include "fillval.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00109 
00110 /***********************************************************************************************
00111 
00112 >   class AttrColourChange : public AttrValueChange
00113 
00114     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
00115     Created:    8/8/94
00116     Purpose:    Change Fill colour Attribute class.
00117                 This Attribute never exists in the Tree.  It is used for changing the colours
00118                 of an existing Fill Geometry.
00119     SeeAlso:    AttrFillGeometry
00120 
00121 ***********************************************************************************************/
00122 
00123 class AttrColourChange : public AttrValueChange
00124 {
00125     CC_DECLARE_DYNCREATE(AttrColourChange)
00126     
00127 public:
00128     AttrColourChange() : AttrValueChange() {}
00129 
00130     virtual UINT32 GetAttrNameID(void);  
00131 
00132     virtual AttributeValue* GetAttributeValue() { return &Value; }
00133     virtual CCRuntimeClass* GetAttributeType() { return CC_RUNTIME_CLASS(AttrFillGeometry); }
00134 
00135     virtual AttrFillGeometry* MutateFill(AttrFillGeometry* FillToMutate);
00136 
00137 protected:
00138     FlatFillAttribute Value;
00139 };
00140 
00141 /***********************************************************************************************
00142 
00143 >   class AttrColourDrop : public AttrColourChange
00144 
00145     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
00146     Created:    8/8/94
00147     Purpose:    'Drop a colour on an object' Attribute class.
00148                 This Attribute never exists in the Tree.  It is used for changing the colours
00149                 of an existing Fill Geometry.
00150     SeeAlso:    AttrFillGeometry
00151 
00152 ***********************************************************************************************/
00153 
00154 class AttrColourDrop : public AttrColourChange
00155 {
00156     CC_DECLARE_DYNCREATE(AttrColourDrop)
00157     
00158 public:
00159     AttrColourDrop() : AttrColourChange() {}
00160     AttrColourDrop(DocCoord&, DocRect&, DocColour);
00161 
00162     virtual UINT32 GetAttrNameID(void);  
00163     virtual AttrFillGeometry* MutateFill(AttrFillGeometry* FillToMutate);
00164     virtual BOOL EffectsParentBounds ();        // need to do this now, because otherwise
00165                                                 // when adding a multi-stage fill blob that
00166                                                 // is outside the object, then we encounter
00167                                                 // redraw problems
00168 
00169     void SetDropPoint(DocCoord&);
00170     void SetObjectBounds(DocRect&);
00171 
00172     void SetObjectDroppedOn(NodeRenderableInk*);
00173     NodeRenderableInk* GetObjectDroppedOn();
00174 
00175     DocCoord& GetDropPoint() { return DropPos; }
00176     DocRect& GetObjectBounds() { return Bounds; }
00177 
00178     BOOL IsObjectSelected();
00179     
00180 protected:
00181     DocCoord    DropPos;
00182     DocRect     Bounds;
00183 
00184     NodeRenderableInk*  ObjectHit;
00185     AttrFillGeometry*   FillHit;
00186     FillControl         ControlHit;
00187 
00188     BOOL                ObjectIsSelected;
00189 };
00190 
00191 /***********************************************************************************************
00192 
00193 >   class AttrBitmapChange : public AttrValueChange
00194 
00195     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
00196     Created:    8/8/94
00197     Purpose:    Change Bitmap Attribute class.
00198                 This Attribute never exists in the Tree.  It is used for changing a
00199                 Bitmap Fill.
00200     SeeAlso:    AttrFillGeometry
00201 
00202 ***********************************************************************************************/
00203 
00204 class AttrBitmapChange : public AttrValueChange
00205 {
00206     CC_DECLARE_DYNCREATE(AttrBitmapChange)
00207     
00208 public:
00209     AttrBitmapChange() : AttrValueChange() {}
00210 
00211     virtual UINT32 GetAttrNameID(void);  
00212 
00213     virtual AttributeValue* GetAttributeValue() { return &Value; }
00214     virtual AttrFillGeometry* MutateFill(AttrFillGeometry* FillToMutate);
00215 
00216 protected:
00217     BitmapFillAttribute Value;
00218 };
00219 
00220 /***********************************************************************************************
00221 
00222 >   class AttrBitmapTessChange : public AttrBitmapChange
00223 
00224     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
00225     Created:    8/8/94
00226     Purpose:    Change Fill Transp Type Attribute class.
00227                 This Attribute never exists in the Tree.  It is used for changing the Transp
00228                 type of an existing Fill Geometry.
00229     SeeAlso:    AttrFillGeometry
00230 
00231 ***********************************************************************************************/
00232 
00233 class AttrBitmapTessChange : public AttrBitmapChange
00234 {
00235     CC_DECLARE_DYNCREATE(AttrBitmapTessChange)
00236     
00237 public:
00238     AttrBitmapTessChange() : AttrBitmapChange() { }
00239 
00240     virtual UINT32 GetAttrNameID(void);  
00241 
00242     virtual AttrFillGeometry* MutateFill(AttrFillGeometry* FillToMutate);
00243 };
00244 
00245 /***********************************************************************************************
00246 
00247 >   class AttrBitmapDpiChange : public AttrBitmapChange
00248 
00249     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
00250     Created:    8/8/94
00251     Purpose:    Change Fill Transp Type Attribute class.
00252                 This Attribute never exists in the Tree.  It is used for changing the Transp
00253                 type of an existing Fill Geometry.
00254     SeeAlso:    AttrFillGeometry
00255 
00256 ***********************************************************************************************/
00257 
00258 class AttrBitmapDpiChange : public AttrBitmapChange
00259 {
00260     CC_DECLARE_DYNCREATE(AttrBitmapDpiChange)
00261     
00262 public:
00263     AttrBitmapDpiChange() : AttrBitmapChange() { }
00264     virtual AttrFillGeometry* MutateFill(AttrFillGeometry* FillToMutate);
00265 
00266     virtual UINT32 GetAttrNameID(void);  
00267 
00268     void SetDPI(INT32 NewDpi) { Dpi = NewDpi; } 
00269     UINT32 GetDPI() { return Dpi; } 
00270 
00271 protected:
00272     INT32 Dpi;
00273 };
00274 
00275 /***********************************************************************************************
00276 
00277 >   class AttrFractalChange : public AttrValueChange
00278 
00279     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
00280     Created:    8/8/94
00281     Purpose:    Change Fractal Attribute class.
00282                 This Attribute never exists in the Tree.  It is used for changing a
00283                 Fractal Fill.
00284     SeeAlso:    AttrFillGeometry
00285 
00286 ***********************************************************************************************/
00287 
00288 class AttrFractalChange : public AttrValueChange
00289 {
00290     CC_DECLARE_DYNCREATE(AttrFractalChange)
00291     
00292 public:
00293     AttrFractalChange() : AttrValueChange() {}
00294 
00295     virtual UINT32 GetAttrNameID(void);  
00296 
00297     virtual AttributeValue* GetAttributeValue() { return &Value; }
00298 
00299 protected:
00300     FractalFillAttribute Value;
00301 };
00302 
00303 /***********************************************************************************************
00304 
00305 >   class AttrFractalGrainChange : public AttrFractalChange
00306 
00307     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
00308     Created:    8/8/94
00309     Purpose:    Change Fill Transp Type Attribute class.
00310                 This Attribute never exists in the Tree.  It is used for changing the Transp
00311                 type of an existing Fill Geometry.
00312     SeeAlso:    AttrFillGeometry
00313 
00314 ***********************************************************************************************/
00315 
00316 class AttrFractalGrainChange : public AttrFractalChange
00317 {
00318     CC_DECLARE_DYNCREATE(AttrFractalGrainChange)
00319     
00320 public:
00321     AttrFractalGrainChange() : AttrFractalChange() { }
00322 
00323     virtual UINT32 GetAttrNameID(void);  
00324 
00325     virtual AttrFillGeometry* MutateFill(AttrFillGeometry* FillToMutate);
00326 };
00327 
00328 /***********************************************************************************************
00329 
00330 >   class AttrFractalTileableChange : public AttrFractalChange
00331 
00332     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
00333     Created:    8/8/94
00334     Purpose:    Change Fractal Tileable Attribute class.
00335                 This Attribute never exists in the Tree.  It is used for changing the Transp
00336                 type of an existing Fill Geometry.
00337     SeeAlso:    AttrFillGeometry
00338 
00339 ***********************************************************************************************/
00340 
00341 class AttrFractalTileableChange : public AttrFractalChange
00342 {
00343     CC_DECLARE_DYNCREATE(AttrFractalTileableChange)
00344     
00345 public:
00346     AttrFractalTileableChange() : AttrFractalChange() { }
00347 
00348     virtual UINT32 GetAttrNameID(void);  
00349 
00350     virtual AttrFillGeometry* MutateFill(AttrFillGeometry* FillToMutate);
00351 };
00352 
00353 /***********************************************************************************************
00354 
00355 >   class AttrTranspChange : public AttrValueChange
00356 
00357     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
00358     Created:    8/8/94
00359     Purpose:    Change Fill colour Attribute class.
00360                 This Attribute never exists in the Tree.  It is used for changing the Transp
00361                 of an existing Fill Geometry.
00362     SeeAlso:    AttrFillGeometry
00363 
00364 ***********************************************************************************************/
00365 
00366 class AttrTranspChange : public AttrValueChange
00367 {
00368     CC_DECLARE_DYNCREATE(AttrTranspChange)
00369     
00370 public:
00371     AttrTranspChange();
00372 
00373     virtual UINT32 GetAttrNameID(void);  
00374 
00375     virtual AttributeValue* GetAttributeValue() { return &Value; }
00376     virtual CCRuntimeClass* GetAttributeType() { return CC_RUNTIME_CLASS(AttrTranspFillGeometry); }
00377 
00378     virtual AttrFillGeometry* MutateFill(AttrFillGeometry* FillToMutate);
00379 
00380     // This routine returns any secondary attribute that needs to be changed,
00381     // when this attribute is changed.
00382     virtual NodeAttribute* GetOtherAttrToApply(BOOL* IsMutate);
00383 
00384 protected:
00385     FlatTranspFillAttribute Value;
00386 };
00387 
00388 /***********************************************************************************************
00389 
00390 >   class AttrTranspTypeChange : public AttrTranspChange
00391 
00392     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
00393     Created:    8/8/94
00394     Purpose:    Change Fill Transp Type Attribute class.
00395                 This Attribute never exists in the Tree.  It is used for changing the Transp
00396                 type of an existing Fill Geometry.
00397     SeeAlso:    AttrFillGeometry
00398 
00399 ***********************************************************************************************/
00400 
00401 class AttrTranspTypeChange : public AttrTranspChange
00402 {
00403     CC_DECLARE_DYNCREATE(AttrTranspTypeChange)
00404     
00405 public:
00406     AttrTranspTypeChange() : AttrTranspChange() { }
00407 
00408     virtual UINT32 GetAttrNameID(void);  
00409 
00410     virtual AttrFillGeometry* MutateFill(AttrFillGeometry* FillToMutate);
00411 
00412     // This routine returns any secondary attribute that needs to be changed,
00413     // when this attribute is changed.
00414     virtual NodeAttribute* GetOtherAttrToApply(BOOL* IsMutate);
00415 };
00416 
00417 
00418 
00419 /***********************************************************************************************
00420 
00421 >   class AttrNoiseChange : public AttrValueChange
00422 
00423     Author:     Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
00424     Created:    20/01/97
00425     Purpose:    Change Noise fill class
00426                 This Attribute never exists in the Tree.  It is used for changing a
00427                 Noise fill.
00428     SeeAlso:    AttrFillGeometry
00429 
00430 ***********************************************************************************************/
00431 
00432 class AttrNoiseScaleChange : public AttrValueChange
00433 {
00434     CC_DECLARE_DYNCREATE(AttrNoiseScaleChange)
00435     
00436     public:
00437         virtual UINT32 GetAttrNameID(void);  
00438         virtual AttributeValue* GetAttributeValue() { return &Value; }
00439         virtual AttrFillGeometry* MutateFill(AttrFillGeometry* FillToMutate);
00440 
00441     protected:
00442         NoiseFillAttribute Value;
00443 };
00444 
00445 
00446 
00447 
00448 /********************************************************************************************
00449 
00450 >   RampEdit 
00451 
00452     Author:     Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
00453     Created:    12/03/97
00454     Purpose:    A typedef to describe the actions one can perform with a AttrFillRampChange
00455 
00456 ********************************************************************************************/
00457 
00458 typedef enum
00459 {
00460     ACT_DONOTHING,
00461 
00462     ACT_CREATENEWCOL,
00463     ACT_EDITCOLOFITEM,
00464     ACT_EDITCOLOFSELECTED,
00465 
00466     ACT_CREATENEWTRANSP,
00467     ACT_EDITTRANSPOFITEM,
00468     ACT_EDITTRANSPOFSELECTED
00469 } RampEdit;
00470 
00471 
00472 
00473 /********************************************************************************************
00474 
00475 >   class AttrColFillRampChange : public AttrValueChange
00476 
00477     Author:     Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
00478     Created:    12/03/97
00479     Purpose:    An attribute to control the changes of colour on a fill ramp.
00480 
00481 ********************************************************************************************/
00482 
00483 class AttrColFillRampChange : public AttrValueChange
00484 {
00485     CC_DECLARE_DYNCREATE(AttrColFillRampChange)
00486     
00487 public:
00488     AttrColFillRampChange();
00489 
00490     virtual UINT32 GetAttrNameID(void);  
00491     virtual AttrFillGeometry* MutateFill(AttrFillGeometry* FillToMutate);
00492 
00493     virtual AttributeValue* GetAttributeValue() { return &Value; }
00494     virtual CCRuntimeClass* GetAttributeType() { return CC_RUNTIME_CLASS(AttrFillGeometry); }
00495 
00496     // init functions to turn this ramp change attribute into some
00497     // specific action.
00498     void InitForColourAdd(DocColour* pColour, float pos);
00499     void InitForColourEdit(UINT32 i, DocColour* pColour);
00500     void InitForSelEdit(DocColour* pColour);
00501 
00502     // the methods
00503     RampEdit GetAction() const   { return action; }
00504     UINT32   GetIndex() const    { return index;  }
00505     float    GetPosition() const { return position; }
00506 
00507 protected:
00508     RampEdit    action;
00509     UINT32      index;
00510     float       position;
00511 
00512     FlatFillAttribute Value;
00513             // holds a colour value, this is ridiculous but helps with providing
00514             // the necessary API to derive from AttrValueChange!
00515 };
00516 
00517 
00518 /********************************************************************************************
00519 
00520 >   class AttrTranspFillRampChange : public AttrValueChange
00521 
00522     Author:     Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
00523     Created:    12/03/97
00524     Purpose:    An attribute to control the changes of transparency on a fill ramp.
00525 
00526 ********************************************************************************************/
00527 
00528 class AttrTranspFillRampChange : public AttrValueChange
00529 {
00530     CC_DECLARE_DYNCREATE(AttrTranspFillRampChange)
00531     
00532 public:
00533     AttrTranspFillRampChange();
00534 
00535     virtual UINT32 GetAttrNameID(void);  
00536     virtual AttrFillGeometry* MutateFill(AttrFillGeometry* FillToMutate);
00537 
00538     virtual AttributeValue* GetAttributeValue() { return &Value; }
00539     virtual CCRuntimeClass* GetAttributeType() { return CC_RUNTIME_CLASS(AttrTranspFillGeometry); }
00540 
00541     // init functions to turn this ramp change attribute into some
00542     // specific action.
00543     void InitForTranspAdd(UINT32 t, float pos);
00544     void InitForTranspEdit(UINT32 i, UINT32 t);
00545     void InitForSelEdit(UINT32 transparency);
00546 
00547     // the methods
00548     RampEdit GetAction() const   { return action; }
00549     UINT32   GetIndex() const    { return index;  }
00550     float    GetPosition() const { return position; }
00551 
00552 protected:
00553     RampEdit    action;
00554     UINT32      index;
00555     float       position;
00556 
00557     FlatTranspFillAttribute Value;
00558             // holds a colour value, this is ridiculous but helps with providing
00559             // the necessary API to derive from AttrValueChange!
00560 };
00561 
00562 
00563 
00564 
00565 
00566 
00567 /***********************************************************************************************
00568 
00569 >   class AttrFlatColourFill : public AttrFlatFill
00570 
00571     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
00572     Created:    22/8/94
00573     Purpose:    Flat Colour Fill Attribute class.
00574     SeeAlso:    FlatFillAttribute
00575 
00576 ***********************************************************************************************/
00577 
00578 class AttrFlatColourFill : public AttrFlatFill
00579 {
00580     CC_DECLARE_DYNCREATE(AttrFlatColourFill)
00581     
00582 public:
00583     AttrFlatColourFill() : AttrFlatFill() {}
00584     AttrFlatColourFill(Node* ContextNode,  
00585                  AttachNodeDirection Direction,    
00586                  BOOL Locked=FALSE, 
00587                  BOOL Mangled=FALSE,  
00588                  BOOL Marked=FALSE, 
00589                  BOOL Selected=FALSE): 
00590         AttrFlatFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
00591 
00592     void Render( RenderRegion* pRender );
00593 
00594     Node* SimpleCopy();                         // Copies a node
00595     virtual UINT32 GetAttrNameID(void); 
00596     void GetDebugDetails(StringBase* Str);
00597     virtual UINT32 GetNodeSize() const;             // Returns size of node in bytes
00598 
00599     virtual CCRuntimeClass* GetAttributeType() { return CC_RUNTIME_CLASS(AttrFillGeometry); }
00600     virtual AttributeValue* GetAttributeValue() { return &Value; }
00601 
00602     AttrFillGeometry* ChangeAttrValue(AttrValueChange* pValue) { return ChangeColour(pValue); }
00603 
00604     virtual BOOL IsAColourFill() const { return TRUE; }
00605 
00606     // Version 2 file format functions
00607     virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
00608     virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
00609     virtual BOOL WriteColourDefinitions (BaseCamelotFilter* pFilter);
00610 
00611 // Karim 13/09/2000
00612 // Virtual override of NodeRenderable::IsSeeThrough() - see base declaration for details.
00613 public:
00614     virtual BOOL IsSeeThrough(BOOL CheckIndirectAttrs)
00615     {
00616         return (GetStartColour() != NULL && GetStartColour()->IsTransparent());
00617     }
00618 
00619 protected:
00620     FlatFillAttribute Value;
00621 };
00622 
00623 /***********************************************************************************************
00624 
00625 >   class AttrFlatTranspFill : public AttrFlatFill
00626 
00627     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
00628     Created:    22/8/94
00629     Purpose:    Flat Transparency Fill Attribute class.
00630     SeeAlso:    FlatFillAttribute
00631 
00632 ***********************************************************************************************/
00633 
00634 class AttrFlatTranspFill : public AttrFlatFill
00635 {
00636     CC_DECLARE_DYNCREATE(AttrFlatTranspFill)
00637     
00638 public:
00639     AttrFlatTranspFill() : AttrFlatFill() {}
00640     AttrFlatTranspFill(Node* ContextNode,  
00641                  AttachNodeDirection Direction,    
00642                  BOOL Locked=FALSE, 
00643                  BOOL Mangled=FALSE,  
00644                  BOOL Marked=FALSE, 
00645                  BOOL Selected=FALSE): 
00646         AttrFlatFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
00647 
00648     void Render( RenderRegion* pRender );
00649 
00650     Node* SimpleCopy();                         // Copies a node
00651     virtual UINT32 GetAttrNameID(void); 
00652     void GetDebugDetails(StringBase* Str);
00653     virtual UINT32 GetNodeSize() const;             // Returns size of node in bytes
00654 
00655     virtual CCRuntimeClass* GetAttributeType() { return CC_RUNTIME_CLASS(AttrTranspFillGeometry); }
00656     virtual AttributeValue* GetAttributeValue() { return &Value; }
00657 
00658     virtual BOOL IsVisible() { return IsTranspMeshVisible(); }
00659     virtual BOOL NeedsTransparency() const;
00660 
00661     AttrFillGeometry* ChangeAttrValue(AttrValueChange* pValue) { return ChangeTransp(pValue); }
00662 
00663     virtual BOOL IsATranspFill() const { return TRUE; } 
00664     virtual BOOL HasEquivalentDefaultValue(BOOL bAppearance = FALSE);
00665 
00666     // Version 2 file format functions
00667     virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
00668     virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
00669 
00670 // Karim 13/09/2000
00671 // Virtual override of NodeRenderable::IsSeeThrough() - see base declaration for details.
00672 public:
00673     virtual BOOL IsSeeThrough(BOOL CheckIndirectAttrs) {
00674         return ((GetStartTransp() != NULL   &&  *GetStartTransp() != 0) ||
00675                 (GetEndTransp() != NULL     &&  *GetEndTransp() != 0));
00676     }
00677 
00678 protected:
00679     FlatTranspFillAttribute Value;
00680 };
00681 
00682 /***********************************************************************************************
00683 
00684 >   class AttrLinearFill : public AttrFillGeometry
00685 
00686     Author:     Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
00687     Created:    18/07/94
00688     Purpose:    Linear Graduated Fill Attribute class.
00689     SeeAlso:    LinearFillAttribute
00690 
00691 ***********************************************************************************************/
00692 
00693 class AttrLinearFill : public AttrFillGeometry
00694 {
00695     CC_DECLARE_DYNCREATE(AttrLinearFill)
00696     
00697 public:
00698     AttrLinearFill() : AttrFillGeometry() {}
00699     AttrLinearFill(Node* ContextNode,  
00700                  AttachNodeDirection Direction,    
00701                  BOOL Locked=FALSE, 
00702                  BOOL Mangled=FALSE,  
00703                  BOOL Marked=FALSE, 
00704                  BOOL Selected=FALSE): 
00705         AttrFillGeometry(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
00706 
00707     virtual void Transform( TransformBase& );
00708     virtual BOOL CanTransform();
00709 
00710     // Functions for rendering Fill Mesh 
00711     virtual void RenderFillBlobs(RenderRegion* pRender) {}
00712     virtual void RenderFillMesh(RenderRegion*, DocCoord* , BOOL*, INT32 NumControlPoints = 0);
00713 
00714     virtual AttributeValue* GetAttributeValue() = 0;
00715 
00716     virtual FillControl TestColourDrop(AttrColourDrop*);
00717     virtual AttrFillGeometry* DoColourDrop(AttrColourDrop* ColDrop) ;
00718 
00719     virtual BOOL IsAGradFill() const { return TRUE; } 
00720 
00721     virtual FillControl CheckForControlHit(DocCoord &ClickPos);
00722     virtual BOOL ChangeControlColour(DocColour& Col, 
00723     FillControl Cntrl, AttrColourDrop * pColDrop = NULL);
00724 
00725     virtual BOOL NeedsToRenderAtEachBrushStroke() const { return TRUE;}
00726 
00727     // returns the number of control points required to describe this fill,
00728     // ie 2 in the case of a linear fill.
00729     virtual INT32 GetNumberOfControlPoints() { return 2; }
00730 
00731     // virtual override of AttrFillGeometry::TransformTranslateObject.
00732     virtual void TransformTranslateObject(const ExtendParams& ExtParams);
00733 
00734 protected:
00735     virtual void ValidateAttributeValue();
00736 };
00737 
00738 /***********************************************************************************************
00739 
00740 >   class AttrLinearColourFill : public AttrLinearFill
00741 
00742     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
00743     Created:    22/8/94
00744     Purpose:    Linear Graduated Colour Fill Attribute class.
00745     SeeAlso:    LinearFillAttribute
00746 
00747 ***********************************************************************************************/
00748 
00749 class AttrLinearColourFill : public AttrLinearFill
00750 {
00751     CC_DECLARE_DYNCREATE(AttrLinearColourFill)
00752     
00753 public:
00754     AttrLinearColourFill() : AttrLinearFill() {}
00755     AttrLinearColourFill(Node* ContextNode,  
00756                  AttachNodeDirection Direction,    
00757                  BOOL Locked=FALSE, 
00758                  BOOL Mangled=FALSE,  
00759                  BOOL Marked=FALSE, 
00760                  BOOL Selected=FALSE): 
00761         AttrLinearFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
00762 
00763     void Render( RenderRegion* pRender );
00764     Node* SimpleCopy();                         // Copies a node
00765     virtual UINT32 GetAttrNameID(void); 
00766     void GetDebugDetails(StringBase* Str);
00767     virtual UINT32 GetNodeSize() const;             // Returns size of node in bytes
00768 
00769     virtual void RenderFillBlobs(RenderRegion* pRender);
00770 
00771     virtual CCRuntimeClass* GetAttributeType() { return CC_RUNTIME_CLASS(AttrFillGeometry); }
00772     virtual AttributeValue* GetAttributeValue() { return &Value; }
00773 
00774     AttrFillGeometry* ChangeAttrValue(AttrValueChange* pValue) { return ChangeColour(pValue); }
00775 
00776     virtual BOOL IsAColourFill() const { return TRUE; }
00777 
00778     // Version 2 file format functions
00779     virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
00780     virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
00781     virtual BOOL WriteColourDefinitions (BaseCamelotFilter* pFilter);
00782 
00783 // Karim 13/09/2000
00784 // Virtual override of NodeRenderable::IsSeeThrough() - see base declaration for details.
00785 public:
00786     virtual BOOL IsSeeThrough(BOOL CheckIndirectAttrs)
00787     {
00788         return (GetStartColour() != NULL    &&  GetStartColour()->IsTransparent() &&
00789                 GetEndColour() != NULL      &&  GetEndColour()->IsTransparent());
00790     }
00791 
00792 protected:
00793     LinearFillAttribute Value;
00794 };
00795 
00796 
00797 /***********************************************************************************************
00798 
00799 >   class AttrLinearTranspFill : public AttrLinearFill
00800 
00801     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
00802     Created:    22/8/94
00803     Purpose:    Linear Graduated Transparency Fill Attribute class.
00804     SeeAlso:    LinearFillAttribute
00805 
00806 ***********************************************************************************************/
00807 
00808 class AttrLinearTranspFill : public AttrLinearFill
00809 {
00810     CC_DECLARE_DYNCREATE(AttrLinearTranspFill)
00811     
00812 public:
00813     AttrLinearTranspFill() : AttrLinearFill() {}
00814     AttrLinearTranspFill(Node* ContextNode,  
00815                  AttachNodeDirection Direction,    
00816                  BOOL Locked=FALSE, 
00817                  BOOL Mangled=FALSE,  
00818                  BOOL Marked=FALSE, 
00819                  BOOL Selected=FALSE): 
00820         AttrLinearFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
00821 
00822     void Render( RenderRegion* pRender );
00823     Node* SimpleCopy();                         // Copies a node
00824     virtual UINT32 GetAttrNameID(void); 
00825     void GetDebugDetails(StringBase* Str);
00826     virtual UINT32 GetNodeSize() const;             // Returns size of node in bytes
00827 
00828     virtual void RenderFillBlobs(RenderRegion* pRender);
00829     virtual BOOL IsVisible() { return IsTranspMeshVisible(); }
00830     virtual BOOL NeedsTransparency() const;
00831 
00832     virtual CCRuntimeClass* GetAttributeType() { return CC_RUNTIME_CLASS(AttrTranspFillGeometry); }
00833     virtual AttributeValue* GetAttributeValue() { return &Value; }
00834 
00835     AttrFillGeometry* ChangeAttrValue(AttrValueChange* pValue) { return ChangeTransp(pValue); }
00836 
00837     virtual BOOL IsATranspFill() const { return TRUE; } 
00838     virtual BOOL HasEquivalentDefaultValue(BOOL bAppearance = FALSE);
00839 
00840     // Version 2 file format functions
00841     virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
00842     virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
00843 
00844 // Karim 13/09/2000
00845 // Virtual override of NodeRenderable::IsSeeThrough() - see base declaration for details.
00846 public:
00847     virtual BOOL IsSeeThrough(BOOL CheckIndirectAttrs) {
00848         return ((GetStartTransp() != NULL   &&  *GetStartTransp() != 0) ||
00849                 (GetEndTransp() != NULL     &&  *GetEndTransp() != 0));
00850     }
00851 
00852 protected:
00853     LinearTranspFillAttribute Value;
00854 };
00855 
00856 /***********************************************************************************************
00857 
00858 >   class AttrRadialFill : public AttrFillGeometry
00859 
00860     Author:     Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
00861     Created:    18/07/94
00862     Purpose:    Radial Graduated Fill Attribute class.
00863     SeeAlso:    RadialFillAttribute
00864 
00865 ***********************************************************************************************/
00866 
00867 class AttrRadialFill : public AttrFillGeometry
00868 {
00869     CC_DECLARE_DYNCREATE(AttrRadialFill)
00870     
00871 public:
00872     AttrRadialFill() : AttrFillGeometry() {}
00873     AttrRadialFill(Node* ContextNode,  
00874                  AttachNodeDirection Direction,    
00875                  BOOL Locked=FALSE, 
00876                  BOOL Mangled=FALSE,  
00877                  BOOL Marked=FALSE, 
00878                  BOOL Selected=FALSE): 
00879         AttrFillGeometry(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
00880 
00881     virtual void Transform( TransformBase& );
00882     virtual BOOL CanTransform();
00883 
00884     // Functions for rendering Fill Mesh 
00885     virtual void RenderFillBlobs(RenderRegion* pRender) {}
00886     virtual void RenderFillMesh(RenderRegion*, DocCoord* , BOOL*, INT32 NumControlPoints = 0);
00887     virtual void OnControlDrag( DocCoord, FillControl&, ClickModifiers );
00888 
00889     virtual AttributeValue* GetAttributeValue() = 0;
00890 
00891     virtual DocRect GetBlobBoundingRect();
00892 
00893     virtual ANGLE GetSecondaryAngle() { return 90; }
00894 
00895     virtual FillControl CheckForControlHit(DocCoord &); 
00896 
00897     void MakeCircular();
00898     void MakeElliptical();
00899 
00900     BOOL IsCircular() { return ATTRVALUE()->IsAspectLocked(); }
00901     BOOL IsElliptical() { return !IsCircular(); }
00902 
00903     virtual FillControl TestColourDrop(AttrColourDrop*);
00904 
00905     virtual BOOL IsAGradFill() const { return TRUE; } 
00906     virtual BOOL NeedsToRenderAtEachBrushStroke() const; 
00907 
00908     // returns the number of control points required to describe this fill,
00909     // ie 2 for circular, 3 for elliptical fills.
00910     virtual INT32 GetNumberOfControlPoints() { return IsCircular() ? 2 : 3; }
00911 
00912     // virtual override of AttrFillGeometry::TransformTranslateObject.
00913     virtual void TransformTranslateObject(const ExtendParams& ExtParams);
00914 
00915 protected:
00916     virtual void ValidateAttributeValue();
00917 };
00918 
00919 /***********************************************************************************************
00920 
00921 >   class AttrRadialColourFill : public AttrRadialFill
00922 
00923     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
00924     Created:    22/8/94
00925     Purpose:    Radial Graduated Colour Fill Attribute class.
00926     SeeAlso:    RadialFillAttribute
00927 
00928 ***********************************************************************************************/
00929 
00930 class AttrRadialColourFill : public AttrRadialFill
00931 {
00932     CC_DECLARE_DYNCREATE(AttrRadialColourFill)
00933     
00934 public:
00935     AttrRadialColourFill() : AttrRadialFill() {}
00936     AttrRadialColourFill(Node* ContextNode,  
00937                  AttachNodeDirection Direction,    
00938                  BOOL Locked=FALSE, 
00939                  BOOL Mangled=FALSE,  
00940                  BOOL Marked=FALSE, 
00941                  BOOL Selected=FALSE): 
00942         AttrRadialFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
00943 
00944     void Render( RenderRegion* pRender );
00945     virtual Node* SimpleCopy();                         // Copies a node
00946     virtual UINT32 GetAttrNameID(void); 
00947     void GetDebugDetails(StringBase* Str);
00948     virtual UINT32 GetNodeSize() const;             // Returns size of node in bytes
00949 
00950     virtual void RenderFillBlobs(RenderRegion* pRender);
00951 
00952     virtual CCRuntimeClass* GetAttributeType() { return CC_RUNTIME_CLASS(AttrFillGeometry); }
00953     virtual AttributeValue* GetAttributeValue() { return &Value; }
00954 
00955     AttrFillGeometry* ChangeAttrValue(AttrValueChange* pValue) { return ChangeColour(pValue); }
00956 
00957     virtual BOOL IsAColourFill() const { return TRUE; }
00958 
00959     // Version 2 file format functions
00960     virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
00961     virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
00962     virtual BOOL WriteColourDefinitions (BaseCamelotFilter* pFilter);
00963     virtual BOOL IsARadialColourFill() const { return TRUE;}
00964 
00965 // Karim 13/09/2000
00966 // Virtual override of NodeRenderable::IsSeeThrough() - see base declaration for details.
00967 public:
00968     virtual BOOL IsSeeThrough(BOOL CheckIndirectAttrs)
00969     {
00970         return (GetStartColour() != NULL    &&  GetStartColour()->IsTransparent() &&
00971                 GetEndColour() != NULL      &&  GetEndColour()->IsTransparent());
00972     }
00973 
00974 protected:
00975     RadialFillAttribute Value;
00976 };
00977 
00978 /***********************************************************************************************
00979 
00980 >   class AttrRadialTranspFill : public AttrRadialFill
00981 
00982     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
00983     Created:    22/8/94
00984     Purpose:    Radial Graduated Transp Fill Attribute class.
00985     SeeAlso:    RadialFillAttribute
00986 
00987 ***********************************************************************************************/
00988 
00989 class AttrRadialTranspFill : public AttrRadialFill
00990 {
00991     CC_DECLARE_DYNCREATE(AttrRadialTranspFill)
00992     
00993 public:
00994     AttrRadialTranspFill() : AttrRadialFill() {}
00995     AttrRadialTranspFill(Node* ContextNode,  
00996                  AttachNodeDirection Direction,    
00997                  BOOL Locked=FALSE, 
00998                  BOOL Mangled=FALSE,  
00999                  BOOL Marked=FALSE, 
01000                  BOOL Selected=FALSE): 
01001         AttrRadialFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
01002 
01003     void Render( RenderRegion* pRender );
01004     virtual Node* SimpleCopy();                         // Copies a node
01005     virtual UINT32 GetAttrNameID(void); 
01006     void GetDebugDetails(StringBase* Str);
01007     virtual UINT32 GetNodeSize() const;             // Returns size of node in bytes
01008 
01009     virtual void RenderFillBlobs(RenderRegion* pRender);
01010     virtual BOOL IsVisible() { return IsTranspMeshVisible(); }
01011     virtual BOOL NeedsTransparency() const;
01012 
01013     virtual CCRuntimeClass* GetAttributeType() { return CC_RUNTIME_CLASS(AttrTranspFillGeometry); }
01014     virtual AttributeValue* GetAttributeValue() { return &Value; }
01015 
01016     AttrFillGeometry* ChangeAttrValue(AttrValueChange* pValue) { return ChangeTransp(pValue); }
01017 
01018     virtual BOOL IsATranspFill() const { return TRUE; } 
01019     virtual BOOL NeedsToRenderAtEachBrushStroke() const; 
01020     virtual BOOL HasEquivalentDefaultValue(BOOL bAppearance = FALSE);
01021 
01022     // Version 2 file format functions
01023     virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
01024     virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
01025 
01026 // Karim 13/09/2000
01027 // Virtual override of NodeRenderable::IsSeeThrough() - see base declaration for details.
01028 public:
01029     virtual BOOL IsSeeThrough(BOOL CheckIndirectAttrs) {
01030         return ((GetStartTransp() != NULL   &&  *GetStartTransp() != 0) ||
01031                 (GetEndTransp() != NULL     &&  *GetEndTransp() != 0));
01032     }
01033 
01034 protected:
01035     RadialTranspFillAttribute Value;
01036 };
01037 
01038 /***********************************************************************************************
01039 
01040 >   class AttrCircularColourFill : public AttrRadialColourFill
01041 
01042     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
01043     Created:    8/8/94
01044     Purpose:    Radial Graduated Fill Attribute class.
01045     SeeAlso:    RadialFillAttribute
01046 
01047 ***********************************************************************************************/
01048 
01049 class AttrCircularColourFill : public AttrRadialColourFill
01050 {
01051     CC_DECLARE_DYNCREATE(AttrCircularColourFill)
01052     
01053 public:
01054     AttrCircularColourFill() : AttrRadialColourFill() {}
01055 };
01056 
01057 /***********************************************************************************************
01058 
01059 >   class AttrCircularTranspFill : public AttrRadialTranspFill
01060 
01061     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
01062     Created:    8/8/94
01063     Purpose:    Radial Graduated Fill Attribute class.
01064     SeeAlso:    RadialFillAttribute
01065 
01066 ***********************************************************************************************/
01067 
01068 class AttrCircularTranspFill : public AttrRadialTranspFill
01069 {
01070     CC_DECLARE_DYNCREATE(AttrCircularTranspFill)
01071     
01072 public:
01073     AttrCircularTranspFill() : AttrRadialTranspFill() {}
01074 };
01075 
01076 /***********************************************************************************************
01077 
01078 >   class AttrConicalFill : public AttrFillGeometry
01079 
01080     Author:     Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
01081     Created:    18/07/94
01082     Purpose:    Conical Fill Attribute class.
01083     SeeAlso:    ConicalFillAttribute
01084 
01085 ***********************************************************************************************/
01086 
01087 class AttrConicalFill : public AttrFillGeometry
01088 {
01089     CC_DECLARE_DYNCREATE(AttrConicalFill)
01090     
01091 public:
01092     AttrConicalFill() : AttrFillGeometry() {}
01093     AttrConicalFill(Node* ContextNode,  
01094                  AttachNodeDirection Direction,    
01095                  BOOL Locked=FALSE, 
01096                  BOOL Mangled=FALSE,  
01097                  BOOL Marked=FALSE, 
01098                  BOOL Selected=FALSE): 
01099         AttrFillGeometry(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
01100 
01101     virtual void Transform( TransformBase& );
01102     virtual BOOL CanTransform();
01103 
01104     virtual void TransformSelectedControlPoints( TransformBase&, BOOL* isARampBlob = NULL );
01105 
01106     // Selection Functions
01107     virtual void RenderFillBlobs(RenderRegion* pRender) {}
01108     virtual void RenderFillMesh(RenderRegion*, DocCoord* , BOOL*, INT32 NumControlPoints = 0);
01109     virtual void OnControlDrag( DocCoord, FillControl&, ClickModifiers );
01110     
01111     virtual AttributeValue* GetAttributeValue() = 0;
01112 
01113     virtual DocRect GetBlobBoundingRect();
01114     virtual FillControl CheckForControlHit(DocCoord &); 
01115 
01116     virtual FillControl TestColourDrop(AttrColourDrop*);
01117 
01118     virtual BOOL IsAGradFill() const { return TRUE; } 
01119 
01120     virtual AttrFillGeometry* DoColourDrop(AttrColourDrop*);
01121 
01122     virtual BOOL NeedsToRenderAtEachBrushStroke() const { return TRUE;}
01123 
01124     // returns the number of control points required to describe this fill,
01125     // ie 2 in the case of a conical fill.
01126     virtual INT32 GetNumberOfControlPoints() { return 2; }
01127 
01128 protected:
01129     virtual void ValidateAttributeValue();
01130     virtual void RenderControl(FillControl, BOOL);  
01131 
01132     // DMc 22-10-99
01133     // Find the ramp fill point (0 - 1.0) given certain coordinates
01134     virtual double FindRampPoint(DocCoord &dc, DocCoord &StartPoint, DocCoord &EndPoint);
01135 
01136 };
01137 
01138 /***********************************************************************************************
01139 
01140 >   class AttrConicalColourFill : public AttrConicalFill
01141 
01142     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
01143     Created:    22/8/94
01144     Purpose:    Conical Graduated Colour Fill Attribute class.
01145     SeeAlso:    ConicalFillAttribute
01146 
01147 ***********************************************************************************************/
01148 
01149 class AttrConicalColourFill : public AttrConicalFill
01150 {
01151     CC_DECLARE_DYNCREATE(AttrConicalColourFill)
01152     
01153 public:
01154     AttrConicalColourFill() : AttrConicalFill() {}
01155     AttrConicalColourFill(Node* ContextNode,  
01156                  AttachNodeDirection Direction,    
01157                  BOOL Locked=FALSE, 
01158                  BOOL Mangled=FALSE,  
01159                  BOOL Marked=FALSE, 
01160                  BOOL Selected=FALSE): 
01161         AttrConicalFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
01162 
01163     void Render( RenderRegion* pRender );
01164     Node* SimpleCopy();                         // Copies a node
01165     virtual UINT32 GetAttrNameID(void); 
01166     void GetDebugDetails(StringBase* Str);
01167     virtual UINT32 GetNodeSize() const;             // Returns size of node in bytes
01168 
01169     virtual void RenderFillBlobs(RenderRegion* pRender);
01170 
01171     virtual CCRuntimeClass* GetAttributeType() { return CC_RUNTIME_CLASS(AttrFillGeometry); }
01172     virtual AttributeValue* GetAttributeValue() { return &Value; }
01173 
01174     AttrFillGeometry* ChangeAttrValue(AttrValueChange* pValue) { return ChangeColour(pValue); }
01175 
01176     virtual BOOL IsAColourFill() const { return TRUE; }
01177 
01178     // Version 2 file format functions
01179     virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
01180     virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
01181     virtual BOOL WriteColourDefinitions (BaseCamelotFilter* pFilter);
01182 
01183 // Karim 13/09/2000
01184 // Virtual override of NodeRenderable::IsSeeThrough() - see base declaration for details.
01185 public:
01186     virtual BOOL IsSeeThrough(BOOL CheckIndirectAttrs)
01187     {
01188         return (GetStartColour() != NULL    &&  GetStartColour()->IsTransparent() &&
01189                 GetEndColour() != NULL      &&  GetEndColour()->IsTransparent());
01190     }
01191 
01192 protected:
01193     ConicalFillAttribute Value;
01194 };
01195 
01196 /***********************************************************************************************
01197 
01198 >   class AttrConicalTranspFill : public AttrConicalFill
01199 
01200     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
01201     Created:    22/8/94
01202     Purpose:    Conical Graduated Transparency Fill Attribute class.
01203     SeeAlso:    ConicalFillAttribute
01204 
01205 ***********************************************************************************************/
01206 
01207 class AttrConicalTranspFill : public AttrConicalFill
01208 {
01209     CC_DECLARE_DYNCREATE(AttrConicalTranspFill)
01210     
01211 public:
01212     AttrConicalTranspFill() : AttrConicalFill() {}
01213     AttrConicalTranspFill(Node* ContextNode,  
01214                  AttachNodeDirection Direction,    
01215                  BOOL Locked=FALSE, 
01216                  BOOL Mangled=FALSE,  
01217                  BOOL Marked=FALSE, 
01218                  BOOL Selected=FALSE): 
01219         AttrConicalFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
01220 
01221     void Render( RenderRegion* pRender );
01222     Node* SimpleCopy();                         // Copies a node
01223     virtual UINT32 GetAttrNameID(void); 
01224     void GetDebugDetails(StringBase* Str);
01225     virtual UINT32 GetNodeSize() const;             // Returns size of node in bytes
01226 
01227     virtual void RenderFillBlobs(RenderRegion* pRender);
01228     virtual BOOL IsVisible() { return IsTranspMeshVisible(); }
01229     virtual BOOL NeedsTransparency() const;
01230 
01231     virtual CCRuntimeClass* GetAttributeType() { return CC_RUNTIME_CLASS(AttrTranspFillGeometry); }
01232     virtual AttributeValue* GetAttributeValue() { return &Value; }
01233 
01234     AttrFillGeometry* ChangeAttrValue(AttrValueChange* pValue) { return ChangeTransp(pValue); }
01235 
01236     virtual BOOL IsATranspFill() const { return TRUE; } 
01237     virtual BOOL HasEquivalentDefaultValue(BOOL bAppearance = FALSE);
01238 
01239     // Version 2 file format functions
01240     virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
01241     virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
01242 
01243 // Karim 13/09/2000
01244 // Virtual override of NodeRenderable::IsSeeThrough() - see base declaration for details.
01245 public:
01246     virtual BOOL IsSeeThrough(BOOL CheckIndirectAttrs) {
01247         return ((GetStartTransp() != NULL   &&  *GetStartTransp() != 0) ||
01248                 (GetEndTransp() != NULL     &&  *GetEndTransp() != 0));
01249     }
01250 
01251 protected:
01252     ConicalTranspFillAttribute Value;
01253 };
01254 
01255 
01256 /***********************************************************************************************
01257 
01258 >   class AttrSquareFill : public AttrFillGeometry
01259 
01260     Author:     Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
01261     Created:    9/8/96
01262     Purpose:    Square Graduated Fill Attribute class.
01263     SeeAlso:    SquareFillAttribute
01264 
01265 ***********************************************************************************************/
01266 
01267 class AttrSquareFill : public AttrFillGeometry
01268 {
01269     CC_DECLARE_DYNCREATE(AttrSquareFill)
01270     
01271 public:
01272     AttrSquareFill() : AttrFillGeometry() {}
01273     AttrSquareFill(Node* ContextNode,  
01274                  AttachNodeDirection Direction,    
01275                  BOOL Locked=FALSE, 
01276                  BOOL Mangled=FALSE,  
01277                  BOOL Marked=FALSE, 
01278                  BOOL Selected=FALSE): 
01279         AttrFillGeometry(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
01280 
01281     virtual void Transform(TransformBase& );
01282     virtual BOOL CanTransform();
01283 
01284     // Functions for rendering Fill Mesh 
01285     virtual void RenderFillBlobs(RenderRegion* pRender) {};
01286     virtual void RenderFillMesh(RenderRegion*, DocCoord* , BOOL*, INT32 NumControlPoints = 0);
01287     virtual void OnControlDrag( DocCoord, FillControl&, ClickModifiers );
01288 
01289     virtual AttributeValue* GetAttributeValue() = 0;
01290 
01291     virtual FillControl TestColourDrop(AttrColourDrop *ColDrop);
01292 
01293     virtual BOOL IsAGradFill() const { return TRUE; } 
01294 
01295     virtual DocRect GetBlobBoundingRect();
01296     virtual BOOL NeedsToRenderAtEachBrushStroke() const { return TRUE;}
01297 
01298     // returns the number of control points required to describe this fill,
01299     // ie 3 in the case of a square fill.
01300     virtual INT32 GetNumberOfControlPoints() { return 3; }
01301 
01302 protected:
01303     virtual void ValidateAttributeValue();
01304 };
01305 
01306 /***********************************************************************************************
01307 
01308 >   class AttrSquareColourFill : public AttrSquareFill
01309 
01310     Author:     Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
01311     Created:    9/8/96
01312     Purpose:    Square Graduated Colour Fill Attribute class.
01313     SeeAlso:    SquareFillAttribute
01314 
01315 ***********************************************************************************************/
01316 
01317 class AttrSquareColourFill : public AttrSquareFill
01318 {
01319     CC_DECLARE_DYNCREATE(AttrSquareColourFill)
01320     
01321 public:
01322     AttrSquareColourFill() : AttrSquareFill() {}
01323     AttrSquareColourFill(Node* ContextNode,  
01324                  AttachNodeDirection Direction,    
01325                  BOOL Locked=FALSE, 
01326                  BOOL Mangled=FALSE,  
01327                  BOOL Marked=FALSE, 
01328                  BOOL Selected=FALSE): 
01329         AttrSquareFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
01330 
01331     void Render( RenderRegion* pRender );
01332     Node* SimpleCopy();                         // Copies a node
01333     virtual UINT32 GetAttrNameID(void); 
01334     void GetDebugDetails(StringBase* Str);
01335     virtual UINT32 GetNodeSize() const;             // Returns size of node in bytes
01336 
01337     virtual void RenderFillBlobs(RenderRegion* pRender);
01338 
01339     virtual CCRuntimeClass* GetAttributeType() { return CC_RUNTIME_CLASS(AttrFillGeometry); }
01340     virtual AttributeValue* GetAttributeValue() { return &Value; }
01341 
01342     AttrFillGeometry* ChangeAttrValue(AttrValueChange* pValue) { return ChangeColour(pValue); }
01343 
01344     virtual BOOL IsAColourFill() const { return TRUE; }
01345 
01346     // Version 2 file format functions
01347     virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
01348     virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
01349     virtual BOOL WriteColourDefinitions (BaseCamelotFilter* pFilter);
01350 
01351 // Karim 13/09/2000
01352 // Virtual override of NodeRenderable::IsSeeThrough() - see base declaration for details.
01353 public:
01354     virtual BOOL IsSeeThrough(BOOL CheckIndirectAttrs)
01355     {
01356         return (GetStartColour() != NULL    &&  GetStartColour()->IsTransparent() &&
01357                 GetEndColour() != NULL      &&  GetEndColour()->IsTransparent());
01358     }
01359 
01360 protected:
01361     SquareFillAttribute Value;
01362 };
01363 
01364 /***********************************************************************************************
01365 
01366 >   class AttrSquareTranspFill : public AttrSquareFill
01367 
01368     Author:     Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
01369     Created:    9/8/96
01370     Purpose:    Square Graduated Transparency Fill Attribute class.
01371     SeeAlso:    SquareFillAttribute
01372 
01373 ***********************************************************************************************/
01374 
01375 class AttrSquareTranspFill : public AttrSquareFill
01376 {
01377     CC_DECLARE_DYNCREATE(AttrSquareTranspFill)
01378     
01379 public:
01380     AttrSquareTranspFill() : AttrSquareFill() {}
01381     AttrSquareTranspFill(Node* ContextNode,  
01382                  AttachNodeDirection Direction,    
01383                  BOOL Locked=FALSE, 
01384                  BOOL Mangled=FALSE,  
01385                  BOOL Marked=FALSE, 
01386                  BOOL Selected=FALSE): 
01387         AttrSquareFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
01388 
01389     void Render( RenderRegion* pRender );
01390     Node* SimpleCopy();                         // Copies a node
01391     virtual UINT32 GetAttrNameID(void); 
01392     void GetDebugDetails(StringBase* Str);
01393     virtual UINT32 GetNodeSize() const;             // Returns size of node in bytes
01394 
01395     virtual void RenderFillBlobs(RenderRegion* pRender);
01396 
01397     virtual BOOL IsVisible() { return IsTranspMeshVisible(); }
01398     virtual BOOL NeedsTransparency() const;
01399 
01400     virtual CCRuntimeClass* GetAttributeType() { return CC_RUNTIME_CLASS(AttrTranspFillGeometry); }
01401     virtual AttributeValue* GetAttributeValue() { return &Value; }
01402 
01403     AttrFillGeometry* ChangeAttrValue(AttrValueChange* pValue) { return ChangeTransp(pValue); }
01404 
01405     virtual BOOL IsATranspFill() const { return TRUE; } 
01406     virtual BOOL HasEquivalentDefaultValue(BOOL bAppearance = FALSE);
01407 
01408     // Version 2 file format functions
01409     virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
01410     virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
01411 
01412 // Karim 13/09/2000
01413 // Virtual override of NodeRenderable::IsSeeThrough() - see base declaration for details.
01414 public:
01415     virtual BOOL IsSeeThrough(BOOL CheckIndirectAttrs) {
01416         return ((GetStartTransp() != NULL   &&  *GetStartTransp() != 0) ||
01417                 (GetEndTransp() != NULL     &&  *GetEndTransp() != 0));
01418     }
01419 
01420 protected:
01421     SquareTranspFillAttribute Value;
01422 };
01423 
01424 
01425 
01426 /***********************************************************************************************
01427 
01428 >   class AttrThreeColFill : public AttrFillGeometry
01429 
01430     Author:     Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
01431     Created:    18/07/94
01432     Purpose:    ThreeCol Graduated Fill Attribute class.
01433     SeeAlso:    ThreeColFillAttribute
01434 
01435 ***********************************************************************************************/
01436 
01437 class AttrThreeColFill : public AttrFillGeometry
01438 {
01439     CC_DECLARE_DYNCREATE(AttrThreeColFill)
01440     
01441 public:
01442     AttrThreeColFill() : AttrFillGeometry() {}
01443     AttrThreeColFill(Node* ContextNode,  
01444                  AttachNodeDirection Direction,    
01445                  BOOL Locked=FALSE, 
01446                  BOOL Mangled=FALSE,  
01447                  BOOL Marked=FALSE, 
01448                  BOOL Selected=FALSE): 
01449         AttrFillGeometry(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
01450 
01451     virtual void Transform(TransformBase& );
01452     virtual BOOL CanTransform();
01453 
01454     // Functions for rendering Fill Mesh 
01455     virtual void RenderFillBlobs(RenderRegion* pRender) {};
01456     virtual void RenderFillMesh(RenderRegion*, DocCoord* , BOOL*, INT32 NumControlPoints = 0);
01457     virtual void OnControlDrag( DocCoord, FillControl&, ClickModifiers );
01458 
01459     virtual void RenderControl(FillControl Control, BOOL RenderOn);
01460 
01461     virtual void CycleSelection(BOOL Reverse);
01462 
01463     virtual FillControl CheckForControlHit(DocCoord &ClickPos); 
01464 
01465     virtual AttributeValue* GetAttributeValue() = 0;
01466 
01467     virtual FillControl TestColourDrop(AttrColourDrop *ColDrop);
01468 
01469     virtual void TransformSelectedControlPoints( TransformBase&, BOOL* isARampBlob = NULL );
01470 
01471     virtual BOOL IsAGradFill() const { return TRUE; } 
01472 
01473     virtual DocRect GetBlobBoundingRect();
01474 
01475     virtual BOOL NeedsForceToSimpleMapping() { return (FALSE); }
01476 
01477     // returns the number of control points required to describe this fill,
01478     // ie 3 in the case of a three-colour fill.
01479     virtual INT32 GetNumberOfControlPoints() { return 3; }
01480 
01481 protected:
01482     virtual void ValidateAttributeValue();
01483 };
01484 
01485 /***********************************************************************************************
01486 
01487 >   class AttrThreeColColourFill : public AttrThreeColFill
01488 
01489     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
01490     Created:    22/8/94
01491     Purpose:    ThreeCol Graduated Colour Fill Attribute class.
01492     SeeAlso:    ThreeColFillAttribute
01493 
01494 ***********************************************************************************************/
01495 
01496 class AttrThreeColColourFill : public AttrThreeColFill
01497 {
01498     CC_DECLARE_DYNCREATE(AttrThreeColColourFill)
01499     
01500 public:
01501     AttrThreeColColourFill() : AttrThreeColFill() {}
01502     AttrThreeColColourFill(Node* ContextNode,  
01503                  AttachNodeDirection Direction,    
01504                  BOOL Locked=FALSE, 
01505                  BOOL Mangled=FALSE,  
01506                  BOOL Marked=FALSE, 
01507                  BOOL Selected=FALSE): 
01508         AttrThreeColFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
01509 
01510     void Render( RenderRegion* pRender );
01511     Node* SimpleCopy();                         // Copies a node
01512     virtual UINT32 GetAttrNameID(void); 
01513     void GetDebugDetails(StringBase* Str);
01514     virtual UINT32 GetNodeSize() const;             // Returns size of node in bytes
01515 
01516     virtual void RenderFillBlobs(RenderRegion* pRender);
01517 
01518     virtual CCRuntimeClass* GetAttributeType() { return CC_RUNTIME_CLASS(AttrFillGeometry); }
01519     virtual AttributeValue* GetAttributeValue() { return &Value; }
01520 
01521     AttrFillGeometry* ChangeAttrValue(AttrValueChange* pValue) { return ChangeColour(pValue); }
01522 
01523     virtual BOOL IsAColourFill() const { return TRUE; }
01524 
01525     // Version 2 file format functions
01526     virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
01527     virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
01528     virtual BOOL WriteColourDefinitions (BaseCamelotFilter* pFilter);
01529 
01530 // Karim 13/09/2000
01531 // Virtual override of NodeRenderable::IsSeeThrough() - see base declaration for details.
01532 public:
01533     virtual BOOL IsSeeThrough(BOOL CheckIndirectAttrs)
01534     {
01535         return (GetStartColour() != NULL    &&  GetStartColour()->IsTransparent()   &&
01536                 GetEndColour() != NULL      &&  GetEndColour()->IsTransparent());
01537     }
01538 
01539 protected:
01540     ThreeColFillAttribute Value;
01541 };
01542 
01543 
01544 /***********************************************************************************************
01545 
01546 >   class AttrThreeColTranspFill : public AttrThreeColFill
01547 
01548     Author:     Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
01549     Created:    9/8/96
01550     Purpose:    ThreeCol Graduated Transparency Fill Attribute class.
01551     SeeAlso:    ThreeColFillAttribute
01552 
01553 ***********************************************************************************************/
01554 
01555 class AttrThreeColTranspFill : public AttrThreeColFill
01556 {
01557     CC_DECLARE_DYNCREATE(AttrThreeColTranspFill)
01558     
01559 public:
01560     AttrThreeColTranspFill() : AttrThreeColFill() {}
01561     AttrThreeColTranspFill(Node* ContextNode,  
01562                  AttachNodeDirection Direction,    
01563                  BOOL Locked=FALSE, 
01564                  BOOL Mangled=FALSE,  
01565                  BOOL Marked=FALSE, 
01566                  BOOL Selected=FALSE): 
01567         AttrThreeColFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
01568 
01569     void Render( RenderRegion* pRender );
01570     Node* SimpleCopy();                         // Copies a node
01571     virtual UINT32 GetAttrNameID(void); 
01572     void GetDebugDetails(StringBase* Str);
01573     virtual UINT32 GetNodeSize() const;             // Returns size of node in bytes
01574 
01575     virtual void RenderFillBlobs(RenderRegion* pRender);
01576 
01577     virtual BOOL IsVisible() { return IsTranspMeshVisible(); }
01578     virtual BOOL NeedsTransparency() const;
01579 
01580     virtual CCRuntimeClass* GetAttributeType() { return CC_RUNTIME_CLASS(AttrTranspFillGeometry); }
01581     virtual AttributeValue* GetAttributeValue() { return &Value; }
01582 
01583     AttrFillGeometry* ChangeAttrValue(AttrValueChange* pValue) { return ChangeTransp(pValue); }
01584 
01585     virtual BOOL IsATranspFill() const { return TRUE; } 
01586     virtual BOOL HasEquivalentDefaultValue(BOOL bAppearance = FALSE);
01587 
01588     // Version 2 file format functions
01589     virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
01590     virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
01591 
01592 // Karim 13/09/2000
01593 // Virtual override of NodeRenderable::IsSeeThrough() - see base declaration for details.
01594 public:
01595     virtual BOOL IsSeeThrough(BOOL CheckIndirectAttrs) {
01596         return ((GetStartTransp() != NULL   &&  *GetStartTransp() != 0) ||
01597                 (GetEndTransp() != NULL     &&  *GetEndTransp() != 0)   ||
01598                 (GetEndTransp2() != NULL    &&  *GetEndTransp2() != 0));
01599     }
01600 
01601 protected:
01602     ThreeColTranspFillAttribute Value;
01603 };
01604 
01605 
01606 
01607 
01608 
01609 
01610 /***********************************************************************************************
01611 
01612 >   class AttrFourColFill : public AttrFillGeometry
01613 
01614     Author:     Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
01615     Created:    18/07/94
01616     Purpose:    FourCol Graduated Fill Attribute class.
01617     SeeAlso:    FourColFillAttribute
01618 
01619 ***********************************************************************************************/
01620 
01621 class AttrFourColFill : public AttrFillGeometry
01622 {
01623     CC_DECLARE_DYNCREATE(AttrFourColFill)
01624     
01625 public:
01626     AttrFourColFill() : AttrFillGeometry() {}
01627     AttrFourColFill(Node* ContextNode,  
01628                  AttachNodeDirection Direction,    
01629                  BOOL Locked=FALSE, 
01630                  BOOL Mangled=FALSE,  
01631                  BOOL Marked=FALSE, 
01632                  BOOL Selected=FALSE): 
01633         AttrFillGeometry(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
01634 
01635     virtual void Transform(TransformBase& );
01636     virtual BOOL CanTransform();
01637 
01638     // Functions for rendering Fill Mesh 
01639     virtual void RenderFillBlobs(RenderRegion* pRender) {};
01640     virtual void RenderFillMesh(RenderRegion*, DocCoord* , BOOL*, INT32 NumControlPoints = 0);
01641     virtual void OnControlDrag( DocCoord, FillControl&, ClickModifiers );
01642 
01643     virtual void RenderControl(FillControl Control, BOOL RenderOn);
01644 
01645     virtual void CycleSelection(BOOL Reverse);
01646 
01647     virtual FillControl CheckForControlHit(DocCoord &ClickPos); 
01648 
01649     virtual AttributeValue* GetAttributeValue() = 0;
01650 
01651     virtual FillControl TestColourDrop(AttrColourDrop *ColDrop);
01652 
01653     virtual void TransformSelectedControlPoints( TransformBase&, BOOL* isARampBlob = NULL );
01654 
01655     virtual BOOL IsAGradFill() const { return TRUE; } 
01656 
01657     virtual DocRect GetBlobBoundingRect();
01658 
01659     virtual BOOL NeedsForceToSimpleMapping() { return (FALSE); }
01660 
01661     // returns the number of control points required to describe this fill,
01662     // ie 3 in the case of a four-colour fill.
01663     virtual INT32 GetNumberOfControlPoints() { return 3; }
01664 
01665 protected:
01666     virtual void ValidateAttributeValue();
01667 };
01668 
01669 /***********************************************************************************************
01670 
01671 >   class AttrFourColColourFill : public AttrFourColFill
01672 
01673     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
01674     Created:    22/8/94
01675     Purpose:    FourCol Graduated Colour Fill Attribute class.
01676     SeeAlso:    FourColFillAttribute
01677 
01678 ***********************************************************************************************/
01679 
01680 class AttrFourColColourFill : public AttrFourColFill
01681 {
01682     CC_DECLARE_DYNCREATE(AttrFourColColourFill)
01683     
01684 public:
01685     AttrFourColColourFill() : AttrFourColFill() {}
01686     AttrFourColColourFill(Node* ContextNode,  
01687                  AttachNodeDirection Direction,    
01688                  BOOL Locked=FALSE, 
01689                  BOOL Mangled=FALSE,  
01690                  BOOL Marked=FALSE, 
01691                  BOOL Selected=FALSE): 
01692         AttrFourColFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
01693 
01694     void Render( RenderRegion* pRender );
01695     Node* SimpleCopy();                         // Copies a node
01696     virtual UINT32 GetAttrNameID(void); 
01697     void GetDebugDetails(StringBase* Str);
01698     virtual UINT32 GetNodeSize() const;             // Returns size of node in bytes
01699 
01700     virtual void RenderFillBlobs(RenderRegion* pRender);
01701 
01702     virtual CCRuntimeClass* GetAttributeType() { return CC_RUNTIME_CLASS(AttrFillGeometry); }
01703     virtual AttributeValue* GetAttributeValue() { return &Value; }
01704 
01705     AttrFillGeometry* ChangeAttrValue(AttrValueChange* pValue) { return ChangeColour(pValue); }
01706 
01707     virtual BOOL IsAColourFill() const { return TRUE; }
01708 
01709     // Version 2 file format functions
01710     virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
01711     virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
01712     virtual BOOL WriteColourDefinitions (BaseCamelotFilter* pFilter);
01713 
01714 // Karim 13/09/2000
01715 // Virtual override of NodeRenderable::IsSeeThrough() - see base declaration for details.
01716 public:
01717     virtual BOOL IsSeeThrough(BOOL CheckIndirectAttrs)
01718     {
01719         return (GetStartColour() != NULL    &&  GetStartColour()->IsTransparent()   &&
01720                 GetEndColour() != NULL      &&  GetEndColour()->IsTransparent());
01721     }
01722 
01723 protected:
01724     FourColFillAttribute Value;
01725 };
01726 
01727 
01728 /***********************************************************************************************
01729 
01730 >   class AttrFourColTranspFill : public AttrFourColFill
01731 
01732     Author:     Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
01733     Created:    9/8/96
01734     Purpose:    Four point graduated transparency Fill Attribute class.
01735     SeeAlso:    FourColFillAttribute
01736 
01737 ***********************************************************************************************/
01738 
01739 class AttrFourColTranspFill : public AttrFourColFill
01740 {
01741     CC_DECLARE_DYNCREATE(AttrFourColTranspFill)
01742     
01743 public:
01744     AttrFourColTranspFill() : AttrFourColFill() {}
01745     AttrFourColTranspFill(Node* ContextNode,  
01746                  AttachNodeDirection Direction,    
01747                  BOOL Locked=FALSE, 
01748                  BOOL Mangled=FALSE,  
01749                  BOOL Marked=FALSE, 
01750                  BOOL Selected=FALSE): 
01751         AttrFourColFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
01752 
01753     void Render( RenderRegion* pRender );
01754     Node* SimpleCopy();                         // Copies a node
01755     virtual UINT32 GetAttrNameID(void); 
01756     void GetDebugDetails(StringBase* Str);
01757     virtual UINT32 GetNodeSize() const;             // Returns size of node in bytes
01758 
01759     virtual void RenderFillBlobs(RenderRegion* pRender);
01760 
01761     virtual BOOL IsVisible() { return IsTranspMeshVisible(); }
01762     virtual BOOL NeedsTransparency() const;
01763 
01764     virtual CCRuntimeClass* GetAttributeType() { return CC_RUNTIME_CLASS(AttrTranspFillGeometry); }
01765     virtual AttributeValue* GetAttributeValue() { return &Value; }
01766 
01767     AttrFillGeometry* ChangeAttrValue(AttrValueChange* pValue) { return ChangeTransp(pValue); }
01768 
01769     virtual BOOL IsATranspFill() const { return TRUE; } 
01770     virtual BOOL HasEquivalentDefaultValue(BOOL bAppearance = FALSE);
01771 
01772     // Version 2 file format functions
01773     virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
01774     virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
01775 
01776 // Karim 13/09/2000
01777 // Virtual override of NodeRenderable::IsSeeThrough() - see base declaration for details.
01778 public:
01779     virtual BOOL IsSeeThrough(BOOL CheckIndirectAttrs) {
01780         return ((GetStartTransp() != NULL   &&  *GetStartTransp() != 0) ||
01781                 (GetEndTransp() != NULL     &&  *GetEndTransp() != 0)   ||
01782                 (GetEndTransp2() != NULL    &&  *GetEndTransp2() != 0)  ||
01783                 (GetEndTransp3() != NULL    &&  *GetEndTransp3() != 0));
01784     }
01785 
01786 protected:
01787     FourColTranspFillAttribute Value;
01788 };
01789 
01790 
01791 
01792 
01793 /***********************************************************************************************
01794 
01795 >   class AttrBitmapFill : public AttrFillGeometry
01796 
01797     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
01798     Created:    8/8/94
01799     Purpose:    Bitmap Fill Attribute class.
01800     SeeAlso:    BitmapFillAttribute
01801 
01802 ***********************************************************************************************/
01803 
01804 class AttrBitmapFill : public AttrFillGeometry
01805 {
01806     CC_DECLARE_DYNCREATE(AttrBitmapFill)
01807     
01808 public:
01809     AttrBitmapFill() : AttrFillGeometry() {}
01810     AttrBitmapFill(Node* ContextNode,  
01811                  AttachNodeDirection Direction,    
01812                  BOOL Locked=FALSE, 
01813                  BOOL Mangled=FALSE,  
01814                  BOOL Marked=FALSE, 
01815                  BOOL Selected=FALSE): 
01816         AttrFillGeometry(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
01817 
01818     virtual void Transform( TransformBase& );
01819     virtual BOOL CanTransform();
01820 
01821     virtual void TransformSelectedControlPoints( TransformBase&, BOOL* isARampBlob = NULL );
01822 
01823     virtual AttributeValue* GetAttributeValue() = 0;
01824 
01825     virtual void RenderFillBlobs(RenderRegion* pRender) {}
01826     virtual void RenderFillMesh(RenderRegion*, DocCoord* , BOOL*, INT32 NumControlPoints = 0);
01827     virtual void OnControlDrag( DocCoord, FillControl&, ClickModifiers );
01828     virtual void SetAspectRatio(double Ratio);
01829 
01830     virtual void DrawEndBlobs();
01831 
01832     virtual FillControl CheckForControlHit(DocCoord &); 
01833 
01834     virtual BOOL ChangeControlTransp(AttrTranspChange *) { return FALSE; }
01835     virtual BOOL ChangeControlColour(AttrColourChange *) { return FALSE; }
01836 
01837     virtual DocRect GetBlobBoundingRect();
01838 
01839     virtual BOOL HidingNode();
01840     virtual BOOL ShowingNode();
01841 
01842     virtual FillControl TestColourDrop(AttrColourDrop*);
01843 
01844     virtual BOOL IsABitmapFill() const { return TRUE; }
01845     virtual BOOL IsAGradFill() const { return TRUE; } 
01846 
01847     virtual KernelBitmap *EnumerateBitmaps(UINT32 Count);
01848     virtual double GetEffectiveBitmapMinDPI(KernelBitmap* pBitmap);
01849     virtual BOOL ReplaceBitmap(KernelBitmap* pOrigBitmap, KernelBitmap* pNewBitmap);
01850 
01851     virtual BOOL NeedsForceToSimpleMapping() { return(FALSE); }
01852     
01853     virtual BOOL NeedsToRenderAtEachBrushStroke() const { return FALSE;}
01854 // Karim MacDonald 08/12/1999
01855 // Extend functions.
01856 // Note that if a sub-class returns TRUE from IsTypeExtendible, it must
01857 // also provide complete implementations of ValidateExtend and Extend,
01858 // which should usually check/extend its children.
01859 public:
01860     virtual BOOL IsTypeExtendible() const { return TRUE; }
01861     virtual DocRect ValidateExtend(const ExtendParams& ExtParams);
01862     virtual void Extend(const ExtendParams& ExtParams);
01863 
01864     // virtual override of NodeRenderable::TransformTranslateObject.
01865     virtual void TransformTranslateObject(const ExtendParams& ExtParams);
01866 
01867     // returns the number of control points required to describe this fill,
01868     // ie 2 in the case of a bitmap fill.
01869     virtual INT32 GetNumberOfControlPoints() { return 2; }
01870 
01871     // This routine returns any secondary attribute that needs to be changed,
01872     // when this attribute is changed.
01873     virtual NodeAttribute* GetOtherAttrToApply(BOOL* IsMutate);
01874 
01875 protected:
01876     virtual void ValidateAttributeValue();
01877     BOOL CopyNodeContents( AttrBitmapFill* NodeCopy );
01878 };
01879 
01880 /***********************************************************************************************
01881 
01882 >   class AttrBitmapColourFill : public AttrBitmapFill
01883 
01884     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
01885     Created:    22/8/94
01886     Purpose:    Bitmap Graduated Colour Fill Attribute class.
01887     SeeAlso:    BitmapFillAttribute
01888 
01889 ***********************************************************************************************/
01890 
01891 class AttrBitmapColourFill : public AttrBitmapFill
01892 {
01893     CC_DECLARE_DYNCREATE(AttrBitmapColourFill)
01894     
01895 public:
01896     AttrBitmapColourFill() : AttrBitmapFill() {}
01897     AttrBitmapColourFill(Node* ContextNode,  
01898                  AttachNodeDirection Direction,    
01899                  BOOL Locked=FALSE, 
01900                  BOOL Mangled=FALSE,  
01901                  BOOL Marked=FALSE, 
01902                  BOOL Selected=FALSE): 
01903         AttrBitmapFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
01904 
01905     void Render( RenderRegion* pRender );
01906     Node* SimpleCopy();                         // Copies a node
01907     virtual UINT32 GetAttrNameID(void); 
01908     void GetDebugDetails(StringBase* Str);
01909     virtual UINT32 GetNodeSize() const;             // Returns size of node in bytes
01910 
01911     virtual void RenderFillMesh(RenderRegion*, DocCoord* , BOOL*, INT32 NumControlPoints = 0);
01912     virtual void RenderFillBlobs(RenderRegion* pRender);
01913     virtual BOOL IsVisible() { return IsColourMeshVisible(); }
01914 
01915     virtual CCRuntimeClass* GetAttributeType() { return CC_RUNTIME_CLASS(AttrFillGeometry); }
01916     virtual AttributeValue* GetAttributeValue() { return &Value; }
01917 
01918     virtual BOOL ChangeControlColour(AttrColourChange* NewCol);
01919     virtual BOOL ChangeControlColour(DocColour& Col, FillControl Cntrl, AttrColourDrop * pColDrop = NULL );
01920 
01921     AttrFillGeometry* ChangeAttrValue(AttrValueChange* pValue) { return ChangeColour(pValue); }
01922 
01923     virtual BOOL IsAColourFill() const { return TRUE; }
01924     virtual BOOL IsABitmapFill() const { return TRUE; }
01925     virtual BOOL IsABitmapColourFill() const { return TRUE; }
01926 
01927     // Version 2 file format functions
01928     virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
01929     virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
01930     virtual BOOL WriteColourDefinitions (BaseCamelotFilter* pFilter);
01931 
01932 protected:
01933     virtual void RenderControl(FillControl, BOOL);  
01934 
01935 // Karim 13/09/2000
01936 // Virtual override of NodeRenderable::IsSeeThrough() - see base declaration for details.
01937 public:
01938     virtual BOOL IsSeeThrough(BOOL CheckIndirectAttrs) {
01939         KernelBitmap* pBmp = GetBitmap();
01940         return (pBmp == NULL || pBmp->GetBPP() != 24);
01941     }
01942 
01943 protected:
01944     BitmapFillAttribute Value;
01945 };
01946 
01947 /***********************************************************************************************
01948 
01949 >   class AttrBitmapTranspFill : public AttrBitmapFill
01950 
01951     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
01952     Created:    22/8/94
01953     Purpose:    Bitmap Graduated Colour Fill Attribute class.
01954     SeeAlso:    BitmapFillAttribute
01955 
01956 ***********************************************************************************************/
01957 
01958 class AttrBitmapTranspFill : public AttrBitmapFill
01959 {
01960     CC_DECLARE_DYNCREATE(AttrBitmapTranspFill)
01961     
01962 public:
01963     AttrBitmapTranspFill() : AttrBitmapFill() {}
01964     AttrBitmapTranspFill(Node* ContextNode,  
01965                  AttachNodeDirection Direction,    
01966                  BOOL Locked=FALSE, 
01967                  BOOL Mangled=FALSE,  
01968                  BOOL Marked=FALSE, 
01969                  BOOL Selected=FALSE): 
01970         AttrBitmapFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
01971 
01972     void Render( RenderRegion* pRender );
01973     Node* SimpleCopy();                         // Copies a node
01974     virtual UINT32 GetAttrNameID(void); 
01975     void GetDebugDetails(StringBase* Str);
01976     virtual UINT32 GetNodeSize() const;             // Returns size of node in bytes
01977 
01978     virtual void RenderFillMesh(RenderRegion*, DocCoord* , BOOL*, INT32 NumControlPoints = 0);
01979     virtual void RenderFillBlobs(RenderRegion* pRender);
01980     virtual BOOL IsVisible() { return IsTranspMeshVisible(); }
01981     virtual BOOL NeedsTransparency() const;
01982     
01983     virtual CCRuntimeClass* GetAttributeType() { return CC_RUNTIME_CLASS(AttrTranspFillGeometry); }
01984     virtual AttributeValue* GetAttributeValue() { return &Value; }
01985 
01986     virtual BOOL ChangeControlTransp(AttrTranspChange* NewTransp) 
01987             { return AttrFillGeometry::ChangeControlTransp(NewTransp); }
01988 
01989     AttrFillGeometry* ChangeAttrValue(AttrValueChange* pValue) { return ChangeTransp(pValue); }
01990 
01991     virtual BOOL IsATranspFill() const { return TRUE; } 
01992     virtual BOOL IsABitmapTranspFill() const { return TRUE; }
01993     virtual BOOL HasEquivalentDefaultValue(BOOL bAppearance = FALSE);
01994 
01995     // Version 2 file format functions
01996     virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
01997     virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
01998 
01999 protected:
02000     virtual void RenderControl(FillControl, BOOL);  
02001 
02002 // Karim 13/09/2000
02003 // Virtual override of NodeRenderable::IsSeeThrough() - see base declaration for details.
02004 public:
02005     virtual BOOL IsSeeThrough(BOOL CheckIndirectAttrs) {
02006         return (GetTesselation() == RT_Simple ||
02007                 (GetStartTransp() != NULL   &&  *GetStartTransp() != 0) ||
02008                 (GetEndTransp() != NULL     &&  *GetEndTransp() != 0));
02009     }
02010 
02011 protected:
02012     BitmapTranspFillAttribute Value;
02013 };
02014 
02015 
02016 
02017 /***********************************************************************************************
02018 
02019 >   class AttrFractalFill : public AttrBitmapFill
02020 
02021     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
02022     Created:    8/8/94
02023     Purpose:    Fractal Fill Attribute class.
02024     SeeAlso:    FractalFillAttribute
02025 
02026 ***********************************************************************************************/
02027 
02028 class AttrFractalFill : public AttrBitmapFill
02029 {
02030     CC_DECLARE_DYNCREATE(AttrFractalFill)
02031     
02032     public:
02033         AttrFractalFill() : AttrBitmapFill() {}
02034         AttrFractalFill(Node* ContextNode,  
02035                      AttachNodeDirection Direction,    
02036                      BOOL Locked=FALSE, 
02037                      BOOL Mangled=FALSE,  
02038                      BOOL Marked=FALSE, 
02039                      BOOL Selected=FALSE): 
02040             AttrBitmapFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
02041 
02042         virtual void Transform( TransformBase& );
02043         virtual BOOL CanTransform();
02044 
02045         virtual BOOL HidingNode();
02046         virtual BOOL ShowingNode();
02047 
02048         virtual BOOL IsAFractalFill() const { return TRUE; } 
02049 
02050         virtual void SetAspectRatio(double Ratio);
02051 
02052         // This routine returns any secondary attribute that needs to be changed,
02053         // when this attribute is changed.
02054         virtual NodeAttribute* GetOtherAttrToApply(BOOL* IsMutate);
02055 
02056     protected:
02057         virtual void ValidateAttributeValue();
02058         BOOL CopyNodeContents( AttrFractalFill* NodeCopy );
02059 };
02060 
02061 
02062 
02063 /***********************************************************************************************
02064 
02065 >   class AttrTextureColourFill : public AttrFractalFill
02066 
02067     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com> (Mike)
02068     Created:    22/8/94
02069     Purpose:    Texture fill attribute class. Acts as a base class for common code used
02070                 by texture fills such as FractalColourFill and NoiseColourFill
02071                 DO NOT INSTATIATE AN OBJECT OF THIS TYPE!
02072     SeeAlso:    AttrFractalFill
02073 
02074 ***********************************************************************************************/
02075 
02076 class AttrTextureColourFill : public AttrFractalFill
02077 {
02078     CC_DECLARE_DYNCREATE(AttrTextureColourFill)
02079 
02080     public:
02081         AttrTextureColourFill();
02082         AttrTextureColourFill(Node* ContextNode,  
02083                      AttachNodeDirection Direction,    
02084                      BOOL Locked=FALSE, 
02085                      BOOL Mangled=FALSE,  
02086                      BOOL Marked=FALSE, 
02087                      BOOL Selected=FALSE): 
02088             AttrFractalFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
02089 
02090         ~AttrTextureColourFill();
02091 
02092         virtual void Render( RenderRegion* pRender );
02093         
02094         virtual Node* SimpleCopy();                         // Copies a node
02095         
02096         virtual void  GetDebugDetails(StringBase* Str);
02097         virtual UINT32  GetAttrNameID(void); 
02098 
02099         virtual void RenderFillMesh(RenderRegion*, DocCoord* , BOOL*, INT32 NumControlPoints = 0);
02100         virtual void RenderFillBlobs(RenderRegion* pRender);
02101 
02102         virtual void OnControlDrag( DocCoord, FillControl&, ClickModifiers );
02103         virtual FillControl CheckForControlHit(DocCoord &); 
02104 
02105         virtual BOOL IsVisible() { return IsColourMeshVisible(); }
02106 
02107         virtual CCRuntimeClass* GetAttributeType() { return CC_RUNTIME_CLASS(AttrFillGeometry); }
02108 
02109         virtual BOOL ChangeControlColour(AttrColourChange* NewCol) 
02110                 { return AttrFillGeometry::ChangeControlColour(NewCol); }
02111 
02112         AttrFillGeometry* ChangeAttrValue(AttrValueChange* pValue) { return ChangeColour(pValue); }
02113 
02114         virtual BOOL IsAColourFill() const { return TRUE; }
02115         virtual AttributeValue* GetAttributeValue() { return NULL; }
02116 
02117     protected:
02118         virtual void RenderControl(FillControl, BOOL);  
02119 
02120     // Karim 13/09/2000
02121     // Virtual override of NodeRenderable::IsSeeThrough() - see base declaration for details.
02122     public:
02123         virtual BOOL IsSeeThrough(BOOL CheckIndirectAttrs)
02124         {
02125             return (GetStartColour() != NULL    &&  GetStartColour()->IsTransparent() &&
02126                     GetEndColour() != NULL      &&  GetEndColour()->IsTransparent());
02127 
02128         return false;
02129         }
02130 };
02131 
02132 
02133 
02134 
02135 
02136 /***********************************************************************************************
02137 
02138 >   class AttrFractalColourFill : public AttrFractalFill
02139 
02140     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
02141     Created:    22/8/94
02142     Purpose:    Fractal Colour Fill Attribute class.
02143     SeeAlso:    AttrFractalFill
02144 
02145 ***********************************************************************************************/
02146 
02147 class AttrFractalColourFill : public AttrTextureColourFill
02148 {
02149     CC_DECLARE_DYNCREATE(AttrFractalColourFill)
02150 
02151     public:
02152         AttrFractalColourFill();
02153         AttrFractalColourFill(
02154                      Node* ContextNode,  
02155                      AttachNodeDirection Direction,    
02156                      BOOL Locked=FALSE, 
02157                      BOOL Mangled=FALSE,  
02158                      BOOL Marked=FALSE, 
02159                      BOOL Selected=FALSE): 
02160             AttrTextureColourFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
02161 
02162         ~AttrFractalColourFill();
02163 
02164         virtual Node* SimpleCopy();                         // Copies a node
02165         virtual UINT32 GetAttrNameID (void);
02166         virtual void  GetDebugDetails(StringBase* Str);
02167         virtual UINT32 GetNodeSize() const;                     // Returns size of node in bytes
02168         virtual AttributeValue* GetAttributeValue() { return &Value; }
02169         
02170         // Version 2 file format functions
02171         virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
02172         virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
02173         virtual BOOL WriteColourDefinitions (BaseCamelotFilter* pFilter);
02174 
02175     protected:
02176         FractalFillAttribute Value;
02177 };
02178 
02179 
02180 
02181 
02182 
02183 /***********************************************************************************************
02184 
02185 >   class AttrNoiseColourFill : public AttrTextureColourFill
02186 
02187     Author:     Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
02188     Created:    16/01/97
02189     Purpose:    Noisy colour Fill Attribute class.
02190     SeeAlso:    AttrTextureFractalFill
02191 
02192 ***********************************************************************************************/
02193 
02194 class AttrNoiseColourFill : public AttrTextureColourFill
02195 {
02196     CC_DECLARE_DYNCREATE(AttrNoiseColourFill)
02197     
02198     public:
02199         AttrNoiseColourFill();
02200         AttrNoiseColourFill(Node* ContextNode,  
02201                      AttachNodeDirection Direction,    
02202                      BOOL Locked=FALSE, 
02203                      BOOL Mangled=FALSE,  
02204                      BOOL Marked=FALSE, 
02205                      BOOL Selected=FALSE): 
02206             AttrTextureColourFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
02207 
02208         ~AttrNoiseColourFill();
02209 
02210         virtual Node* SimpleCopy();                         // Copies a node
02211         virtual UINT32 GetAttrNameID (void);
02212         virtual void  GetDebugDetails(StringBase* Str);
02213         virtual UINT32 GetNodeSize() const;             // Returns size of node in bytes
02214         virtual AttributeValue* GetAttributeValue() { return &Value; }
02215 
02216         // Version 2 file format functions
02217         virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
02218         virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
02219         virtual BOOL WriteColourDefinitions (BaseCamelotFilter* pFilter);
02220 
02221     protected:
02222         NoiseFillAttribute Value;
02223 };
02224 
02225 
02226 
02227 
02228 
02229 
02230 /***********************************************************************************************
02231 
02232 >   class AttrFractalColourFill : public AttrFractalFill
02233 
02234     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
02235     Created:    22/8/94
02236     Purpose:    Fractal Colour Fill Attribute class.
02237     SeeAlso:    AttrFractalFill
02238 
02239 ***********************************************************************************************/
02240 /*
02241 class AttrFractalColourFill : public AttrFractalFill
02242 {
02243     CC_DECLARE_DYNCREATE(AttrFractalColourFill)
02244     
02245 public:
02246     AttrFractalColourFill();
02247     AttrFractalColourFill(Node* ContextNode,  
02248                  AttachNodeDirection Direction,    
02249                  BOOL Locked=FALSE, 
02250                  BOOL Mangled=FALSE,  
02251                  BOOL Marked=FALSE, 
02252                  BOOL Selected=FALSE): 
02253         AttrFractalFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
02254 
02255     ~AttrFractalColourFill();
02256 
02257     void Render( RenderRegion* pRender );
02258     Node* SimpleCopy();                         // Copies a node
02259     virtual UINT32 GetAttrNameID(void); 
02260     void GetDebugDetails(StringBase* Str);
02261     virtual UINT32 GetNodeSize() const;             // Returns size of node in bytes
02262 
02263     virtual void RenderFillMesh(RenderRegion*, DocCoord* , BOOL*, INT32 NumControlPoints = 0);
02264     virtual void OnControlDrag( DocCoord, FillControl, ClickModifiers );
02265     virtual FillControl CheckForControlHit(DocCoord &); 
02266 
02267     virtual void RenderFillBlobs(RenderRegion* pRender);
02268     virtual BOOL IsVisible() { return IsColourMeshVisible(); }
02269 
02270     virtual CCRuntimeClass* GetAttributeType() { return CC_RUNTIME_CLASS(AttrFillGeometry); }
02271     virtual AttributeValue* GetAttributeValue() { return &Value; }
02272 
02273     virtual BOOL ChangeControlColour(AttrColourChange* NewCol) 
02274             { return AttrFillGeometry::ChangeControlColour(NewCol); }
02275 
02276     AttrFillGeometry* ChangeAttrValue(AttrValueChange* pValue) { return ChangeColour(pValue); }
02277 
02278     virtual BOOL IsAColourFill() const { return TRUE; }
02279 
02280     // Version 2 file format functions
02281     virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
02282     virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
02283 
02284 protected:
02285     virtual void RenderControl(FillControl, BOOL);  
02286 
02287 protected:
02288     FractalFillAttribute Value;
02289 };
02290 */
02291 
02292 /***********************************************************************************************
02293 
02294 >   class AttrTextureTranspFill : public AttrFractalFill
02295 
02296     Author:     Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
02297     Created:    20/01/97
02298     Purpose:    Transparency base class for textures
02299     SeeAlso:    AttrFractalFill
02300 
02301 ***********************************************************************************************/
02302 
02303 class AttrTextureTranspFill : public AttrFractalFill
02304 {
02305     CC_DECLARE_DYNCREATE(AttrTextureTranspFill)
02306     
02307 public:
02308     AttrTextureTranspFill();
02309     AttrTextureTranspFill(Node* ContextNode,  
02310                  AttachNodeDirection Direction,    
02311                  BOOL Locked=FALSE, 
02312                  BOOL Mangled=FALSE,  
02313                  BOOL Marked=FALSE, 
02314                  BOOL Selected=FALSE): 
02315         AttrFractalFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
02316 
02317     ~AttrTextureTranspFill();
02318 
02319     virtual void Render( RenderRegion* pRender );
02320     virtual Node* SimpleCopy();                         // Copies a node
02321     virtual void GetDebugDetails(StringBase* Str);
02322     virtual UINT32 GetAttrNameID(void); 
02323 
02324     virtual void RenderFillMesh(RenderRegion*, DocCoord* , BOOL*, INT32 NumControlPoints = 0);
02325     virtual void OnControlDrag( DocCoord, FillControl&, ClickModifiers );
02326     virtual FillControl CheckForControlHit(DocCoord &); 
02327 
02328     virtual void RenderFillBlobs(RenderRegion* pRender);
02329     virtual BOOL IsVisible() { return IsTranspMeshVisible(); }
02330     virtual BOOL NeedsTransparency() const;
02331 
02332     virtual CCRuntimeClass* GetAttributeType() { return CC_RUNTIME_CLASS(AttrTranspFillGeometry); }
02333     virtual AttributeValue* GetAttributeValue() { return NULL; }
02334 
02335     virtual BOOL ChangeControlTransp(AttrTranspChange* NewTransp) 
02336             { return AttrFillGeometry::ChangeControlTransp(NewTransp); }
02337 
02338     AttrFillGeometry* ChangeAttrValue(AttrValueChange* pValue) { return ChangeTransp(pValue); }
02339 
02340     virtual BOOL IsATranspFill() const { return TRUE; } 
02341 
02342 protected:
02343     virtual void RenderControl(FillControl, BOOL);  
02344 
02345 // Karim 13/09/2000
02346 // Virtual override of NodeRenderable::IsSeeThrough() - see base declaration for details.
02347 public:
02348     virtual BOOL IsSeeThrough(BOOL CheckIndirectAttrs) {
02349         return ((GetStartTransp() != NULL   &&  *GetStartTransp() != 0) ||
02350                 (GetEndTransp() != NULL     &&  *GetEndTransp() != 0));
02351     }
02352 };
02353 
02354 
02355 
02356 
02357 /***********************************************************************************************
02358 
02359 >   class AttrFractalTranspFill : public AttrTextureTranspFill
02360 
02361     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
02362     Created:    22/8/94
02363     Purpose:    Fractal Transparency Fill Attribute class.
02364     SeeAlso:    AttrTextureTranspFill
02365 
02366 ***********************************************************************************************/
02367 
02368 class AttrFractalTranspFill : public AttrTextureTranspFill
02369 {
02370     CC_DECLARE_DYNCREATE(AttrFractalTranspFill)
02371 
02372     public:
02373         AttrFractalTranspFill();
02374         AttrFractalTranspFill(
02375                      Node* ContextNode,  
02376                      AttachNodeDirection Direction,    
02377                      BOOL Locked=FALSE, 
02378                      BOOL Mangled=FALSE,  
02379                      BOOL Marked=FALSE, 
02380                      BOOL Selected=FALSE): 
02381             AttrTextureTranspFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
02382 
02383         ~AttrFractalTranspFill();
02384 
02385         virtual Node* SimpleCopy();                         // Copies a node
02386         virtual UINT32 GetAttrNameID (void);
02387         virtual UINT32 GetNodeSize() const;                     // Returns size of node in bytes
02388         virtual AttributeValue* GetAttributeValue() { return &Value; }
02389         virtual BOOL HasEquivalentDefaultValue(BOOL bAppearance = FALSE);
02390         
02391         // Version 2 file format functions
02392         virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
02393         virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
02394 
02395     protected:
02396         FractalTranspFillAttribute Value;
02397 };
02398 
02399 
02400 
02401 
02402 
02403 /***********************************************************************************************
02404 
02405 >   class AttrNoiseTranspFill : public AttrTextureTranspFill
02406 
02407     Author:     Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
02408     Created:    16/01/97
02409     Purpose:    Noisy transparent Fill Attribute class.
02410     SeeAlso:    AttrTextureTranspFill
02411 
02412 ***********************************************************************************************/
02413 
02414 class AttrNoiseTranspFill : public AttrTextureTranspFill
02415 {
02416     CC_DECLARE_DYNCREATE(AttrNoiseTranspFill)
02417     
02418     public:
02419         AttrNoiseTranspFill();
02420         AttrNoiseTranspFill(Node* ContextNode,  
02421                      AttachNodeDirection Direction,    
02422                      BOOL Locked=FALSE, 
02423                      BOOL Mangled=FALSE,  
02424                      BOOL Marked=FALSE, 
02425                      BOOL Selected=FALSE): 
02426             AttrTextureTranspFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
02427 
02428         ~AttrNoiseTranspFill();
02429 
02430         virtual Node* SimpleCopy();                         // Copies a node
02431         virtual UINT32 GetAttrNameID (void);
02432         virtual UINT32 GetNodeSize() const;                     // Returns size of node in bytes
02433         virtual AttributeValue* GetAttributeValue() { return &Value; }
02434         virtual BOOL HasEquivalentDefaultValue(BOOL bAppearance = FALSE);
02435 
02436         // Version 2 file format functions
02437         virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
02438         virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
02439 
02440     protected:
02441         NoiseTranspFillAttribute Value;
02442 };
02443 
02444 
02445 
02446 
02447 
02448 
02449 
02450 /***********************************************************************************************
02451 
02452 >   class AttrFractalTranspFill : public AttrFractalFill
02453 
02454     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
02455     Created:    22/8/94
02456     Purpose:    Fractal Transparency Fill Attribute class.
02457     SeeAlso:    AttrFractalFill
02458 
02459 ***********************************************************************************************/
02460 /*
02461 class AttrFractalTranspFill : public AttrFractalFill
02462 {
02463     CC_DECLARE_DYNCREATE(AttrFractalTranspFill)
02464     
02465 public:
02466     AttrFractalTranspFill();
02467     AttrFractalTranspFill(Node* ContextNode,  
02468                  AttachNodeDirection Direction,    
02469                  BOOL Locked=FALSE, 
02470                  BOOL Mangled=FALSE,  
02471                  BOOL Marked=FALSE, 
02472                  BOOL Selected=FALSE): 
02473         AttrFractalFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
02474 
02475     ~AttrFractalTranspFill();
02476 
02477     void Render( RenderRegion* pRender );
02478     Node* SimpleCopy();                         // Copies a node
02479     virtual UINT32 GetAttrNameID(void); 
02480     void GetDebugDetails(StringBase* Str);
02481     virtual UINT32 GetNodeSize() const;             // Returns size of node in bytes
02482 
02483     virtual void RenderFillMesh(RenderRegion*, DocCoord* , BOOL*, INT32 NumControlPoints = 0);
02484     virtual void OnControlDrag( DocCoord, FillControl, ClickModifiers );
02485     virtual FillControl CheckForControlHit(DocCoord &); 
02486 
02487     virtual void RenderFillBlobs(RenderRegion* pRender);
02488     virtual BOOL IsVisible() { return IsTranspMeshVisible(); }
02489     virtual BOOL NeedsTransparency() const;
02490 
02491     virtual CCRuntimeClass* GetAttributeType() { return CC_RUNTIME_CLASS(AttrTranspFillGeometry); }
02492     virtual AttributeValue* GetAttributeValue() { return &Value; }
02493 
02494     virtual BOOL ChangeControlTransp(AttrTranspChange* NewTransp) 
02495             { return AttrFillGeometry::ChangeControlTransp(NewTransp); }
02496 
02497     AttrFillGeometry* ChangeAttrValue(AttrValueChange* pValue) { return ChangeTransp(pValue); }
02498 
02499     virtual BOOL IsATranspFill() const { return TRUE; } 
02500 
02501     // Version 2 file format functions
02502     virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
02503     virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
02504 
02505 protected:
02506     virtual void RenderControl(FillControl, BOOL);  
02507 
02508 protected:
02509     FractalTranspFillAttribute Value;
02510 };
02511 */
02512 
02513 
02514 /***********************************************************************************************
02515 
02516 >   class AttrFillMapping : public NodeAttribute
02517 
02518     Author:     Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
02519     Created:    18/07/94
02520     Purpose:    Fill mapping Attribute class.
02521     SeeAlso:    FillMappingAttribute
02522 
02523 ***********************************************************************************************/
02524 
02525 class AttrFillMapping : public NodeAttribute
02526 {
02527     CC_DECLARE_DYNCREATE(AttrFillMapping)
02528     
02529 public:
02530     AttrFillMapping() {}
02531     AttrFillMapping(Node* ContextNode,  
02532                  AttachNodeDirection Direction,    
02533                  BOOL Locked=FALSE, 
02534                  BOOL Mangled=FALSE,  
02535                  BOOL Marked=FALSE, 
02536                  BOOL Selected=FALSE): 
02537         NodeAttribute (ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
02538 
02539     virtual INT32 operator==(const NodeAttribute& NodeAttrib);
02540 
02541     virtual CCRuntimeClass* GetAttributeType() { return CC_RUNTIME_CLASS(AttrFillMapping); }
02542 
02543     virtual void SetRepeat(INT32 Rep) { ((FillMappingAttribute*)GetAttributeValue())->Repeat = Rep; }
02544     virtual INT32 GetRepeat() { return ((FillMappingAttribute*)GetAttributeValue())->Repeat; }
02545 
02546 //Mark Howitt, 8/10/97. Include repeat value in debug tree
02547 #ifdef _DEBUG
02548     virtual void GetDebugDetails(StringBase* Str);
02549 #endif
02550 
02551     
02552     // This routine returns any secondary attribute that needs to be changed,
02553     // when this attribute is changed.
02554     virtual NodeAttribute* GetOtherAttrToApply(BOOL* IsMutate);
02555 };
02556 
02557 /***********************************************************************************************
02558 
02559 >   class AttrFillMappingLinear : public AttrFillMapping
02560 
02561     Author:     Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
02562     Created:    18/07/94
02563     Purpose:    Linear fill mapping Attribute class.
02564     SeeAlso:    FillMappingLinearAttribute
02565 
02566 ***********************************************************************************************/
02567 
02568 class AttrFillMappingLinear : public AttrFillMapping
02569 {
02570     CC_DECLARE_DYNCREATE(AttrFillMappingLinear)
02571     
02572 public:
02573     AttrFillMappingLinear() : AttrFillMapping() {}
02574     AttrFillMappingLinear(Node* ContextNode,  
02575                  AttachNodeDirection Direction,    
02576                  BOOL Locked=FALSE, 
02577                  BOOL Mangled=FALSE,  
02578                  BOOL Marked=FALSE, 
02579                  BOOL Selected=FALSE): 
02580         AttrFillMapping(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
02581 
02582     void Render( RenderRegion* pRender );
02583     Node* SimpleCopy();                         // Copies a node
02584     virtual UINT32 GetAttrNameID(void); 
02585 
02586     virtual UINT32 GetNodeSize() const;             // Returns size of node in bytes
02587 
02588     virtual AttributeValue* GetAttributeValue() { return &Value; }
02589 
02590     // Version 2 file format functions
02591     virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
02592     virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
02593     virtual void PolyCopyNodeContents(NodeRenderable* pNodeCopy);
02594 
02595 private:
02596     BOOL CopyNodeContents( AttrFillMappingLinear* NodeCopy );
02597 
02598 public:
02599     FillMappingLinearAttribute Value;
02600 };
02601 
02602 
02603 /***********************************************************************************************
02604 
02605 >   class AttrFillMappingSin : public AttrFillMapping
02606 
02607     Author:     Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
02608     Created:    18/07/94
02609     Purpose:    Sinusoidal fill mapping class Attribute class.
02610     SeeAlso:    FillMappingSinAttribute
02611 
02612 ***********************************************************************************************/
02613 
02614 class AttrFillMappingSin : public AttrFillMapping
02615 {
02616     CC_DECLARE_DYNCREATE(AttrFillMappingSin)
02617     
02618 public:
02619     AttrFillMappingSin() : AttrFillMapping() {}
02620     AttrFillMappingSin(Node* ContextNode,  
02621                  AttachNodeDirection Direction,    
02622                  BOOL Locked=FALSE, 
02623                  BOOL Mangled=FALSE,  
02624                  BOOL Marked=FALSE, 
02625                  BOOL Selected=FALSE): 
02626         AttrFillMapping(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
02627 
02628     void Render( RenderRegion* pRender );
02629     Node* SimpleCopy();                         // Copies a node
02630     virtual UINT32 GetAttrNameID(void); 
02631 
02632     virtual UINT32 GetNodeSize() const;             // Returns size of node in bytes
02633 
02634     virtual AttributeValue* GetAttributeValue() { return &Value; }
02635 
02636     // Version 2 file format functions
02637     virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
02638     virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
02639     virtual void PolyCopyNodeContents(NodeRenderable* pNodeCopy);
02640 
02641 private:
02642     BOOL CopyNodeContents( AttrFillMappingSin* NodeCopy );
02643 
02644 public:
02645     FillMappingSinAttribute Value;
02646 };
02647 
02648 
02649 /***********************************************************************************************
02650 
02651 >   class AttrFillEffect : public NodeAttribute
02652 
02653     Author:     Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
02654     Created:    18/07/94
02655     Purpose:    Fill effect Attribute class.
02656     SeeAlso:    FillEffectAttribute
02657 
02658 ***********************************************************************************************/
02659 
02660 class AttrFillEffect : public NodeAttribute
02661 {
02662     CC_DECLARE_DYNCREATE(AttrFillEffect)
02663     
02664 public:
02665     AttrFillEffect() {}
02666     AttrFillEffect(Node* ContextNode,  
02667                  AttachNodeDirection Direction,    
02668                  BOOL Locked=FALSE, 
02669                  BOOL Mangled=FALSE,  
02670                  BOOL Marked=FALSE, 
02671                  BOOL Selected=FALSE): 
02672         NodeAttribute (ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
02673 
02674     virtual INT32 operator==(const NodeAttribute& NodeAttrib);
02675 
02676     virtual CCRuntimeClass* GetAttributeType() { return CC_RUNTIME_CLASS(AttrFillEffect); }
02677 };
02678 
02679 /***********************************************************************************************
02680 
02681 >   class AttrFillEffectFade : public AttrFillEffect
02682 
02683     Author:     Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
02684     Created:    18/07/94
02685     Purpose:    RGB Fade fill effect Attribute class.
02686     SeeAlso:    FillEffectFadeAttribute
02687 
02688 ***********************************************************************************************/
02689 
02690 class AttrFillEffectFade : public AttrFillEffect
02691 {
02692     CC_DECLARE_DYNCREATE(AttrFillEffectFade)
02693     
02694 public:
02695     AttrFillEffectFade() {}
02696     AttrFillEffectFade(Node* ContextNode,  
02697                  AttachNodeDirection Direction,    
02698                  BOOL Locked=FALSE, 
02699                  BOOL Mangled=FALSE,  
02700                  BOOL Marked=FALSE, 
02701                  BOOL Selected=FALSE): 
02702         AttrFillEffect(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
02703 
02704     void Render( RenderRegion* pRender );
02705     Node* SimpleCopy();                         // Copies a node
02706     virtual UINT32 GetAttrNameID(void); 
02707 
02708     virtual UINT32 GetNodeSize() const;             // Returns size of node in bytes
02709 
02710     virtual AttributeValue* GetAttributeValue() { return &Value; }
02711 
02712     // Version 2 file format functions
02713     virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
02714     virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
02715     virtual void PolyCopyNodeContents(NodeRenderable* pNodeCopy);
02716 
02717 private:
02718     BOOL CopyNodeContents( AttrFillEffectFade* NodeCopy );
02719 
02720 public:
02721     FillEffectFadeAttribute Value;
02722 };
02723 
02724 /***********************************************************************************************
02725 
02726 >   class AttrFillEffectRainbow : public AttrFillEffect
02727 
02728     Author:     Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
02729     Created:    18/07/94
02730     Purpose:    Rainbow (HSV) fill effect Attribute class.
02731     SeeAlso:    FillEffectRainbowAttribute
02732 
02733 ***********************************************************************************************/
02734 
02735 class AttrFillEffectRainbow : public AttrFillEffect
02736 {
02737     CC_DECLARE_DYNCREATE(AttrFillEffectRainbow)
02738     
02739 public:
02740     AttrFillEffectRainbow() {}
02741     AttrFillEffectRainbow(Node* ContextNode,  
02742                  AttachNodeDirection Direction,    
02743                  BOOL Locked=FALSE, 
02744                  BOOL Mangled=FALSE,  
02745                  BOOL Marked=FALSE, 
02746                  BOOL Selected=FALSE): 
02747         AttrFillEffect(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
02748 
02749     void Render( RenderRegion* pRender );
02750     Node* SimpleCopy();                         // Copies a node
02751     virtual UINT32 GetAttrNameID(void); 
02752     virtual UINT32 GetNodeSize() const;             // Returns size of node in bytes
02753 
02754     virtual AttributeValue* GetAttributeValue() { return &Value; }
02755 
02756     // Version 2 file format functions
02757     virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
02758     virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
02759     virtual void PolyCopyNodeContents(NodeRenderable* pNodeCopy);
02760 
02761 private:
02762     BOOL CopyNodeContents( AttrFillEffectRainbow* NodeCopy );
02763 
02764 public:
02765     FillEffectRainbowAttribute Value;
02766 };
02767 
02768 /***********************************************************************************************
02769 
02770 >   class AttrFillEffectAltRainbow : public AttrFillEffect
02771 
02772     Author:     Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
02773     Created:    18/07/94
02774     Purpose:    Alternate Rainbow (HSV) fill effect Attribute class.
02775     SeeAlso:    FillEffectAltRainbowAttribute
02776 
02777 ***********************************************************************************************/
02778 
02779 class AttrFillEffectAltRainbow : public AttrFillEffect
02780 {
02781     CC_DECLARE_DYNCREATE(AttrFillEffectAltRainbow)
02782     
02783 public:
02784     AttrFillEffectAltRainbow() {}
02785     AttrFillEffectAltRainbow(Node* ContextNode,  
02786                  AttachNodeDirection Direction,    
02787                  BOOL Locked=FALSE, 
02788                  BOOL Mangled=FALSE,  
02789                  BOOL Marked=FALSE, 
02790                  BOOL Selected=FALSE): 
02791         AttrFillEffect(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
02792 
02793     void Render( RenderRegion* pRender );
02794     Node* SimpleCopy();                         // Copies a node
02795     virtual UINT32 GetAttrNameID(void); 
02796     virtual UINT32 GetNodeSize() const;             // Returns size of node in bytes
02797 
02798     virtual AttributeValue* GetAttributeValue() { return &Value; }
02799     virtual void PolyCopyNodeContents(NodeRenderable* pNodeCopy);
02800 
02801     // Version 2 file format functions
02802     virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
02803     virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
02804 
02805 private:
02806     BOOL CopyNodeContents( AttrFillEffectAltRainbow* NodeCopy );
02807 
02808 public:
02809     FillEffectAltRainbowAttribute Value;
02810 };
02811 
02812 
02813 /***********************************************************************************************
02814 
02815 >   class AttrTranspFillMapping : public NodeAttribute
02816 
02817     Author:     Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
02818     Created:    18/07/94
02819     Purpose:    Fill mapping Attribute class.
02820     SeeAlso:    FillMappingAttribute
02821 
02822 ***********************************************************************************************/
02823 
02824 class AttrTranspFillMapping : public NodeAttribute
02825 {
02826     CC_DECLARE_DYNCREATE(AttrTranspFillMapping)
02827     
02828 public:
02829     AttrTranspFillMapping() {}
02830     AttrTranspFillMapping(Node* ContextNode,  
02831                  AttachNodeDirection Direction,    
02832                  BOOL Locked=FALSE, 
02833                  BOOL Mangled=FALSE,  
02834                  BOOL Marked=FALSE, 
02835                  BOOL Selected=FALSE): 
02836         NodeAttribute (ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
02837 
02838     virtual INT32 operator==(const NodeAttribute& NodeAttrib);
02839 
02840     virtual CCRuntimeClass* GetAttributeType() { return CC_RUNTIME_CLASS(AttrTranspFillMapping); }
02841 
02842     virtual void SetRepeat(INT32 Rep) { ((TranspFillMappingAttribute*)GetAttributeValue())->Repeat = Rep; }
02843     virtual INT32 GetRepeat() { return ((TranspFillMappingAttribute*)GetAttributeValue())->Repeat; }
02844 
02845     // This routine returns any secondary attribute that needs to be changed,
02846     // when this attribute is changed.
02847     virtual NodeAttribute* GetOtherAttrToApply(BOOL* IsMutate);
02848 };
02849 
02850 /***********************************************************************************************
02851 
02852 >   class AttrTranspFillMappingLinear : public AttrTranspFillMapping
02853 
02854     Author:     Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
02855     Created:    18/07/94
02856     Purpose:    Linear fill mapping Attribute class.
02857     SeeAlso:    TranspFillMappingLinearAttribute
02858 
02859 ***********************************************************************************************/
02860 
02861 class AttrTranspFillMappingLinear : public AttrTranspFillMapping
02862 {
02863     CC_DECLARE_DYNCREATE(AttrTranspFillMappingLinear)
02864     
02865 public:
02866     AttrTranspFillMappingLinear() : AttrTranspFillMapping() {}
02867     AttrTranspFillMappingLinear(Node* ContextNode,  
02868                  AttachNodeDirection Direction,    
02869                  BOOL Locked=FALSE, 
02870                  BOOL Mangled=FALSE,  
02871                  BOOL Marked=FALSE, 
02872                  BOOL Selected=FALSE): 
02873         AttrTranspFillMapping(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
02874 
02875     void Render( RenderRegion* pRender );
02876     Node* SimpleCopy();                         // Copies a node
02877     virtual UINT32 GetAttrNameID(void); 
02878 
02879     virtual UINT32 GetNodeSize() const;             // Returns size of node in bytes
02880 
02881     virtual AttributeValue* GetAttributeValue() { return &Value; }
02882     virtual void PolyCopyNodeContents(NodeRenderable* pNodeCopy);
02883     virtual BOOL HasEquivalentDefaultValue(BOOL bAppearance = FALSE);
02884 
02885     // Version 2 file format functions
02886     virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
02887     virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
02888 
02889 private:
02890     BOOL CopyNodeContents( AttrTranspFillMappingLinear* NodeCopy );
02891 
02892 public:
02893     TranspFillMappingLinearAttribute Value;
02894 };
02895 
02896 
02897 /***********************************************************************************************
02898 
02899 >   class AttrTranspFillMappingSin : public AttrTranspFillMapping
02900 
02901     Author:     Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
02902     Created:    18/07/94
02903     Purpose:    Sinusoidal fill mapping class Attribute class.
02904     SeeAlso:    TranspFillMappingSinAttribute
02905 
02906 ***********************************************************************************************/
02907 
02908 class AttrTranspFillMappingSin : public AttrTranspFillMapping
02909 {
02910     CC_DECLARE_DYNCREATE(AttrTranspFillMappingSin)
02911     
02912 public:
02913     AttrTranspFillMappingSin() : AttrTranspFillMapping() {}
02914     AttrTranspFillMappingSin(Node* ContextNode,  
02915                  AttachNodeDirection Direction,    
02916                  BOOL Locked=FALSE, 
02917                  BOOL Mangled=FALSE,  
02918                  BOOL Marked=FALSE, 
02919                  BOOL Selected=FALSE): 
02920         AttrTranspFillMapping(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
02921 
02922     void Render( RenderRegion* pRender );
02923     Node* SimpleCopy();                         // Copies a node
02924     virtual UINT32 GetAttrNameID(void); 
02925 
02926     virtual UINT32 GetNodeSize() const;             // Returns size of node in bytes
02927 
02928     virtual AttributeValue* GetAttributeValue() { return &Value; }
02929     virtual void PolyCopyNodeContents(NodeRenderable* pNodeCopy);
02930 
02931     // Version 2 file format functions
02932     virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
02933     virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
02934 
02935 private:
02936     BOOL CopyNodeContents( AttrTranspFillMappingSin* NodeCopy );
02937 
02938 public:
02939     TranspFillMappingSinAttribute Value;
02940 };
02941 
02942 
02943 /***********************************************************************************************
02944 
02945 >   class AttrMould : public NodeAttribute
02946 
02947     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
02948     Created:    13/03/95
02949     Purpose:    Mould Attribute class.
02950     SeeAlso:    MouldAttribute
02951 
02952 ***********************************************************************************************/
02953 
02954 class AttrMould : public NodeAttribute
02955 {
02956     CC_DECLARE_DYNCREATE(AttrMould)
02957     
02958 public:
02959     AttrMould() {}
02960     AttrMould(NodeMould* pMould, MouldGeometry* pMouldShape);
02961     AttrMould(Node* ContextNode,  
02962                  AttachNodeDirection Direction,    
02963                  BOOL Locked=FALSE, 
02964                  BOOL Mangled=FALSE,  
02965                  BOOL Marked=FALSE, 
02966                  BOOL Selected=FALSE): 
02967         NodeAttribute (ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
02968 
02969     virtual INT32 operator==(const NodeAttribute& NodeAttrib);
02970 
02971     virtual CCRuntimeClass* GetAttributeType() { return CC_RUNTIME_CLASS(AttrMould); }
02972 
02973     void Render( RenderRegion* pRender );
02974     Node* SimpleCopy();                         // Copies a node
02975     virtual UINT32 GetAttrNameID(void); 
02976     virtual UINT32 GetNodeSize() const;             // Returns size of node in bytes
02977 
02978     MouldGeometry* GetMouldShape()  { return Value.GetMouldShape(); }
02979     void SetMouldShape(MouldGeometry* pMould) { Value.SetMouldShape(pMould); }
02980 
02981     NodeMould* GetParentMould() { return Value.GetParentMould(); }
02982     void SetParentMould(NodeMould* pMould) { Value.SetParentMould(pMould); }
02983 
02984     virtual void PolyCopyNodeContents(NodeRenderable* pNodeCopy);
02985 
02986 private:
02987     BOOL CopyNodeContents( AttrMould* NodeCopy );
02988 
02989 public:
02990     MouldAttribute Value;
02991 };
02992 
02993 
02994 #endif  // INC_FILLATTR2

Generated on Sat Nov 10 03:45:14 2007 for Camelot by  doxygen 1.4.4