brshdata.cpp

Go to the documentation of this file.
00001 // $Id: brshdata.cpp 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 
00100 #include "camtypes.h"
00101 #include "brshdata.h"
00102 
00103 DECLARE_SOURCE("$Revision: 751 $");
00104 
00105 
00106 /***********************************************************************************************
00107 
00108 >   BrushData::BrushData()
00109 
00110     Author:     Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
00111     Created:    2/3/2000
00112 
00113     Purpose:    Constructor
00114 
00115 ***********************************************************************************************/
00116 BrushData::BrushData()
00117 {
00118     m_BrushHandle           = BrushHandle_NoBrush;
00119 
00120     m_BrushSpacing          = 10000;
00121     m_BrushSpacingIncrProp  = 1.0; 
00122     m_BrushSpacingIncrConst = 0;
00123     m_BrushSpacingMaxRand   = 0;
00124     m_BrushSpacingRandSeed  = 0;
00125     
00126     m_bTile                 = TRUE;
00127     m_bRotate               = FALSE;
00128     m_RotateAngle           = 0.0;
00129     m_RotAngleIncrConst     = 0;
00130     m_RotAngleIncrProp      = 1.0;
00131     m_RotationMaxRand       = 0;    
00132     m_RotationRandSeed      = 0; 
00133     m_RotationMaxPressure       = 0;
00134 
00135     m_PathOffsetType        = OFFSET_NONE;  
00136     m_PathOffsetValue       = 0;
00137     m_PathOffsetIncrProp    = 1.0;
00138     m_PathOffsetIncrConst   = 0;
00139     m_OffsetTypeRandSeed    = 0;
00140     
00141     m_OffsetValueMaxRand    = 0;
00142     m_OffsetValueRandSeed   = 0;
00143     
00144     m_BrushScaling          = 1.0;
00145     m_BrushScalingIncr      = 1.0;
00146     m_BrushScalingIncrConst = 0.0;
00147     m_BrushScalingMaxRand   = 0;
00148     m_BrushScalingRandSeed  = 0;
00149     
00150     m_SequenceType          = SEQ_FORWARD;
00151     m_SequenceRandSeed      = 0;
00152 
00153     m_LineWidth             = -1;
00154 
00155     m_bUseLocalFillColour   = FALSE;
00156     m_bUseLocalTransp       = FALSE;
00157     m_bUseNamedColour       = TRUE;
00158     m_bTimeStampBrushes     = FALSE;
00159     m_TimeStampPeriod       = 0;
00160 
00161     m_BrushTransparency     = -1;
00162     m_TranspMaxPressure     = 0;
00163 
00164 }
00165 
00166 
00167 /***********************************************************************************************
00168 
00169 >   BrushData::BrushData(BrushData Other)
00170 
00171     Author:     Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
00172     Created:    2/3/2000
00173 
00174     Purpose:    copy Constructor
00175 
00176 ***********************************************************************************************/
00177 
00178 BrushData::BrushData(const BrushData &Other)
00179 {
00180     this->operator =(Other);
00181 }
00182 
00183 /***********************************************************************************************
00184 
00185 >   BrushData::operator=(BrushData Other)
00186 
00187     Author:     Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
00188     Created:    2/3/2000
00189 
00190     Purpose:    assignment operator
00191 
00192 ***********************************************************************************************/
00193 
00194 const BrushData& BrushData::operator =(const BrushData& Other)
00195 {
00196     m_Name                  = Other.m_Name;
00197     m_BrushHandle           = Other.m_BrushHandle;
00198 
00199     m_BrushSpacing          = Other.m_BrushSpacing;
00200     m_BrushSpacingIncrProp  = Other.m_BrushSpacingIncrProp;
00201     m_BrushSpacingIncrConst = Other.m_BrushSpacingIncrConst;
00202     m_BrushSpacingMaxRand   = Other.m_BrushSpacingMaxRand;
00203     m_BrushSpacingRandSeed  = Other.m_BrushSpacingRandSeed;
00204     
00205     m_bTile                 = Other.m_bTile;
00206     m_bRotate               = Other.m_bRotate;
00207     m_RotateAngle           = Other.m_RotateAngle;
00208     m_RotAngleIncrProp      = Other.m_RotAngleIncrProp;
00209     m_RotAngleIncrConst     = Other.m_RotAngleIncrConst;
00210     m_RotationMaxRand       = Other.m_RotationMaxRand;  
00211     m_RotationRandSeed      = Other.m_RotationRandSeed;
00212     m_RotationMaxPressure   = Other.m_RotationMaxPressure;
00213 
00214     m_PathOffsetType        = Other.m_PathOffsetType; 
00215     m_PathOffsetValue       = Other.m_PathOffsetValue;
00216     m_PathOffsetIncrProp    = Other.m_PathOffsetIncrProp;
00217     m_PathOffsetIncrConst   = Other.m_PathOffsetIncrConst;
00218     m_OffsetTypeRandSeed    = Other.m_OffsetTypeRandSeed;
00219     
00220     m_OffsetValueMaxRand    = Other.m_OffsetValueMaxRand;
00221     m_OffsetValueRandSeed   = Other.m_OffsetValueRandSeed;
00222     
00223     m_BrushScaling          = Other.m_BrushScaling;
00224     m_BrushScalingIncr      = Other.m_BrushScalingIncr;
00225     m_BrushScalingIncrConst = Other.m_BrushScalingIncrConst;
00226     m_BrushScalingMaxRand   = Other.m_BrushScalingMaxRand;
00227     m_BrushScalingRandSeed  = Other.m_BrushScalingRandSeed;
00228     m_ScalingMaxPressure    = Other.m_ScalingMaxPressure;
00229     
00230     m_SequenceType          = Other.m_SequenceType;
00231     m_SequenceRandSeed      = Other.m_SequenceRandSeed;
00232 
00233     m_LineWidth             = Other.m_LineWidth;
00234 
00235     m_bUseLocalFillColour   = Other.m_bUseLocalFillColour;
00236     m_bUseLocalTransp       = Other.m_bUseLocalTransp;
00237     m_bUseNamedColour       = Other.m_bUseNamedColour;
00238     m_bTimeStampBrushes     = Other.m_bTimeStampBrushes;
00239     m_TimeStampPeriod       = Other.m_TimeStampPeriod;
00240 
00241     m_BrushSatIncrement     = Other.m_BrushSatIncrement;
00242     m_BrushSatMaxRand       = Other.m_BrushSatMaxRand;
00243     m_BrushSatRandSeed      = Other.m_BrushSatRandSeed;
00244     m_BrushHueIncrement     = Other.m_BrushHueIncrement;
00245     m_BrushHueMaxRand       = Other.m_BrushHueMaxRand;
00246     m_BrushHueRandSeed      = Other.m_BrushHueRandSeed;
00247 
00248     m_BrushTransparency     = Other.m_BrushTransparency;
00249     m_TranspMaxPressure     = Other.m_TranspMaxPressure;
00250 
00251     return *this;
00252 }
00253 
00254 /***********************************************************************************************
00255 
00256 >   BOOL BrushData::operator ==(const BrushData& Other)
00257 
00258     Author:     Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
00259     Created:    2/3/2000
00260 
00261     Purpose:    equality operator
00262 
00263 ***********************************************************************************************/
00264 
00265 BOOL BrushData::operator ==(const BrushData& Other)
00266 {
00267     if (
00268         m_Name                  != Other.m_Name ||
00269         m_BrushHandle           != Other.m_BrushHandle ||
00270 
00271         m_BrushSpacing          != Other.m_BrushSpacing ||
00272         m_BrushSpacingIncrProp  != Other.m_BrushSpacingIncrProp ||
00273         m_BrushSpacingIncrConst != Other.m_BrushSpacingIncrConst ||
00274         m_BrushSpacingMaxRand   != Other.m_BrushSpacingMaxRand ||
00275         m_BrushSpacingRandSeed  != Other.m_BrushSpacingRandSeed ||
00276         
00277         m_bTile                 != Other.m_bTile ||
00278         m_bRotate               != Other.m_bRotate ||
00279         m_RotateAngle           != Other.m_RotateAngle ||
00280         m_RotAngleIncrProp      != Other.m_RotAngleIncrProp ||
00281         m_RotAngleIncrConst     != Other.m_RotAngleIncrConst ||
00282         m_RotationMaxRand       != Other.m_RotationMaxRand ||   
00283         m_RotationRandSeed      != Other.m_RotationRandSeed ||
00284         m_RotationMaxPressure   != Other.m_RotationMaxPressure ||
00285 
00286         m_PathOffsetType        != Other.m_PathOffsetType || 
00287         m_PathOffsetValue       != Other.m_PathOffsetValue ||
00288         m_PathOffsetIncrProp    != Other.m_PathOffsetIncrProp ||
00289         m_PathOffsetIncrConst   != Other.m_PathOffsetIncrConst ||
00290         m_OffsetTypeRandSeed    != Other.m_OffsetTypeRandSeed ||
00291         
00292         m_OffsetValueMaxRand    != Other.m_OffsetValueMaxRand ||
00293         m_OffsetValueRandSeed   != Other.m_OffsetValueRandSeed ||
00294         
00295         m_BrushScaling          != Other.m_BrushScaling ||
00296         m_BrushScalingIncr      != Other.m_BrushScalingIncr ||
00297         m_BrushScalingIncrConst != Other.m_BrushScalingIncrConst ||
00298         m_BrushScalingMaxRand   != Other.m_BrushScalingMaxRand ||
00299         m_BrushScalingRandSeed  != Other.m_BrushScalingRandSeed ||
00300         m_ScalingMaxPressure    != Other.m_ScalingMaxPressure ||
00301         
00302         m_SequenceType          != Other.m_SequenceType ||
00303         m_SequenceRandSeed      != Other.m_SequenceRandSeed ||
00304 
00305         m_LineWidth             != Other.m_LineWidth ||
00306 
00307         m_bUseLocalFillColour   != Other.m_bUseLocalFillColour ||
00308         m_bUseLocalTransp       != Other.m_bUseLocalTransp ||
00309         m_bUseNamedColour       != Other.m_bUseNamedColour ||
00310         m_bTimeStampBrushes     != Other.m_bTimeStampBrushes ||
00311         m_TimeStampPeriod       != Other.m_TimeStampPeriod ||
00312 
00313         m_BrushSatIncrement     != Other.m_BrushSatIncrement ||
00314         m_BrushSatMaxRand       != Other.m_BrushSatMaxRand ||
00315         m_BrushSatRandSeed      != Other.m_BrushSatRandSeed ||
00316         m_BrushHueIncrement     != Other.m_BrushHueIncrement ||
00317         m_BrushHueMaxRand       != Other.m_BrushHueMaxRand ||
00318         m_BrushHueRandSeed      != Other.m_BrushHueRandSeed ||
00319 
00320         m_BrushTransparency     != Other.m_BrushTransparency ||
00321         m_TranspMaxPressure     != Other.m_TranspMaxPressure
00322         )
00323         return FALSE;
00324     else
00325         return TRUE;
00326 }

Generated on Sat Nov 10 03:44:32 2007 for Camelot by  doxygen 1.4.4