brshdata.h

Go to the documentation of this file.
00001 // $Id: brshdata.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 // object containing the data that control the brush
00100 
00101 #ifndef BRUSHDATA_H
00102 #define BRUSHDATA_H
00103 
00104 #include "brshcomp.h"
00105 
00106 class CCObject;
00107 
00108 /***********************************************************************************************
00109 
00110 >   class BrushData : public CCObject
00111 
00112     Author:     Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
00113     Created:    2/3/2000
00114 
00115     Purpose:    A repository for all kinds of data that the brush uses.  More of a struct than
00116                 a class at the moment
00117 
00118 ***********************************************************************************************/
00119 
00120 class BrushData: public CCObject
00121 {
00122 public:
00123     BrushData();
00124     BrushData(const BrushData& Other);
00125 
00126     const BrushData& operator=(const BrushData& Other);
00127     BOOL operator==(const BrushData& Other);
00128 public: // all data is public right now
00129     
00130     String_32           m_Name; // the name
00131 
00132     BrushHandle         m_BrushHandle; // identifies which brush definition to use
00133 
00134     MILLIPOINT          m_BrushSpacing;  // the basic spacing along the path
00135                         // edit field title - Brush spcaing
00136     
00137     double              m_BrushSpacingIncrProp; // the proportional spacing increment
00138                         // edit title = proportional increase. Note this can never be negative and defaults to 1.0
00139 
00140     MILLIPOINT          m_BrushSpacingIncrConst; // the constant spacing increment
00141                         // title = constant increase, defaults to 0
00142 
00143     UINT32              m_BrushSpacingMaxRand; // the upper bound for spacing randomness    
00144                         // title ~ maximum random effect (%) defaults to 0, maybe use a slider?
00145 
00146     UINT32              m_BrushSpacingRandSeed; // the random seed for spacing
00147                         // NO EDIT FIELD for random seeds, however need a 'Generate new random sequence' button will be needed
00148 
00149     BOOL                m_bTile;  // do we tile the fill attribute? - radio/tick box
00150     BOOL                m_bRotate; //rotate tangentially to the path, perhaps Tangent is better title, or rotate along path
00151     double              m_RotateAngle;  // edit field - rotation angle
00152     double              m_RotAngleIncrConst;
00153     double              m_RotAngleIncrProp;
00154     UINT32              m_RotationMaxRand; // maximum randomness effect
00155     UINT32              m_RotationRandSeed; 
00156     UINT32              m_RotationMaxPressure;
00157 
00158     PathOffset          m_PathOffsetType;  // the type of offset pattern (see enum in brshcomp.h)
00159                         /* This can take the following types:
00160                         OFFSET_NONE,
00161                         OFFSET_ALTERNATE,
00162                         OFFSET_LEFT,
00163                         OFFSET_RIGHT,
00164                         OFFSET_RANDOM
00165                         */
00166 
00167     MILLIPOINT          m_PathOffsetValue; // size of the offset, maybe call it offset amount?
00168     
00169     double              m_PathOffsetIncrProp; // proportional offset increment
00170                         // offset proportional increase
00171 
00172     MILLIPOINT          m_PathOffsetIncrConst; // Constant offset increment
00173                         // offset constant increase
00174     UINT32              m_OffsetTypeRandSeed;  
00175     UINT32              m_OffsetValueMaxRand; // maximum random offset value
00176     UINT32              m_OffsetValueRandSeed;
00177     
00178     double              m_BrushScaling;    // how much to scale the objects by
00179                         // edit title - object scaling, defaults to 1.0
00180 
00181     double              m_BrushScalingIncr; // the scaling increment
00182                         // we only have a proportional scaling increment
00183 
00184     double              m_BrushScalingIncrConst; // now we have an all-new fixed increment
00185 
00186     UINT32              m_BrushScalingMaxRand; // the upper bound for scaling randomness    
00187                         // maximum random effect on scaling, could maybe ues a slider for this
00188 
00189     UINT32              m_BrushScalingRandSeed; // the random seed for scaling
00190     
00191     UINT32              m_ScalingMaxPressure;   // the extent to which pressure affects scaling
00192 
00193     SequenceType        m_SequenceType;     // the type of sequence (if we have > 1 ink object)
00194                         /* this is for brushes with multiple objects - the following sequence types are available:
00195                         SEQ_FORWARD,
00196                         SEQ_BACKWARD,
00197                         SEQ_MIRROR,
00198                         SEQ_RANDOM
00199                         */
00200     
00201     UINT32              m_SequenceRandSeed; // if we have a random sequence this is the seed
00202                         // need a 'regenerate random sequence' button                   
00203 
00204     MILLIPOINT          m_LineWidth;   // the line width of the path we are processing
00205                         // not sure if we want to include this in the dialog?
00206     
00207     BOOL                m_bUseLocalFillColour;
00208     BOOL                m_bUseLocalTransp;
00209     BOOL                m_bUseNamedColour;
00210 
00211     BOOL                m_bTimeStampBrushes;  // are we using timestamping
00212                         // not quite sure what to call this, but its a tick/radio
00213     UINT32              m_TimeStampPeriod; // in milliseconds, the time before another object is rendered
00214                         // this field should only be available is m_bTimeStampBrushes is TRUE, likewise if it
00215                         // is true then the Spacing options should be greyed out.
00216                         // Note also that editing this field can not be performed on existing brushes in the selection
00217 
00218     double              m_BrushHueIncrement;  // the amount that the hue increases/decreases each time
00219     UINT32              m_BrushHueMaxRand;    // the maximum random amount of hue
00220     UINT32              m_BrushHueRandSeed;
00221 
00222     double              m_BrushSatIncrement;  // as above but for saturation
00223     UINT32              m_BrushSatMaxRand;
00224     UINT32              m_BrushSatRandSeed;
00225 
00226     INT32               m_BrushTransparency;
00227     UINT32              m_TranspMaxPressure;
00228 
00229     /* Possible extra things we might have:
00230     UINT32              ScalingMaxPressure;
00231     UINT32              SpacingMaxPressure;
00232     
00233     UINT32              TimeStampingMaxPressure;
00234     UINT32              OffsetMaxPressure;
00235 
00236     UINT32              ColourMaxRand;
00237     UINT32              ColourMaxPressure;
00238     */
00239 };
00240 
00241 #endif

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