fillval.h

Go to the documentation of this file.
00001 // $Id: fillval.h 751 2006-03-31 15:43:49Z 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 classes to do with path
00100 // filling attributes.
00101 
00102 #ifndef INC_FILLVAL
00103 #define INC_FILLVAL
00104 
00105 #include "attrval.h"
00106 #include "nodeattr.h"
00107 #include "bitmap.h"
00108 #include "biasgain.h"
00109 #include "gconsts.h"
00110 
00111 class MouldGeometry;
00112 class NodeMould;
00113 class MouldAttribute;
00114 class PathStrokerVector;
00115 class ColourRamp;
00116 class TransparencyRamp;
00117 
00118 // Fill shapes
00119 #define FILLSHAPE_UNKNOWN -1
00120 #define FILLSHAPE_FLAT 0
00121 #define FILLSHAPE_LINEAR 1
00122 #define FILLSHAPE_CIRCULAR 2
00123 #define FILLSHAPE_ELLIPTICAL 3
00124 #define FILLSHAPE_CONICAL 4
00125 #define FILLSHAPE_DIAMOND 5
00126 #define FILLSHAPE_3POINT 6
00127 #define FILLSHAPE_4POINT 7
00128 #define FILLSHAPE_BITMAP 8
00129 #define FILLSHAPE_CLOUDS 9
00130 #define FILLSHAPE_PLASMA 10
00131 
00132 enum RepeatType
00133 {
00134     RT_NoRepeatType = 0,
00135     RT_Simple,
00136     RT_Repeating,
00137     RT_RepeatInverted
00138 };
00139 
00140 // Solid = 0, Mix = 1, Bleach = 2 and Stainedglass = 3
00141 // Special Additive = 10, Special Subtractive = 11 and Transparency Lookup = 12
00142 // These are the new Transparency types Contrast = 13, Saturation = 16, Darken = 19,
00143 // Lighten = 22, Brightness = 25, Luminosity = 28, Hue = 31, Bevel = 34
00144 enum TranspType
00145 {
00146     TT_NoTranspType = 0,
00147     TT_Mix,
00148     TT_StainGlass,
00149     TT_Bleach,
00150 //  TT_Contrast,
00151 //  TT_Saturation,
00152 //  TT_Darken,
00153 //  TT_Lighten,
00154 //  TT_Brightness,
00155 //  TT_Luminosity,
00156 //  TT_Hue,
00157 //  TT_Bevel,
00158     TT_SPECIAL_1 = T_SPECIAL_1,     // Link following values to TransparencyEnum
00159     TT_SPECIAL_2,
00160     TT_SPECIAL_3,
00161     //              The values below are not legal in Camelot
00162     //              data structures (they come from GDraw)
00163     //              |||||||||||||||||||||||||||||||||||||||
00164     //              vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
00165     TT_CONTRAST,    TT_FLAT_CONTRAST,   TT_GRAD_CONTRAST,
00166     TT_SATURATION,  TT_FLAT_SATURATION, TT_GRAD_SATURATION,
00167     TT_DARKEN,      TT_FLAT_DARKEN,     TT_GRAD_DARKEN,
00168     TT_LIGHTEN,     TT_FLAT_LIGHTEN,    TT_GRAD_LIGHTEN,
00169     TT_BRIGHTNESS,  TT_FLAT_BRIGHTNESS, TT_GRAD_BRIGHTNESS,
00170     TT_LUMINOSITY,  TT_FLAT_LUMINOSITY, TT_GRAD_LUMINOSITY,
00171     TT_HUE,         TT_FLAT_HUE,        TT_GRAD_HUE,
00172     TT_BEVEL,       TT_FLAT_BEVEL,      TT_GRAD_BEVEL,
00173 
00174     // Add new values here and ideally they should be duplicated in TransparencyEnum
00175 
00176     TT_MAX
00177 };
00178  
00179 /********************************************************************************************
00180 
00181 >   class FillGeometryAttribute : public AttributeValue
00182 
00183     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
00184     Created:    18/07/94
00185     Purpose:    The base class for a fill geometry attribute, such as flat, linear,
00186                 radial, conical, etc.
00187                 This provides the basic interface for fill rendering.
00188     SeeAlso:    FlatFillAttribute; LinearFillAttribute; RadialFillAttribute;
00189                 ConicalFillAttribute; BitmapFillAttribute
00190 
00191 ********************************************************************************************/
00192 
00193 class FillGeometryAttribute : public AttributeValue
00194 {
00195     CC_DECLARE_DYNCREATE(FillGeometryAttribute)
00196 
00197 public:
00198     FillGeometryAttribute();
00199 
00200     virtual void Restore(RenderRegion *, BOOL) = 0;
00201     virtual void Render(RenderRegion *, BOOL Temp = FALSE) = 0;
00202     virtual void SimpleCopy(AttributeValue *);
00203     virtual BOOL IsDifferent(AttributeValue*);
00204 
00205     virtual FillGeometryAttribute& operator=(FillGeometryAttribute& Attrib);
00206     virtual INT32 operator==(const FillGeometryAttribute& Attrib);
00207 
00208     // Extra virtual function for fill geometry attributes.
00209     virtual BOOL RenderFill(RenderRegion *, Path *) { return FALSE; }
00210 
00211     virtual BOOL IsAspectLocked() { return FALSE; }
00212     virtual void SetAspectLock(BOOL) {}
00213 
00214     virtual BOOL IsPerspective() { return FALSE; }
00215     virtual void MakePerspective() {}
00216     virtual void RemovePerspective() {}
00217 
00218     virtual DocCoord* GetStartPoint() { return NULL; }
00219     virtual DocCoord* GetEndPoint() { return NULL; }
00220     virtual DocCoord* GetEndPoint2() { return NULL; }
00221     virtual DocCoord* GetEndPoint3() { return NULL; }
00222     virtual void SetStartPoint(DocCoord*) {}
00223     virtual void SetEndPoint(DocCoord*) {}
00224     virtual void SetEndPoint2(DocCoord*) {}
00225     virtual void SetEndPoint3(DocCoord*) {}
00226 
00227     virtual DocColour* GetStartColour() { return NULL; }
00228     virtual DocColour* GetEndColour() { return NULL; }
00229     virtual DocColour* GetEndColour2() { return NULL; }
00230     virtual DocColour* GetEndColour3() { return NULL; }
00231     virtual void SetStartColour(DocColour*) {}
00232     virtual void SetEndColour(DocColour*) {}
00233     virtual void SetEndColour2(DocColour*) {}
00234     virtual void SetEndColour3(DocColour*) {}
00235 
00236     virtual UINT32* GetStartTransp() { return NULL; }
00237     virtual UINT32* GetEndTransp() { return NULL; }
00238     virtual UINT32* GetEndTransp2() { return NULL; }
00239     virtual UINT32* GetEndTransp3() { return NULL; }
00240     virtual void SetStartTransp(UINT32*) {}
00241     virtual void SetEndTransp(UINT32*) {}
00242     virtual void SetEndTransp2(UINT32*) {}
00243     virtual void SetEndTransp3(UINT32*) {}
00244 
00245     virtual UINT32 GetTranspType() { return TT_NoTranspType; }
00246     virtual void SetTranspType(UINT32 NewType) {}
00247 
00248     virtual UINT32 GetDPI() { return 0; }
00249     virtual BOOL SetDPI(UINT32 NewDpi) { return FALSE; }
00250 
00251     virtual UINT32 GetFractalDPI() { return 0; }
00252     virtual BOOL SetFractalDPI(UINT32 NewDpi) { return FALSE; }
00253 
00254     virtual UINT32 GetFractalDim() { return 0; }
00255     virtual void SetFractalDim(UINT32 NewDim) {}
00256 
00257     virtual INT32   GetSeed()   { return 0; }
00258     virtual FIXED16 GetGraininess();
00259     virtual FIXED16 GetGravity();
00260     virtual FIXED16 GetSquash() { return 0; }
00261     virtual BOOL    GetTileable() { return FALSE; }
00262 
00263     virtual BOOL SetSeed(INT32 NewSeed)          { return FALSE; }
00264     virtual BOOL SetGraininess(FIXED16 NewGrain) { return FALSE; }
00265     virtual BOOL SetGravity(FIXED16 NewGrav)     { return FALSE; }
00266     virtual BOOL SetSquash(FIXED16 NewSquash)    { return FALSE; }
00267     virtual BOOL SetTileable(BOOL NewTile)       { return FALSE; }
00268 
00269     virtual double GetNoiseScale()  { return 0; }
00270 
00271     virtual BOOL SetNoiseScale(double)  { return FALSE; }
00272     
00273     virtual BOOL Randomise() { return FALSE; }
00274     virtual BOOL RecalcFractal() { return FALSE; }
00275 
00276     virtual BOOL AttachBitmap(KernelBitmap* pBitmap) { return FALSE; }
00277     virtual BOOL DetachBitmap() { return FALSE; }
00278     virtual KernelBitmap* GetBitmap() { return NULL; }
00279     virtual BOOL CopyBitmap(KernelBitmap* pBitmap) { return FALSE; }
00280 
00281     virtual KernelBitmapRef* GetBitmapRef() { return NULL; }
00282 
00283     virtual INT32 GetTesselation() { return RT_NoRepeatType; }
00284     virtual void SetTesselation(INT32) {}
00285 
00286     virtual BOOL Blend(BlendAttrParam* pBlendParam);
00287     virtual BOOL BlendFillColours(DocColour* Start, DocColour* End, DocColour* Blend,
00288                                   double& Ratio, BlendAttrParam* pBlendParam);
00289     virtual BOOL BlendFillTransp(UINT32* Start, UINT32* End, UINT32* Blend,
00290                                  double& Ratio, BlendAttrParam* pBlendParam);
00291     virtual BOOL BlendControlPoints(DocCoord* Start, DocCoord* End, DocCoord* Blend,
00292                                     double& Ratio, BlendAttrParam* pBlendParam, BOOL swapOrder = FALSE);
00293     virtual BOOL CheckForGreyscaleBitmapBlend(KernelBitmap* pBitmap, 
00294                                               DocColour* StartCol, DocColour* EndCol);
00295 
00296     virtual INT32 Mould(MouldAttribute*, DocCoord*, INT32, DocCoord*);
00297 
00298     virtual BOOL IsAColourFill() { return FALSE; }
00299     virtual BOOL IsATranspFill() { return FALSE; }
00300 
00301     virtual BOOL IsAFlatFill() { return FALSE; }
00302     virtual BOOL IsAGradFill() { return FALSE; }
00303 
00304     virtual BOOL IsALinearFill() { return FALSE; }
00305     virtual BOOL IsARadialFill() { return FALSE; }
00306     virtual BOOL IsAConicalFill() { return FALSE; }
00307     virtual BOOL IsABitmapFill() { return FALSE; }
00308     virtual BOOL IsAKindOfBitmapFill() { return FALSE; }
00309     virtual BOOL IsASquareFill() { return FALSE; }
00310     virtual BOOL IsAThreeColFill() { return FALSE; }
00311     virtual BOOL IsAFourColFill() { return FALSE; }
00312     
00313     virtual BOOL IsATextureFill() { return FALSE; }
00314     virtual BOOL IsAFractalFill() { return FALSE; }
00315     virtual BOOL IsANoiseFill() { return FALSE; }
00316 
00317     virtual void CacheFractalData(FillGeometryAttribute *pCachedFractal);
00318     virtual BOOL IsSameAsCachedFractal(FillGeometryAttribute *pCachedFractal);
00319 
00320     virtual BOOL SupportsFillRamps()    { return FALSE; }
00321     virtual ColourRamp* GetColourRamp() { return NULL; }
00322     virtual TransparencyRamp* GetTranspRamp() { return NULL; }
00323     virtual BOOL SetColourRamp(ColourRamp* pRamp) { return FALSE; }
00324     virtual BOOL SetTranspRamp(TransparencyRamp* pRamp) { return FALSE; }
00325 
00326     virtual DocCoord GetGeometryCoord(float pos) const { return DocCoord(0,0); }
00327     virtual float    GetGeometryParam(const DocCoord& c) const { return 0.0f; }
00328 
00329     virtual INT32 GetGeometryShape() { return(FILLSHAPE_UNKNOWN); }
00330 
00331 public:
00332     // new (test) profile bits
00333     CProfileBiasGain  DiagramMapper;
00334     void SetProfile (CProfileBiasGain& SetWith);
00335     CProfileBiasGain& GetProfile ();
00336     CProfileBiasGain* GetProfilePtr ();
00337 
00338 public:
00339     virtual AttributeValue *MouldIntoStroke(PathStrokerVector *pMoulder, double TransScale = 1.0);
00340             // Mould all geometry points using the given stroke moulder, and scaling 
00341             // transparency (if any) by the given fraction.
00342 
00343 protected:
00344     virtual void TidyMouldPoints(DocCoord*, DocCoord*, BOOL*, INT32);
00345 
00346 protected:
00347     KernelBitmap* GenerateFractalBitmap(INT32, double, double, double, UINT32); 
00348     KernelBitmap* GenerateNoiseBitmap(FIXED16 grain, INT32 seed);
00349 };
00350 
00351 
00352 /********************************************************************************************
00353 
00354 >   class ColourFillAttribute : public FillGeometryAttribute
00355 
00356     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
00357     Created:    5/9/94
00358     Purpose:    The base class for a fill geometry attribute, such as flat, linear,
00359                 radial, conical, etc.
00360                 This provides the basic interface for fill rendering.
00361     SeeAlso:    FlatFillAttribute; LinearFillAttribute; RadialFillAttribute;
00362                 ConicalFillAttribute; BitmapFillAttribute
00363 
00364 ********************************************************************************************/
00365 
00366 class ColourFillAttribute : public FillGeometryAttribute
00367 {
00368     CC_DECLARE_DYNCREATE(ColourFillAttribute)
00369 
00370 public:
00371     ColourFillAttribute();
00372 
00373     static BOOL Init();
00374 
00375     virtual void Restore(RenderRegion *, BOOL);
00376     virtual void Render(RenderRegion *, BOOL Temp = FALSE);
00377 
00378     virtual FillGeometryAttribute& operator=(FillGeometryAttribute& Attrib);
00379     virtual INT32 operator==(const FillGeometryAttribute& Attrib);
00380 
00381     virtual DocColour* GetStartColour() { return &Colour; }
00382     virtual void SetStartColour(DocColour* NewCol);
00383 
00384     virtual BOOL IsAColourFill() { return TRUE; }
00385     virtual BOOL ContainsNamedColour();
00386 
00387 public:
00388     DocColour Colour;
00389 };
00390 
00391 
00392 
00393 /********************************************************************************************
00394 
00395 >   class FlatFillAttribute : public ColourFillAttribute
00396 
00397     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
00398     Created:    18/07/94
00399     Purpose:    Specifies a flat fill attribute for an object, i.e. it is filled with
00400                 one solid colour.
00401     SeeAlso:    FillGeometryAttribute
00402 
00403 ********************************************************************************************/
00404 
00405 class FlatFillAttribute : public ColourFillAttribute
00406 {
00407     CC_DECLARE_DYNCREATE(FlatFillAttribute)
00408 public:
00409     FlatFillAttribute();
00410     FlatFillAttribute(DocColour& NewColour) { SetStartColour(&NewColour); }
00411 
00412     virtual BOOL Blend(BlendAttrParam* pBlendParam);
00413 
00414     virtual NodeAttribute *MakeNode();
00415     virtual void SetStartColour(DocColour* NewCol);
00416 
00417     virtual BOOL IsAFlatFill() { return TRUE; }
00418 
00419     virtual INT32 GetGeometryShape() { return(FILLSHAPE_FLAT); }
00420 
00421 public:
00422     virtual AttributeValue *MouldIntoStroke(PathStrokerVector *pMoulder, double TransScale = 1.0);
00423             // Mould all geometry points using the given stroke moulder, and scaling 
00424             // transparency (if any) by the given fraction.
00425 };
00426 
00427 
00428 /********************************************************************************************
00429 
00430 >   class GradFillAttribute : public ColourFillAttribute
00431 
00432     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
00433     Created:    18/07/94
00434     Purpose:    Base class for a graduated fill attribute to be derived from.
00435                 It includes one vector (stored as two coordinates) to represent the basic
00436                 direction of the fill.  Some fills will need more vectors (e.g. radial
00437                 fills) but they can just add data fields in their derived classes.
00438     SeeAlso:    FillGeometryAttribute
00439 
00440 ********************************************************************************************/
00441 
00442 class GradFillAttribute : public ColourFillAttribute
00443 {
00444     CC_DECLARE_DYNCREATE(GradFillAttribute)
00445 public:
00446      GradFillAttribute();
00447     ~GradFillAttribute();
00448 
00449     virtual FillGeometryAttribute& operator=(FillGeometryAttribute& Attrib);
00450     virtual INT32 operator==(const FillGeometryAttribute& Attrib);
00451 
00452     virtual void SimpleCopy(AttributeValue *);
00453 
00454     virtual BOOL RenderFill(RenderRegion *, Path *);
00455 
00456     virtual DocCoord*   GetStartPoint() { return &StartPoint; }
00457     virtual DocCoord*   GetEndPoint()   { return &EndPoint; }
00458     virtual DocColour*  GetEndColour()  { return &EndColour; }
00459 
00460     virtual void SetStartPoint(DocCoord* Pos);
00461     virtual void SetEndPoint(DocCoord* Pos);
00462     virtual void SetEndColour(DocColour* NewCol);
00463 
00464     virtual BOOL Blend(BlendAttrParam* pBlendParam);
00465 
00466     virtual BOOL IsAGradFill() { return TRUE; }
00467     virtual DocCoord GetGeometryCoord(float pos) const;
00468     virtual float    GetGeometryParam(const DocCoord& c) const;
00469 
00470     ColourRamp *GetColourRamp() { return m_pColourRamp; }
00471 
00472 public:
00473     // All fills have Start and End Colours and Three control points.
00474     DocColour EndColour;
00475     DocCoord  StartPoint;
00476     DocCoord  EndPoint;
00477 
00478 public:
00479     // new colour ramp bits
00480     virtual BOOL SupportsFillRamps() { return TRUE; }
00481     virtual BOOL SetColourRamp(ColourRamp* pRamp);
00482     
00483     ColourRamp* MakeNewColourRamp();
00484     BOOL SameColourRampAs(ColourRamp *pOtherRamp);
00485     void DeleteColourRamp();
00486 
00487 protected:
00488     ColourRamp *m_pColourRamp;
00489 };
00490 
00491 /********************************************************************************************
00492 
00493 >   class LinearFillAttribute : public GradFillAttribute
00494 
00495     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
00496     Created:    18/07/94
00497     Purpose:    Specifies a linear graduated fill for an object, including the start and
00498                 end points.
00499     SeeAlso:    GradFillAttribute
00500 
00501 ********************************************************************************************/
00502 
00503 class LinearFillAttribute : public GradFillAttribute
00504 {
00505     CC_DECLARE_DYNCREATE(LinearFillAttribute)
00506 public:
00507     LinearFillAttribute();
00508     virtual NodeAttribute *MakeNode();
00509 //  virtual BOOL RenderFill(RenderRegion *, Path *);
00510 
00511     virtual DocCoord* GetEndPoint2() { return &EndPoint2; }
00512     virtual DocCoord* GetEndPoint3() { return &EndPoint3; }
00513     virtual void SetEndPoint2(DocCoord* Pos);
00514     virtual void SetEndPoint3(DocCoord* Pos);
00515 
00516     virtual BOOL IsPerspective() { return IsPersp; }
00517     virtual void MakePerspective();
00518     virtual void RemovePerspective();
00519 
00520     virtual BOOL IsALinearFill() { return TRUE; }
00521     virtual INT32 GetGeometryShape() { return(FILLSHAPE_LINEAR); }
00522 
00523 public:
00524     virtual AttributeValue *MouldIntoStroke(PathStrokerVector *pMoulder, double TransScale = 1.0);
00525             // Mould all geometry points using the given stroke moulder, and scaling 
00526             // transparency (if any) by the given fraction.
00527 
00528 public:
00529     DocCoord EndPoint2;
00530     DocCoord EndPoint3;
00531 
00532     BOOL IsPersp;
00533 };
00534 
00535 /********************************************************************************************
00536 
00537 >   class RadialFillAttribute : public GradFillAttribute
00538 
00539     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
00540     Created:    18/07/94
00541     Purpose:    Specifies a radial fill attribute for an object, including the two vectors
00542                 that define the ellipse.
00543     SeeAlso:    GradFillAttribute
00544 
00545 ********************************************************************************************/
00546 
00547 class RadialFillAttribute : public GradFillAttribute
00548 {
00549     CC_DECLARE_DYNCREATE(RadialFillAttribute)
00550 public:
00551     RadialFillAttribute();
00552     virtual void SimpleCopy(AttributeValue *);
00553     virtual NodeAttribute *MakeNode();
00554 //  virtual BOOL RenderFill(RenderRegion *, Path *);
00555 
00556     virtual FillGeometryAttribute& operator=(FillGeometryAttribute& Attrib);
00557     virtual INT32 operator==(const FillGeometryAttribute& Attrib);
00558 
00559     virtual BOOL IsAspectLocked() { return Circular; }
00560     virtual void SetAspectLock(BOOL Locked) { Circular = Locked; }
00561 
00562     // Radial fills can be locked, so they are always circular
00563     // These functions control its state
00564     void MakeCircular();
00565     void MakeElliptical();
00566 
00567     BOOL IsCircular() { return Circular; }
00568     BOOL IsElliptical() { return !Circular; }
00569 
00570     virtual DocCoord* GetEndPoint2() { return &EndPoint2; }
00571     virtual DocCoord* GetEndPoint3() { return &EndPoint3; }
00572     virtual void SetEndPoint2(DocCoord* Pos);
00573     virtual void SetEndPoint3(DocCoord* Pos);
00574     
00575     virtual BOOL IsPerspective() { return IsPersp; }
00576     virtual void MakePerspective();
00577     virtual void RemovePerspective();
00578 
00579     virtual BOOL IsARadialFill() { return TRUE; }
00580     virtual INT32 GetGeometryShape() { return(Circular ? FILLSHAPE_CIRCULAR : FILLSHAPE_ELLIPTICAL); }
00581 
00582 public:
00583     virtual AttributeValue *MouldIntoStroke(PathStrokerVector *pMoulder, double TransScale = 1.0);
00584             // Mould all geometry points using the given stroke moulder, and scaling 
00585             // transparency (if any) by the given fraction.
00586 
00587 public:
00588     DocCoord EndPoint2;
00589     DocCoord EndPoint3;
00590     BOOL IsPersp;
00591 
00592 private:
00593     BOOL Circular;
00594 };
00595 
00596 /********************************************************************************************
00597 
00598 >   class ConicalFillAttribute : public GradFillAttribute
00599 
00600     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
00601     Created:    18/07/94
00602     Purpose:    Specifies a conical fill attribute for an object, including the vector that
00603                 defines the centre of the cone, and the angle of the fill.
00604     SeeAlso:    GradFillAttribute
00605 
00606 ********************************************************************************************/
00607 
00608 class ConicalFillAttribute : public GradFillAttribute
00609 {
00610     CC_DECLARE_DYNCREATE(ConicalFillAttribute)
00611 public:
00612     ConicalFillAttribute();
00613     virtual NodeAttribute *MakeNode();
00614 //  virtual BOOL RenderFill(RenderRegion *, Path *);
00615     virtual DocCoord GetGeometryCoord(float pos) const;
00616     virtual float    GetGeometryParam(const DocCoord& c) const;
00617 
00618     virtual BOOL IsAConicalFill() { return TRUE; }
00619     virtual INT32 GetGeometryShape() { return(FILLSHAPE_CONICAL); }
00620 };
00621 
00622 
00623 /********************************************************************************************
00624 
00625 >   class SquareFillAttribute : public GradFillAttribute
00626 
00627     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
00628     Created:    18/07/94
00629     Purpose:    Specifies a Square graduated fill for an object, including the start and
00630                 end points.
00631     SeeAlso:    GradFillAttribute
00632 
00633 ********************************************************************************************/
00634 
00635 class SquareFillAttribute : public GradFillAttribute
00636 {
00637     CC_DECLARE_DYNCREATE(SquareFillAttribute)
00638 public:
00639     SquareFillAttribute();
00640     virtual NodeAttribute *MakeNode();
00641 //  virtual BOOL RenderFill(RenderRegion *, Path *);
00642 
00643     virtual DocCoord* GetEndPoint2() { return &EndPoint2; }
00644     virtual DocCoord* GetEndPoint3() { return &EndPoint3; }
00645     virtual void SetEndPoint2(DocCoord* Pos);
00646     virtual void SetEndPoint3(DocCoord* Pos);
00647 
00648     virtual BOOL IsPerspective() { return IsPersp; }
00649     virtual void MakePerspective();
00650     virtual void RemovePerspective();
00651 
00652     virtual BOOL IsASquareFill() { return TRUE; }
00653     virtual INT32 GetGeometryShape() { return(FILLSHAPE_DIAMOND); }
00654 
00655 public:
00656     DocCoord EndPoint2;
00657     DocCoord EndPoint3;
00658 
00659     BOOL IsPersp;
00660 };
00661 
00662 /********************************************************************************************
00663 
00664 >   class ThreeColFillAttribute : public GradFillAttribute
00665 
00666     Author:     Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
00667     Created:    12/08/96
00668     Purpose:    Specifies a Square graduated fill for an object, including the start and
00669                 end points.
00670     SeeAlso:    GradFillAttribute
00671 
00672 ********************************************************************************************/
00673 
00674 class ThreeColFillAttribute : public GradFillAttribute
00675 {
00676     CC_DECLARE_DYNCREATE(ThreeColFillAttribute)
00677 public:
00678     ThreeColFillAttribute();
00679 
00680     virtual INT32 operator==(const FillGeometryAttribute& Attrib);
00681     
00682     virtual NodeAttribute *MakeNode();
00683 
00684     virtual DocCoord* GetEndPoint2() { return &EndPoint2; }
00685     virtual void SetEndPoint2(DocCoord* Pos);
00686     virtual DocCoord* GetEndPoint3() { return &EndPoint3; }
00687     virtual void SetEndPoint3(DocCoord* Pos);
00688 
00689     virtual DocColour* GetEndColour2() { return &EndColour2; }
00690     virtual void SetEndColour2(DocColour* NewCol);
00691 
00692     virtual BOOL IsPerspective() { return IsPersp; }
00693     virtual void MakePerspective();
00694     virtual void RemovePerspective();
00695 
00696     virtual BOOL IsAThreeColFill() { return TRUE; }
00697     virtual BOOL SupportsFillRamps() { return FALSE; }
00698     virtual INT32 GetGeometryShape() { return(FILLSHAPE_3POINT); }
00699 
00700 public:
00701     DocCoord EndPoint2;
00702     DocCoord EndPoint3;
00703 
00704     BOOL IsPersp;
00705 
00706     DocColour EndColour2;
00707 };
00708 
00709 /********************************************************************************************
00710 
00711 >   class FourColFillAttribute : public ThreeColFillAttribute
00712 
00713     Author:     Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
00714     Created:    12/08/96
00715     Purpose:    Specifies a Four colour fill for an object
00716     SeeAlso:    GradFillAttribute
00717 
00718 ********************************************************************************************/
00719 
00720 class FourColFillAttribute : public ThreeColFillAttribute
00721 {
00722     CC_DECLARE_DYNCREATE(FourColFillAttribute)
00723 public:
00724     FourColFillAttribute();
00725 
00726     virtual INT32 operator==(const FillGeometryAttribute& Attrib);
00727 
00728     virtual NodeAttribute *MakeNode();
00729 
00730     virtual DocColour* GetEndColour3() { return &EndColour3; }
00731     virtual void SetEndColour3(DocColour* NewCol);
00732 
00733     virtual BOOL IsAFourColFill() { return TRUE; }
00734     virtual INT32 GetGeometryShape() { return(FILLSHAPE_4POINT); }
00735 
00736 public:
00737     DocColour EndColour3;
00738 };
00739 
00740 
00741 
00742 
00743 
00744 /********************************************************************************************
00745 
00746 >   class BitmapFillAttribute : public GradFillAttribute
00747 
00748     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
00749     Created:    7/9/94
00750     Purpose:    Specifies a bitmap fill attribute for an object.
00751     SeeAlso:    FillGeometryAttribute
00752 
00753 ********************************************************************************************/
00754 
00755 class BitmapFillAttribute : public GradFillAttribute
00756 {
00757     CC_DECLARE_DYNCREATE(BitmapFillAttribute)
00758 public:
00759     BitmapFillAttribute();
00760     ~BitmapFillAttribute();
00761 
00762     virtual void Restore(RenderRegion *, BOOL);
00763     virtual void Render(RenderRegion *, BOOL Temp = FALSE);
00764 
00765     virtual NodeAttribute *MakeNode();
00766     virtual BOOL RenderFill(RenderRegion *, Path *);
00767     virtual void SimpleCopy(AttributeValue *);
00768 
00769     virtual FillGeometryAttribute& operator=(FillGeometryAttribute& Attrib);
00770     virtual INT32 operator==(const FillGeometryAttribute& Attrib);
00771 
00772     KernelBitmapRef BitmapRef;
00773 
00774     virtual KernelBitmapRef* GetBitmapRef();
00775 
00776     virtual BOOL AttachBitmap(KernelBitmap* pBitmap);
00777     virtual BOOL DetachBitmap();
00778     virtual KernelBitmap* GetBitmap();
00779     virtual BOOL CopyBitmap(KernelBitmap*);
00780 
00781     virtual DocCoord* GetStartPoint() { return &StartPoint; }
00782     virtual DocCoord* GetEndPoint() { return &EndPoint; }
00783     virtual DocCoord* GetEndPoint2() { return &EndPoint2; }
00784     virtual DocCoord* GetEndPoint3() { return &EndPoint3; }
00785     virtual void SetStartPoint(DocCoord* Pos);
00786     virtual void SetEndPoint(DocCoord* Pos);
00787     virtual void SetEndPoint2(DocCoord* Pos);
00788     virtual void SetEndPoint3(DocCoord* Pos);
00789 
00790     virtual void SetStartColour(DocColour*);
00791     virtual void SetEndColour(DocColour*);
00792 
00793     virtual DocColour* GetStartColour();
00794     virtual DocColour* GetEndColour();
00795 
00796     virtual INT32 GetTesselation() { return Tesselation; }
00797     virtual void SetTesselation(INT32 NewTess);
00798     
00799     virtual BOOL SetDPI(UINT32 NewDpi);
00800     virtual UINT32 GetDPI();
00801 
00802     virtual BOOL IsPerspective() { return IsPersp; }
00803     virtual void MakePerspective();
00804     virtual void RemovePerspective();
00805 
00806     virtual BOOL IsAKindOfBitmapFill() { return TRUE; }
00807     virtual BOOL IsABitmapFill() { return TRUE; }
00808 
00809     // DMc
00810     // whether this bitmap can be blur rendered or just blitted
00811     BOOL CanBlurRenderBitmap() { return m_CanBlurRender; }
00812     void SetCanBlurRenderBitmap(BOOL b) { m_CanBlurRender = b; }
00813 
00814     virtual INT32 GetGeometryShape() { return(FILLSHAPE_BITMAP); }
00815 
00816 public:
00817     DocCoord EndPoint2;
00818     DocCoord EndPoint3;
00819 
00820     INT32 Tesselation;
00821 
00822     BOOL IsPersp;
00823 
00824     BOOL m_CanBlurRender;
00825 
00826     static BOOL m_doBitmapSmoothing;        // this will always be true - unless we are rendering a preview bitmap
00827 };
00828 
00829 
00830 /********************************************************************************************
00831 
00832 >   class NoiseFillAttribute : public BitmapFillAttribute
00833 
00834     Author:     Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
00835     Created:    20/1/97
00836     Purpose:    Specifies a noise fill attribute for an object.
00837     SeeAlso:    FillGeometryAttribute
00838 
00839 ********************************************************************************************/
00840 
00841 class NoiseFillAttribute : public BitmapFillAttribute
00842 {
00843     CC_DECLARE_DYNCREATE(NoiseFillAttribute)
00844 
00845 public:
00846      NoiseFillAttribute();
00847     ~NoiseFillAttribute();
00848 
00849     virtual NodeAttribute *MakeNode();
00850     virtual void SimpleCopy(AttributeValue *);
00851 
00852     virtual FillGeometryAttribute& operator=(FillGeometryAttribute& Attrib);
00853     virtual INT32 operator==(const FillGeometryAttribute& Attrib);
00854 
00855     virtual BOOL AttachBitmap(KernelBitmap* pBitmap);
00856     virtual BOOL DetachBitmap();
00857     virtual BOOL CopyBitmap(KernelBitmap*);
00858 
00859     virtual BOOL RecalcFractal();
00860 
00861     virtual UINT32      GetFractalDim()  { return dim; }
00862     virtual BOOL        GetTileable()    { return tileable; }
00863     virtual UINT32      GetFractalDPI()  { return dpi; }
00864     virtual DocColour*  GetStartColour() { return &Colour; }
00865     virtual DocColour*  GetEndColour()   { return &EndColour; }
00866 
00867     virtual INT32       GetSeed()        { return seed; }
00868     virtual FIXED16     GetGraininess()  { return grain; }
00869 
00870     virtual void SetTesselation(INT32 NewTess);
00871     virtual void SetFractalDim(UINT32 NewDim);
00872     virtual BOOL SetTileable(BOOL NewTile);
00873     virtual BOOL SetFractalDPI(UINT32 NewDpi);
00874 
00875     virtual void SetStartColour(DocColour*);
00876     virtual void SetEndColour(DocColour*);
00877 
00878     virtual BOOL SetSeed(INT32 NewSeed);
00879     virtual BOOL SetGraininess(FIXED16 NewGrain);
00880 
00881     virtual BOOL IsAKindOfBitmapFill()  { return TRUE; }
00882     virtual BOOL IsABitmapFill()        { return FALSE; }
00883     virtual BOOL IsATextureFill()       { return TRUE; }
00884     virtual BOOL IsANoiseFill()         { return TRUE; }
00885 
00886     virtual void CacheFractalData(FillGeometryAttribute *pCachedFractal);
00887     virtual BOOL IsSameAsCachedFractal(FillGeometryAttribute *pCachedFractal);
00888 
00889     virtual INT32 GetGeometryShape() { return(FILLSHAPE_PLASMA); }
00890 
00891 private:
00892     INT32   seed;
00893     UINT32  dpi;
00894     BOOL    tileable;
00895     UINT32  dim;
00896 
00897 private:
00898     FIXED16 grain;
00899 };
00900 
00901 
00902 /********************************************************************************************
00903 
00904 >   class FractalFillAttribute : public BitmapFillAttribute
00905 
00906     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
00907     Created:    13/9/94
00908     Purpose:    Specifies a Fractal fill attribute for an object.
00909     SeeAlso:    FillGeometryAttribute
00910 
00911 ********************************************************************************************/
00912 
00913 class FractalFillAttribute : public BitmapFillAttribute
00914 {
00915     CC_DECLARE_DYNCREATE(FractalFillAttribute)
00916 public:
00917      FractalFillAttribute();
00918     ~FractalFillAttribute();
00919 
00920     virtual NodeAttribute *MakeNode();
00921     virtual void SimpleCopy(AttributeValue *);
00922 
00923     virtual FillGeometryAttribute& operator=(FillGeometryAttribute& Attrib);
00924     virtual INT32 operator==(const FillGeometryAttribute& Attrib);
00925 
00926     virtual BOOL AttachBitmap(KernelBitmap* pBitmap);
00927     virtual BOOL DetachBitmap();
00928     virtual BOOL CopyBitmap(KernelBitmap*);
00929 
00930     virtual BOOL Randomise();
00931     virtual BOOL RecalcFractal();
00932 
00933     virtual UINT32      GetFractalDim()  { return Dim; }
00934     virtual BOOL        GetTileable()    { return Tileable; }
00935     virtual UINT32      GetFractalDPI()  { return Dpi; }
00936 
00937     virtual DocColour*  GetStartColour() { return &Colour; }
00938     virtual DocColour*  GetEndColour()   { return &EndColour; }
00939 
00940     virtual INT32       GetSeed()        { return Seed; }
00941     virtual FIXED16     GetGraininess()  { return Graininess; }
00942     virtual FIXED16     GetGravity()     { return Gravity; }
00943     virtual FIXED16     GetSquash()      { return Squash; }
00944 
00945     virtual void SetTesselation(INT32 NewTess);
00946     virtual void SetFractalDim(UINT32 NewDim);
00947     virtual BOOL SetTileable(BOOL NewTile);
00948     virtual BOOL SetFractalDPI(UINT32 NewDpi);
00949 
00950     virtual void SetStartColour(DocColour*);
00951     virtual void SetEndColour(DocColour*);
00952 
00953     virtual BOOL SetSeed(INT32 NewSeed);
00954     virtual BOOL SetGraininess(FIXED16 NewGrain);
00955     virtual BOOL SetGravity(FIXED16 NewGrav);
00956     virtual BOOL SetSquash(FIXED16 NewSquash);
00957     
00958     virtual BOOL IsAKindOfBitmapFill()  { return TRUE; }
00959     virtual BOOL IsABitmapFill()        { return FALSE; }
00960     virtual BOOL IsATextureFill()       { return TRUE; }
00961     virtual BOOL IsAFractalFill()       { return TRUE; }
00962 
00963 
00964     virtual void CacheFractalData(FillGeometryAttribute *pCachedFractal);
00965     virtual BOOL IsSameAsCachedFractal(FillGeometryAttribute *pCachedFractal);
00966 
00967     virtual INT32 GetGeometryShape() { return(FILLSHAPE_CLOUDS); }
00968 
00969 public:
00970     INT32   Seed;
00971     FIXED16 Graininess;         //0..about 32
00972     FIXED16 Gravity;            //0..about 255
00973     FIXED16 Squash;
00974     INT32   Dpi;
00975     BOOL    Tileable;
00976 
00977 protected:
00978     INT32   Dim;
00979 };
00980 
00981 
00982 
00983 
00984 /********************************************************************************************
00985 
00986 >   class TranspFillAttribute : public FillGeometryAttribute
00987 
00988     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
00989     Created:    5/9/94
00990     Purpose:    The base class for a fill geometry attribute, such as flat, linear,
00991                 radial, conical, etc.
00992                 This provides the basic interface for fill rendering.
00993     SeeAlso:    FlatFillAttribute; LinearFillAttribute; RadialFillAttribute;
00994                 ConicalFillAttribute; BitmapFillAttribute
00995 
00996 ********************************************************************************************/
00997 
00998 class TranspFillAttribute : public FillGeometryAttribute
00999 {
01000     CC_DECLARE_DYNCREATE(TranspFillAttribute)
01001 
01002 public:
01003     TranspFillAttribute();
01004 
01005     static BOOL Init();
01006 
01007     virtual void Restore(RenderRegion *, BOOL);
01008     virtual void Render(RenderRegion *, BOOL Temp = FALSE);
01009 
01010     virtual FillGeometryAttribute& operator=(FillGeometryAttribute& Attrib);
01011     virtual INT32 operator==(const FillGeometryAttribute& Attrib);
01012 
01013     virtual UINT32* GetStartTransp() { return &Transp; }
01014     virtual void SetStartTransp(UINT32* NewTransp);
01015 
01016     UINT32 GetTranspType() { return TranspType; }
01017     void SetTranspType(UINT32 NewType);
01018 
01019     virtual BOOL IsATranspFill() { return TRUE; }
01020     virtual ColourFillAttribute *MakeSimilarNonTranspFillGeometry(double TransparencyScale) {return NULL;}
01021 
01022 public:
01023     UINT32 TranspType;
01024     UINT32 Transp;
01025 };
01026 
01027 /********************************************************************************************
01028 
01029 >   class FlatTranspFillAttribute : public TranspFillAttribute
01030 
01031     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
01032     Created:    23/8/94
01033     Purpose:    Specifies a flat fill attribute for an object, i.e. it is filled with
01034                 one solid colour.
01035     SeeAlso:    FillGeometryAttribute
01036 
01037 ********************************************************************************************/
01038 
01039 class FlatTranspFillAttribute : public TranspFillAttribute
01040 {
01041     CC_DECLARE_DYNCREATE(FlatTranspFillAttribute)
01042 public:
01043     FlatTranspFillAttribute();
01044     FlatTranspFillAttribute(UINT32 NewTransp) { SetStartTransp(&NewTransp); }
01045 
01046     virtual BOOL Blend(BlendAttrParam* pBlendParam);
01047 
01048     virtual NodeAttribute *MakeNode();
01049 
01050     virtual BOOL IsAFlatFill() { return TRUE; }
01051 
01052     virtual ColourFillAttribute *MakeSimilarNonTranspFillGeometry(double TransparencyScale);
01053 
01054     virtual INT32 GetGeometryShape() { return(FILLSHAPE_FLAT); }
01055 };
01056 
01057 /********************************************************************************************
01058 
01059 >   class GradTranspFillAttribute : public TranspFillAttribute
01060 
01061     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
01062     Created:    23/8/94
01063     Purpose:    Base class for a graduated fill attribute to be derived from.
01064                 It includes one vector (stored as two coordinates) to represent the basic
01065                 direction of the fill.  Some fills will need more vectors (e.g. radial
01066                 fills) but they can just add data fields in their derived classes.
01067     SeeAlso:    FillGeometryAttribute
01068 
01069 ********************************************************************************************/
01070 
01071 class GradTranspFillAttribute : public TranspFillAttribute
01072 {
01073     CC_DECLARE_DYNCREATE(GradTranspFillAttribute)
01074 public:
01075      GradTranspFillAttribute();
01076     ~GradTranspFillAttribute();
01077 
01078     virtual FillGeometryAttribute& operator=(FillGeometryAttribute& Attrib);
01079     virtual INT32 operator==(const FillGeometryAttribute& Attrib);
01080 
01081     virtual void SimpleCopy(AttributeValue *);
01082 
01083     virtual DocCoord* GetStartPoint() { return &StartPoint; }
01084     virtual DocCoord* GetEndPoint()   { return &EndPoint; }
01085     virtual UINT32*   GetEndTransp()  { return &EndTransp; }
01086     
01087     virtual void SetStartPoint(DocCoord* Pos);
01088     virtual void SetEndPoint(DocCoord* Pos);
01089     virtual void SetEndTransp(UINT32* NewTransp);
01090 
01091     virtual BOOL Blend(BlendAttrParam* pBlendParam);
01092     virtual BOOL IsAGradFill() { return TRUE; }
01093     virtual DocCoord GetGeometryCoord(float pos) const;
01094     virtual float    GetGeometryParam(const DocCoord& c) const;
01095 
01096     virtual ColourFillAttribute *MakeSimilarNonTranspFillGeometry(double TransparencyScale);
01097 
01098 public:
01099     DocCoord StartPoint;
01100     DocCoord EndPoint;
01101     UINT32     EndTransp;
01102 
01103 public:
01104     // extra transparency ramp stuff
01105     virtual BOOL SupportsFillRamps() { return TRUE; }
01106     virtual BOOL SetTranspRamp(TransparencyRamp *pRamp);
01107     virtual TransparencyRamp* GetTranspRamp() { return m_pTranspRamp; }
01108 
01109     TransparencyRamp* MakeNewTranspRamp();
01110     BOOL SameTransparencyRampAs(TransparencyRamp *pOtherRamp);
01111     void DeleteTranspRamp();
01112 
01113 protected:
01114     TransparencyRamp *m_pTranspRamp;
01115 };
01116 
01117 
01118 
01119 
01120 /********************************************************************************************
01121 
01122 >   class LinearTranspFillAttribute : public GradTranspFillAttribute
01123 
01124     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
01125     Created:    23/8/94
01126     Purpose:    Specifies a linear graduated fill for an object, including the start and
01127                 end points.
01128     SeeAlso:    GradFillAttribute
01129 
01130 ********************************************************************************************/
01131 
01132 class LinearTranspFillAttribute : public GradTranspFillAttribute
01133 {
01134     CC_DECLARE_DYNCREATE(LinearTranspFillAttribute)
01135 public:
01136     LinearTranspFillAttribute();
01137     virtual NodeAttribute *MakeNode();
01138 
01139     virtual DocCoord* GetEndPoint2() { return &EndPoint2; }
01140     virtual void SetEndPoint2(DocCoord* Pos);
01141     virtual DocCoord* GetEndPoint3() { return &EndPoint3; }
01142     virtual void SetEndPoint3(DocCoord* Pos);
01143 
01144     virtual BOOL IsPerspective() { return IsPersp; }
01145     virtual void MakePerspective();
01146     virtual void RemovePerspective();
01147 
01148     virtual BOOL IsALinearFill() { return TRUE; }
01149 
01150     virtual ColourFillAttribute *MakeSimilarNonTranspFillGeometry(double TransparencyScale);
01151 
01152     virtual INT32 GetGeometryShape() { return(FILLSHAPE_LINEAR); }
01153 
01154 public:
01155     virtual AttributeValue *MouldIntoStroke(PathStrokerVector *pMoulder, double TransScale = 1.0);
01156             // Mould all geometry points using the given stroke moulder, and scaling 
01157             // transparency (if any) by the given fraction.
01158 
01159 public:
01160     DocCoord EndPoint2;
01161     DocCoord EndPoint3;
01162 
01163     BOOL IsPersp;
01164 };
01165 
01166 /********************************************************************************************
01167 
01168 >   class RadialTranspFillAttribute : public GradTranspFillAttribute
01169 
01170     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
01171     Created:    23/8/94
01172     Purpose:    Specifies a radial fill attribute for an object, including the two vectors
01173                 that define the ellipse.
01174     SeeAlso:    GradFillAttribute
01175 
01176 ********************************************************************************************/
01177 
01178 class RadialTranspFillAttribute : public GradTranspFillAttribute
01179 {
01180     CC_DECLARE_DYNCREATE(RadialTranspFillAttribute)
01181 public:
01182     RadialTranspFillAttribute();
01183     virtual void SimpleCopy(AttributeValue *);
01184     virtual NodeAttribute *MakeNode();
01185 
01186     virtual FillGeometryAttribute& operator=(FillGeometryAttribute& Attrib);
01187     virtual INT32 operator==(const FillGeometryAttribute& Attrib);
01188 
01189     virtual BOOL IsAspectLocked() { return Circular; }
01190     virtual void SetAspectLock(BOOL Locked) { Circular = Locked; }
01191 
01192     // Radial fills can be locked, so they are always circular
01193     // These functions control its state
01194     void MakeCircular();
01195     void MakeElliptical();
01196 
01197     BOOL IsCircular() { return Circular; }
01198     BOOL IsElliptical() { return !Circular; }
01199 
01200     virtual DocCoord* GetEndPoint2() { return &EndPoint2; }
01201     virtual void SetEndPoint2(DocCoord* Pos);
01202     virtual DocCoord* GetEndPoint3() { return &EndPoint3; }
01203     virtual void SetEndPoint3(DocCoord* Pos);
01204 
01205     virtual BOOL IsPerspective() { return IsPersp; }
01206     virtual void MakePerspective();
01207     virtual void RemovePerspective();
01208 
01209     virtual BOOL IsARadialFill() { return TRUE; }
01210 
01211     virtual ColourFillAttribute *MakeSimilarNonTranspFillGeometry(double TransparencyScale);
01212 
01213     virtual INT32 GetGeometryShape() { return(Circular ? FILLSHAPE_CIRCULAR : FILLSHAPE_ELLIPTICAL); }
01214 
01215 public:
01216     virtual AttributeValue *MouldIntoStroke(PathStrokerVector *pMoulder, double TransScale = 1.0);
01217             // Mould all geometry points using the given stroke moulder, and scaling 
01218             // transparency (if any) by the given fraction.
01219 
01220 public:
01221     DocCoord EndPoint2;
01222     DocCoord EndPoint3;
01223     BOOL IsPersp;
01224 
01225 private:
01226     BOOL Circular;
01227 };
01228 
01229 /********************************************************************************************
01230 
01231 >   class ConicalTranspFillAttribute : public GradTranspFillAttribute
01232 
01233     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
01234     Created:    23/8/94
01235     Purpose:    Specifies a conical fill attribute for an object, including the vector that
01236                 defines the centre of the cone, and the angle of the fill.
01237     SeeAlso:    GradFillAttribute
01238 
01239 ********************************************************************************************/
01240 
01241 class ConicalTranspFillAttribute : public GradTranspFillAttribute
01242 {
01243     CC_DECLARE_DYNCREATE(ConicalTranspFillAttribute)
01244 public:
01245     ConicalTranspFillAttribute();
01246     virtual NodeAttribute *MakeNode();
01247 
01248     virtual BOOL IsAConicalFill() { return TRUE; }
01249     virtual DocCoord GetGeometryCoord(float pos) const;
01250     virtual float    GetGeometryParam(const DocCoord& c) const;
01251 
01252     virtual ColourFillAttribute *MakeSimilarNonTranspFillGeometry(double TransparencyScale);
01253 
01254     virtual INT32 GetGeometryShape() { return(FILLSHAPE_CONICAL); }
01255 };
01256 
01257 
01258 /********************************************************************************************
01259 
01260 >   class SquareTranspFillAttribute : public GradTranspFillAttribute
01261 
01262     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
01263     Created:    23/8/94
01264     Purpose:    Specifies a Square graduated fill for an object, including the start and
01265                 end points.
01266     SeeAlso:    GradFillAttribute
01267 
01268 ********************************************************************************************/
01269 
01270 class SquareTranspFillAttribute : public GradTranspFillAttribute
01271 {
01272     CC_DECLARE_DYNCREATE(SquareTranspFillAttribute)
01273 public:
01274     SquareTranspFillAttribute();
01275     virtual NodeAttribute *MakeNode();
01276 
01277     virtual DocCoord* GetEndPoint2() { return &EndPoint2; }
01278     virtual void SetEndPoint2(DocCoord* Pos);
01279     virtual DocCoord* GetEndPoint3() { return &EndPoint3; }
01280     virtual void SetEndPoint3(DocCoord* Pos);
01281 
01282     virtual BOOL IsPerspective() { return IsPersp; }
01283     virtual void MakePerspective();
01284     virtual void RemovePerspective();
01285 
01286     virtual BOOL IsASquareFill() { return TRUE; }
01287 
01288     virtual ColourFillAttribute *MakeSimilarNonTranspFillGeometry(double TransparencyScale);
01289 
01290     virtual INT32 GetGeometryShape() { return(FILLSHAPE_DIAMOND); }
01291 
01292 public:
01293     DocCoord EndPoint2;
01294     DocCoord EndPoint3;
01295 
01296     BOOL IsPersp;
01297 };
01298 
01299 
01300 
01301 /********************************************************************************************
01302 
01303 >   class BitmapTranspFillAttribute : public GradTranspFillAttribute
01304 
01305     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
01306     Created:    13/9/94
01307     Purpose:    Specifies a bitmap fill attribute for an object.
01308     SeeAlso:    FillGeometryAttribute
01309 
01310 ********************************************************************************************/
01311 
01312 class BitmapTranspFillAttribute : public GradTranspFillAttribute
01313 {
01314     CC_DECLARE_DYNCREATE(BitmapTranspFillAttribute)
01315 public:
01316     BitmapTranspFillAttribute();
01317     ~BitmapTranspFillAttribute();
01318 
01319     virtual void Restore(RenderRegion *, BOOL);
01320     virtual void Render(RenderRegion *, BOOL Temp = FALSE);
01321 
01322     virtual NodeAttribute *MakeNode();
01323     virtual void SimpleCopy(AttributeValue *);
01324 
01325     virtual FillGeometryAttribute& operator=(FillGeometryAttribute& Attrib);
01326     virtual INT32 operator==(const FillGeometryAttribute& Attrib);
01327 
01328     KernelBitmapRef BitmapRef;
01329 
01330     virtual KernelBitmapRef* GetBitmapRef() { return &BitmapRef; }
01331 
01332     virtual BOOL AttachBitmap(KernelBitmap* pBitmap);
01333     virtual BOOL DetachBitmap();
01334     virtual KernelBitmap* GetBitmap();
01335     virtual BOOL CopyBitmap(KernelBitmap*);
01336 
01337     virtual DocCoord* GetStartPoint() { return &StartPoint; }
01338     virtual DocCoord* GetEndPoint() { return &EndPoint; }
01339     virtual DocCoord* GetEndPoint2() { return &EndPoint2; }
01340     virtual DocCoord* GetEndPoint3() { return &EndPoint3; }
01341     virtual void SetStartPoint(DocCoord* Pos);
01342     virtual void SetEndPoint(DocCoord* Pos);
01343     virtual void SetEndPoint2(DocCoord* Pos);
01344     virtual void SetEndPoint3(DocCoord* Pos);
01345 
01346     virtual INT32 GetTesselation() { return Tesselation; }
01347     virtual void SetTesselation(INT32 NewTess);
01348     
01349     virtual UINT32 GetDPI();
01350     virtual BOOL SetDPI(UINT32 NewDpi);
01351 
01352     virtual UINT32* GetStartTransp();
01353     virtual void SetStartTransp(UINT32* NewTransp);
01354     virtual UINT32* GetEndTransp();
01355     virtual void SetEndTransp(UINT32* NewTransp);
01356 
01357     virtual BOOL IsPerspective() { return IsPersp; }
01358     virtual void MakePerspective();
01359     virtual void RemovePerspective();
01360 
01361     virtual BOOL IsAKindOfBitmapFill() { return TRUE; }
01362     virtual BOOL IsABitmapFill() { return TRUE; }
01363 
01364     virtual ColourFillAttribute *MakeSimilarNonTranspFillGeometry(double TransparencyScale);
01365 
01366     virtual INT32 GetGeometryShape() { return(FILLSHAPE_BITMAP); }
01367 
01368 public:
01369     DocCoord EndPoint2;
01370     DocCoord EndPoint3;
01371 
01372     INT32 Tesselation;
01373 
01374     BOOL IsPersp;
01375 
01376     static BOOL m_doBitmapSmoothing;        // this will always be true - unless we are rendering a preview bitmap
01377 };
01378 
01379 
01380 /********************************************************************************************
01381 
01382 >   class NoiseTranspFillAttribute : public BitmapTranspFillAttribute
01383 
01384     Author:     Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
01385     Created:    20/01/97
01386     Purpose:    Specifies a noise fill attribute for an object.
01387     SeeAlso:    FillGeometryAttribute
01388 
01389 ********************************************************************************************/
01390 
01391 class NoiseTranspFillAttribute : public BitmapTranspFillAttribute
01392 {
01393     CC_DECLARE_DYNCREATE(NoiseTranspFillAttribute)
01394 
01395 public:
01396      NoiseTranspFillAttribute();
01397     ~NoiseTranspFillAttribute();
01398 
01399     virtual NodeAttribute *MakeNode();
01400     virtual void SimpleCopy(AttributeValue *);
01401 
01402     virtual FillGeometryAttribute& operator=(FillGeometryAttribute& Attrib);
01403     virtual INT32 operator==(const FillGeometryAttribute& Attrib);
01404 
01405     virtual BOOL AttachBitmap(KernelBitmap* pBitmap);
01406     virtual BOOL DetachBitmap();
01407     virtual BOOL CopyBitmap(KernelBitmap*);
01408 
01409     virtual BOOL RecalcFractal();
01410 
01411     virtual UINT32  GetFractalDim()  { return dim; }
01412     virtual BOOL    GetTileable()    { return tileable; }
01413     virtual UINT32  GetFractalDPI()  { return dpi; }
01414     virtual INT32   GetSeed()        { return seed; }
01415     virtual FIXED16 GetGraininess()  { return grain; }
01416 
01417     virtual void SetTesselation(INT32 NewTess);
01418     virtual void SetFractalDim(UINT32 NewDim);
01419     virtual BOOL SetTileable(BOOL NewTile);
01420     virtual BOOL SetFractalDPI(UINT32 NewDpi);
01421 
01422     virtual BOOL SetSeed(INT32 NewSeed);
01423     virtual BOOL SetGraininess(FIXED16 NewGrain);
01424 
01425     virtual BOOL IsAKindOfBitmapFill()  { return TRUE; }
01426     virtual BOOL IsABitmapFill()        { return FALSE; }
01427 
01428     virtual void CacheFractalData(FillGeometryAttribute *pCachedFractal);
01429     virtual BOOL IsSameAsCachedFractal(FillGeometryAttribute *pCachedFractal);
01430 
01431     virtual ColourFillAttribute *MakeSimilarNonTranspFillGeometry(double TransparencyScale);
01432 
01433     virtual INT32 GetGeometryShape() { return(FILLSHAPE_PLASMA); }
01434 
01435 private:
01436     UINT32  dpi;
01437     UINT32  dim;
01438     BOOL    tileable;
01439     INT32   seed;
01440 
01441 private:
01442     FIXED16 grain;
01443 };
01444 
01445 
01446 /********************************************************************************************
01447 
01448 >   class FractalTranspFillAttribute : public BitmapTranspFillAttribute
01449 
01450     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
01451     Created:    13/9/94
01452     Purpose:    Specifies a Fractal fill attribute for an object.
01453     SeeAlso:    FillGeometryAttribute
01454 
01455 ********************************************************************************************/
01456 
01457 class FractalTranspFillAttribute : public BitmapTranspFillAttribute
01458 {
01459     CC_DECLARE_DYNCREATE(FractalTranspFillAttribute)
01460 public:
01461      FractalTranspFillAttribute();
01462     ~FractalTranspFillAttribute();
01463 
01464     virtual NodeAttribute *MakeNode();
01465     virtual void SimpleCopy(AttributeValue *);
01466 
01467     virtual FillGeometryAttribute& operator=(FillGeometryAttribute& Attrib);
01468     virtual INT32 operator==(const FillGeometryAttribute& Attrib);
01469 
01470     virtual BOOL AttachBitmap(KernelBitmap* pBitmap);
01471     virtual BOOL DetachBitmap();
01472     virtual BOOL CopyBitmap(KernelBitmap*);
01473 
01474     virtual BOOL Randomise();
01475     virtual BOOL RecalcFractal();
01476 
01477     virtual UINT32  GetFractalDim() { return Dim; }
01478     virtual BOOL    GetTileable()   { return Tileable; }
01479     virtual UINT32  GetFractalDPI() { return Dpi; }
01480 
01481     virtual INT32   GetSeed()       { return Seed; }
01482     virtual FIXED16 GetGraininess() { return Graininess; }
01483     virtual FIXED16 GetGravity()    { return Gravity; }
01484     virtual FIXED16 GetSquash()     { return Squash; }
01485 
01486     virtual void SetTesselation(INT32 NewTess);
01487     virtual void SetFractalDim(UINT32 NewDim);
01488     virtual BOOL SetTileable(BOOL NewTile);
01489     virtual BOOL SetFractalDPI(UINT32 NewDpi);
01490 
01491     virtual BOOL SetSeed(INT32 NewSeed);
01492     virtual BOOL SetGraininess(FIXED16 NewGrain);
01493     virtual BOOL SetGravity(FIXED16 NewGrav);
01494     virtual BOOL SetSquash(FIXED16 NewSquash);
01495 
01496     virtual BOOL IsAKindOfBitmapFill()  { return TRUE; }
01497     virtual BOOL IsABitmapFill()        { return FALSE; }
01498     virtual BOOL IsAFractalFill()       { return TRUE; }
01499 
01500     virtual void CacheFractalData(FillGeometryAttribute *pCachedFractal);
01501     virtual BOOL IsSameAsCachedFractal(FillGeometryAttribute *pCachedFractal);
01502 
01503     virtual ColourFillAttribute *MakeSimilarNonTranspFillGeometry(double TransparencyScale);
01504 
01505     virtual INT32 GetGeometryShape() { return(FILLSHAPE_CLOUDS); }
01506 
01507 public:
01508     INT32   Seed;
01509     FIXED16 Graininess;         //0..about 32
01510     FIXED16 Gravity;            //0..about 255
01511     FIXED16 Squash;
01512 
01513     INT32   Dpi;
01514     BOOL    Tileable;
01515 
01516 protected:
01517     INT32   Dim;
01518 };
01519 
01520 
01521 /********************************************************************************************
01522 
01523 >   class ThreeColTranspFillAttribute : public GradTranspFillAttribute
01524 
01525     Author:     Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
01526     Created:    13/8/96
01527     Purpose:    Specifies a Three colour graduated transparency for an object
01528                 including the start and end points.
01529     SeeAlso:    GradFillAttribute
01530 
01531 ********************************************************************************************/
01532 
01533 class ThreeColTranspFillAttribute : public GradTranspFillAttribute
01534 {
01535     CC_DECLARE_DYNCREATE(ThreeColTranspFillAttribute)
01536 public:
01537     ThreeColTranspFillAttribute();
01538 
01539     virtual INT32 operator==(const FillGeometryAttribute& Attrib);
01540 
01541     virtual NodeAttribute *MakeNode();
01542 
01543     virtual DocCoord* GetEndPoint2() { return &EndPoint2; }
01544     virtual void SetEndPoint2(DocCoord* Pos);
01545     virtual DocCoord* GetEndPoint3() { return &EndPoint3; }
01546     virtual void SetEndPoint3(DocCoord* Pos);
01547 
01548     virtual UINT32* GetEndTransp2() { return &EndTransp2; }
01549     virtual void SetEndTransp2(UINT32* NewTransp);
01550 
01551     virtual BOOL IsPerspective() { return IsPersp; }
01552     virtual void MakePerspective();
01553     virtual void RemovePerspective();
01554 
01555     virtual BOOL IsAThreeColFill() { return TRUE; }
01556 
01557     virtual ColourFillAttribute *MakeSimilarNonTranspFillGeometry(double TransparencyScale);
01558     virtual BOOL SupportsFillRamps() { return FALSE; }
01559 
01560     virtual INT32 GetGeometryShape() { return(FILLSHAPE_3POINT); }
01561 
01562 public:
01563     DocCoord EndPoint2;
01564     DocCoord EndPoint3;
01565 
01566     BOOL IsPersp;
01567 
01568     UINT32 EndTransp2;
01569 };
01570 
01571 
01572 /********************************************************************************************
01573 
01574 >   class FourColTranspFillAttribute : public ThreeColTranspFillAttribute
01575 
01576     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
01577     Created:    23/8/94
01578     Purpose:    Specifies a FourCol graduated fill for an object, including the start and
01579                 end points.
01580     SeeAlso:    GradFillAttribute
01581 
01582 ********************************************************************************************/
01583 
01584 class FourColTranspFillAttribute : public ThreeColTranspFillAttribute
01585 {
01586     CC_DECLARE_DYNCREATE(FourColTranspFillAttribute)
01587 public:
01588     FourColTranspFillAttribute();
01589 
01590     virtual INT32 operator==(const FillGeometryAttribute& Attrib);
01591 
01592     virtual NodeAttribute *MakeNode();
01593 
01594     virtual UINT32* GetEndTransp3() { return &EndTransp3; }
01595     virtual void SetEndTransp3(UINT32* NewTransp);
01596 
01597     virtual BOOL IsAFourColFill() { return TRUE; }
01598 
01599     virtual ColourFillAttribute *MakeSimilarNonTranspFillGeometry(double TransparencyScale);
01600 
01601     virtual INT32 GetGeometryShape() { return(FILLSHAPE_4POINT); }
01602 
01603 public:
01604     UINT32 EndTransp3;
01605 };
01606 
01607 
01608 
01609 /********************************************************************************************
01610 
01611 >   class FillMappingAttribute : public AttributeValue
01612 
01613     Author:     Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
01614     Created:    18/07/94
01615     Purpose:    Specifies how a fill graduation behaves, e.g. linear, sinusoidal and
01616                 so on.
01617     SeeAlso:    FillFunctionLinearAttribute; FillFunctionSinAttribute
01618 
01619 ********************************************************************************************/
01620 
01621 class FillMappingAttribute : public AttributeValue
01622 {
01623     CC_DECLARE_DYNCREATE(FillMappingAttribute)
01624 public:
01625     FillMappingAttribute();
01626 
01627     virtual void Restore(RenderRegion *, BOOL);
01628     virtual void Render(RenderRegion *, BOOL Temp = FALSE);
01629     virtual void SimpleCopy(AttributeValue *);
01630     static BOOL Init();
01631 
01632     virtual BOOL IsDifferent(AttributeValue*);
01633     virtual FillMappingAttribute& operator=(FillMappingAttribute& Attrib);
01634     virtual INT32 operator==(const FillMappingAttribute& Attrib);
01635 
01636     INT32 Repeat;
01637 };
01638 
01639 /********************************************************************************************
01640 
01641 >   class FillMappingLinearAttribute : public FillMappingAttribute
01642 
01643     Author:     Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
01644     Created:    18/07/94
01645     Purpose:    Specifies a linear fill mapping for a filled object.  This is used for
01646                 normal graduated fills.
01647     SeeAlso:    FillMappingAttribute
01648 
01649 ********************************************************************************************/
01650 
01651 class FillMappingLinearAttribute : public FillMappingAttribute
01652 {
01653     CC_DECLARE_DYNCREATE(FillMappingLinearAttribute)
01654 public:
01655     FillMappingLinearAttribute() : FillMappingAttribute() {}
01656 
01657     virtual NodeAttribute *MakeNode();
01658 };
01659 
01660 /********************************************************************************************
01661 
01662 >   class FillMappingSinAttribute : public FillMappingAttribute
01663 
01664     Author:     Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
01665     Created:    18/07/94
01666     Purpose:    Specifies a sinusoidal fill mapping for a filled object.  i.e. the graduation
01667                 sort of wibbles from one colour to another in a sort of whirly sinusoidal
01668                 fashion.
01669     SeeAlso:    FillMappingAttribute
01670 
01671 ********************************************************************************************/
01672 
01673 class FillMappingSinAttribute : public FillMappingAttribute
01674 {
01675     CC_DECLARE_DYNCREATE(FillMappingSinAttribute)
01676 public:
01677     FillMappingSinAttribute() : FillMappingAttribute() {}
01678 
01679     virtual NodeAttribute *MakeNode();
01680 };
01681 
01682 
01683 /********************************************************************************************
01684 
01685 >   class FillEffectAttribute : public AttributeValue
01686 
01687     Author:     Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
01688     Created:    18/07/94
01689     Purpose:    Specifies the fill 'effect', i.e. how it passes from one colour to another.
01690                 e.g. fade, rainbow, alternate rainbow
01691     SeeAlso:    AttributeValue
01692 
01693 ********************************************************************************************/
01694 
01695 class FillEffectAttribute : public AttributeValue
01696 {
01697     CC_DECLARE_DYNCREATE(FillEffectAttribute)
01698 public:
01699     virtual void Restore(RenderRegion *, BOOL);
01700     virtual void Render(RenderRegion *, BOOL Temp = FALSE);
01701     virtual void SimpleCopy(AttributeValue *);
01702     static BOOL Init();
01703 
01704     virtual BOOL IsDifferent(AttributeValue*);
01705     virtual FillEffectAttribute& operator=(FillEffectAttribute& Attrib);
01706     virtual INT32 operator==(const FillEffectAttribute& Attrib);
01707 };
01708 
01709 
01710 /********************************************************************************************
01711 
01712 >   class FillEffectFadeAttribute : public FillEffectAttribute
01713 
01714     Author:     Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
01715     Created:    18/07/94
01716     Purpose:    Specifies a 'fade' graduation for fills, i.e. a simple fade in RGB space.
01717     SeeAlso:    FillEffectAttribute.
01718 
01719 ********************************************************************************************/
01720 
01721 class FillEffectFadeAttribute : public FillEffectAttribute
01722 {
01723     CC_DECLARE_DYNCREATE(FillEffectFadeAttribute)
01724 public:
01725     virtual NodeAttribute *MakeNode();
01726 };
01727 
01728 
01729 /********************************************************************************************
01730 
01731 >   class FillEffectRainbowAttribute : public FillEffectAttribute
01732 
01733     Author:     Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
01734     Created:    18/07/94
01735     Purpose:    Specifies a 'rainbow' graduation for fills, i.e. a fade through the HSV
01736                 cone.
01737     SeeAlso:    FillEffectAttribute
01738 
01739 ********************************************************************************************/
01740 
01741 class FillEffectRainbowAttribute : public FillEffectAttribute
01742 {
01743     CC_DECLARE_DYNCREATE(FillEffectRainbowAttribute)
01744 public:
01745     virtual NodeAttribute *MakeNode();
01746 };
01747 
01748 
01749 /********************************************************************************************
01750 
01751 >   class FillEffectAltRainbowAttribute : public FillEffectAttribute
01752 
01753     Author:     Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
01754     Created:    18/07/94
01755     Purpose:    Specifies an 'alternate rainbow' graduation for fills, i.e. the same as
01756                 a FillEffectRainbowAttribute, but it goes around the HSV cone in the
01757                 opposite direction.
01758     SeeAlso:    FillEffectAttribute
01759 
01760 ********************************************************************************************/
01761 
01762 class FillEffectAltRainbowAttribute : public FillEffectAttribute
01763 {
01764     CC_DECLARE_DYNCREATE(FillEffectAltRainbowAttribute)
01765 public:
01766     virtual NodeAttribute *MakeNode();
01767 };
01768 
01769 /********************************************************************************************
01770 
01771 >   class FillTranpsMappingAttribute : public AttributeValue
01772 
01773     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
01774     Created:    23/8/94
01775     Purpose:    Specifies how a fill graduation behaves, e.g. linear, sinusoidal and
01776                 so on.
01777     SeeAlso:    FillFunctionLinearAttribute; FillFunctionSinAttribute
01778 
01779 ********************************************************************************************/
01780 
01781 class TranspFillMappingAttribute : public AttributeValue
01782 {
01783     CC_DECLARE_DYNCREATE(TranspFillMappingAttribute)
01784 public:
01785     TranspFillMappingAttribute();
01786 
01787     virtual void Restore(RenderRegion *, BOOL);
01788     virtual void Render(RenderRegion *, BOOL Temp = FALSE);
01789     virtual void SimpleCopy(AttributeValue *);
01790     static BOOL Init();
01791 
01792     virtual FillMappingAttribute *MakeSimilarNonTranspFillMapping(void);
01793 
01794     virtual BOOL IsDifferent(AttributeValue*);
01795     virtual TranspFillMappingAttribute& operator=(TranspFillMappingAttribute& Attrib);
01796     virtual INT32 operator==(const TranspFillMappingAttribute& Attrib);
01797 
01798     INT32 Repeat;
01799 };
01800 
01801 /********************************************************************************************
01802 
01803 >   class TranspFillMappingLinearAttribute : public TranspFillMappingAttribute
01804 
01805     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
01806     Created:    23/8/94
01807     Purpose:    Specifies a linear fill mapping for a filled object.  This is used for
01808                 normal graduated fills.
01809     SeeAlso:    TranspFillMappingAttribute
01810 
01811 ********************************************************************************************/
01812 
01813 class TranspFillMappingLinearAttribute : public TranspFillMappingAttribute
01814 {
01815     CC_DECLARE_DYNCREATE(TranspFillMappingLinearAttribute)
01816 public:
01817     TranspFillMappingLinearAttribute() : TranspFillMappingAttribute() {}
01818 
01819     virtual FillMappingAttribute *MakeSimilarNonTranspFillMapping(void);
01820 
01821     virtual NodeAttribute *MakeNode();
01822 };
01823 
01824 /********************************************************************************************
01825 
01826 >   class TranspFillMappingSinAttribute : public TranspFillMappingAttribute
01827 
01828     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
01829     Created:    23/8/94
01830     Purpose:    Specifies a sinusoidal fill mapping for a filled object.  i.e. the graduation
01831                 sort of wibbles from one colour to another in a sort of whirly sinusoidal
01832                 fashion.
01833     SeeAlso:    TranspFillMappingAttribute
01834 
01835 ********************************************************************************************/
01836 
01837 class TranspFillMappingSinAttribute : public TranspFillMappingAttribute
01838 {
01839     CC_DECLARE_DYNCREATE(TranspFillMappingSinAttribute)
01840 public:
01841     TranspFillMappingSinAttribute() : TranspFillMappingAttribute() {}
01842 
01843     virtual FillMappingAttribute *MakeSimilarNonTranspFillMapping(void);
01844 
01845     virtual NodeAttribute *MakeNode();
01846 };
01847 
01848 /********************************************************************************************
01849 
01850 >   class StrokeColourAttribute : public ColourFillAttribute
01851 
01852     Author:     Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
01853     Created:    15/06/94
01854     Purpose:    Represent a colour for a stroke, as opposed to a fill.
01855                 Implementation is very similar (identical!) to the FillColourAttribute
01856                 class.
01857     SeeAlso:    AttributeValue
01858 
01859 ********************************************************************************************/
01860 
01861 class StrokeColourAttribute : public ColourFillAttribute
01862 {
01863     CC_DECLARE_DYNCREATE(StrokeColourAttribute)
01864 public:
01865     StrokeColourAttribute() {}
01866     StrokeColourAttribute(DocColour& NewColour);
01867     virtual NodeAttribute *MakeNode();
01868     virtual void Restore(RenderRegion *, BOOL);
01869     virtual void Render(RenderRegion *, BOOL Temp = FALSE);
01870     virtual void SimpleCopy(AttributeValue *);
01871 
01872     static BOOL Init();
01873 };
01874 
01875 /********************************************************************************************
01876 
01877 >   class StrokeTranspAttribute : public TranspFillAttribute
01878 
01879     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
01880     Created:    30/11/94
01881     Purpose:    Represent the transparency of a stroke, as opposed to a fill.
01882                 Implementation is very similar (identical!) to the FillTranspAttribute
01883                 class.
01884     SeeAlso:    AttributeValue
01885 
01886 ********************************************************************************************/
01887 
01888 class StrokeTranspAttribute : public TranspFillAttribute
01889 {
01890     CC_DECLARE_DYNCREATE(StrokeTranspAttribute)
01891 public:
01892     StrokeTranspAttribute() {}
01893     StrokeTranspAttribute(UINT32 NewTransp);
01894     virtual NodeAttribute *MakeNode();
01895     virtual void Restore(RenderRegion *, BOOL);
01896     virtual void Render(RenderRegion *, BOOL Temp = FALSE);
01897     virtual void SimpleCopy(AttributeValue *);
01898 
01899     BOOL Blend(BlendAttrParam*);
01900 
01901     static BOOL Init();
01902 };
01903 
01904 /********************************************************************************************
01905 
01906 >   class MouldAttribute : public AttributeValue
01907 
01908     Author:     Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
01909     Created:    13/03/95
01910     Purpose:    Specifies wether the attributes are moulded or not.
01911     SeeAlso:    AttributeValue
01912 
01913 ********************************************************************************************/
01914 
01915 class MouldAttribute : public AttributeValue
01916 {
01917     CC_DECLARE_DYNCREATE(MouldAttribute)
01918 public:
01919     MouldAttribute();
01920     MouldAttribute(NodeMould* pMould, MouldGeometry* pMouldShape);
01921 
01922     virtual NodeAttribute *MakeNode();
01923     virtual void Restore(RenderRegion *, BOOL);
01924     virtual void Render(RenderRegion *, BOOL Temp = FALSE);
01925     virtual void SimpleCopy(AttributeValue *);
01926 
01927     static BOOL Init();
01928 
01929     MouldGeometry* GetMouldShape() { return pMouldShape; }
01930     void SetMouldShape(MouldGeometry*);
01931 
01932     BOOL IsPerspective() { return IsPerspectiveMould; } 
01933 
01934     NodeMould* GetParentMould() { return pParentMould; }
01935     void SetParentMould(NodeMould*);
01936 
01937 protected:
01938     MouldGeometry* pMouldShape;
01939     BOOL IsPerspectiveMould : 1;
01940 
01941     NodeMould* pParentMould;
01942 };
01943 
01944 #endif  // INC_FILLVAL

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