BrushDefinition Class Reference

Stores a vector Brush definition A static list of these items is held in the BrushComponent. More...

#include <brshcomp.h>

Inheritance diagram for BrushDefinition:

LineDefinition CCObject SimpleCCObject BlendedBrushDefinition List of all members.

Public Member Functions

 BrushDefinition ()
 Default constructor for the purposes of inherited classes, if you just want a normal brushdef you should really use the constructor above.
 BrushDefinition (Node *pBrushTree)
 Constructor.
 ~BrushDefinition ()
 Destructor.
BOOL GenerateBrush ()
 goes through the input spread and calls AddNewObject() for each ink object found We try to make some intelligent guesses about what to set the starting spacing and offset values depending on the nature of the nodes. The following rules apply:
  • if there are multiple ink objects then the spacing is 1.1 * the largest dimension of the largest bounding box
  • if there is only one object and it contains a positive line width spacing is as above
  • if there is only one object with no line width then spacing is 10000 millipoint
  • defaulf offset is always the largest dimension of the largest BBOX.

BOOL RegenerateBrush ()
 This function deletes the existing brushrefs and recreates them from scratch from m_pTree.
BOOL IsActivated ()
 To see if this definition was initialised ok or if it was subsequently deactivated for some reason.
void SetActivated (BOOL Value)
 To set this definition activated or not.
BOOL StartRender ()
 Basically due to imprecision in the arithmetic system we ended up corrupting the brush data if we used it too much. So to get around this we never transform the original brush data, instead we make copies of it each time we want to render a version of this brush. This function generates the data copies that we need to render this brush, make sure you call StopRender() to get rid of them.
void StopRender ()
 Call this when you have finished rendering a node with this brush, it deletes the copied data that we used for rendering.
BOOL IsDifferent (LineDefinition *pOther)
 Determine if 2 BrushDefinitions are considered different. Used when adding Brushes to the global list, so that like Brushes can be merged.
BOOL AreBrushParametersIdentical (BrushDefinition *pOther)
 Compares the member variables of the two brushes.
BrushDefinitionCopy ()
 Makes a copy of this definition, inknodes and all.
BOOL CopyInkTreeToClipboard ()
 copies the ink objects of this brush definition to the clipboard so they can be used elsewhere
BOOL UsesPressure ()
 as above
MILLIPOINT GetSpacing ()
 As above.
BOOL SetSpacing (MILLIPOINT Spacing)
 To set the spacing between brush objects.
BOOL SetSpacingIncrProp (double Incr)
 To set the proportional spacing increment between brush objects.
double GetSpacingIncrProp ()
 As above.
BOOL SetSpacingIncrConst (MILLIPOINT Incr)
 To set the proportional spacing increment between brush objects.
MILLIPOINT GetSpacingIncrConst ()
 As above.
UINT32 GetSpacingMaxRand ()
 As above.
BOOL SetSpacingMaxRand (UINT32 Value)
 As above.
UINT32 GetSpacingRandSeed ()
 As above.
void SetSpacingRandSeed (UINT32 Seed)
 As above.
PathOffset GetPathOffsetType ()
 as above
MILLIPOINT GetPathOffsetValue ()
 as above
void SetPathOffsetType (PathOffset Offset)
 to set the offset type for this brush
void SetPathOffsetValue (MILLIPOINT Value)
 to set the offset distance for this brush
BOOL SetPathOffsetIncrProp (double Incr)
 to set the offset distance for this brush
double GetPathOffsetIncrProp ()
 as above
BOOL SetPathOffsetIncrConst (MILLIPOINT Incr)
 to set the offset distance for this brush
MILLIPOINT GetPathOffsetIncrConst ()
 as above
UINT32 GetOffsetTypeRandSeed ()
 As above.
void SetOffsetTypeRandSeed (UINT32 Seed)
 As above.
UINT32 GetOffsetValueMaxRand ()
 As above.
BOOL SetOffsetValueMaxRand (UINT32 Seed)
 As above.
UINT32 GetOffsetValueRandSeed ()
 As above.
void SetOffsetValueRandSeed (UINT32 Seed)
 As above.
void SetTiling (BOOL Value)
 as above
BOOL IsTiled ()
 as above
BOOL SetRotationAngle (double Angle)
 as above
double GetRotationAngle ()
 as above
double GetRotationIncrConst ()
 as above
BOOL SetRotationIncrConst (double Value)
 as above
double GetRotationIncrProp ()
 as above
BOOL SetRotationIncrProp (double Value)
 as above
void SetRotated (BOOL Value)
 as above
BOOL IsRotated ()
 as above
UINT32 GetRotationMaxRand ()
 as above
BOOL SetRotationMaxRand (UINT32 Value)
 as above
UINT32 GetRotationRandSeed ()
 as above
void SetRotationRandSeed (UINT32 Seed)
 as above
UINT32 GetRotationMaxPressure ()
 as above
BOOL SetRotationMaxPressure (UINT32 Pressure)
 as above
double GetBrushScaling ()
 as above
BOOL SetBrushScaling (double Scale)
 to set the member that determine to what scale of the original object each brush object is drawn
double GetBrushScalingIncr ()
 as above
BOOL SetBrushScalingIncr (double Incr)
 to set the member that determine the increment to scaling applied to each brush object
double GetBrushScalingIncrConst ()
 as above
BOOL SetBrushScalingIncrConst (double Incr)
 to set the member that determine the increment to scaling applied to each brush object
UINT32 GetScalingMaxRand ()
 As above.
BOOL SetScalingMaxRand (UINT32 Value)
 As above.
UINT32 GetScalingRandSeed ()
 As above.
void SetScalingRandSeed (UINT32 Seed)
 As above.
UINT32 GetScalingMaxPressure ()
 As above.
BOOL SetScalingMaxPressure (UINT32 Pressure)
 As above.
double GetHueIncrement ()
 as above
BOOL SetHueIncrement (double Incr)
 as above
UINT32 GetHueMaxRand ()
 as above
BOOL SetHueMaxRand (UINT32 Max)
 as above
UINT32 GetHueRandSeed ()
 as above
BOOL SetHueRandSeed (UINT32 Seed)
 as above
double GetSatIncrement ()
 as above
BOOL SetSatIncrement (double Incr)
 as above
UINT32 GetSatMaxRand ()
 as above
BOOL SetSatMaxRand (UINT32 Max)
 as above
UINT32 GetSatRandSeed ()
 as above
BOOL SetSatRandSeed (UINT32 Seed)
 as above
SequenceType GetSequenceType ()
 as above
void SetSequenceType (SequenceType Type)
 as above
UINT32 GetSequenceSeed ()
 as above
void SetSequenceSeed (UINT32 Seed)
 as above
double GetTimeStampingPeriod ()
 as above
BOOL SetTimeStampingPeriod (double Period)
 as above
INT32 GetBrushTransparency ()
 as above
BOOL SetBrushTransparency (INT32 Value)
 as above
UINT32 GetTransparencyPressure ()
 Sets the extent to which pressure affects transparency.
BOOL SetTransparencyPressure (UINT32 Value)
 Sets the extent to which pressure affects transparency.
UINT32 GetNumBrushObjects () const
 as above
DocRect GetLargestBoundingBox ()
 as above
DocRect GetLargestPossibleRect (BOOL AdjustForLineWidth=FALSE)
 To find out the largest possible bounding box that this brush can achieve, this we get the largest ink rect and then perform the maximum scaling, rotation etc. Note that ScalingIncrConst will be will be excluded from this test as we will never be able to know what affect it will have in advance of drawing the path.
MILLIPOINT GetDefaultLineWidth (BOOL IgnorePressure=FALSE)
 as above
BrushRefGetFirstBrushRef ()
 as above
BrushRefGetNextBrushRef ()
 as above
BrushRefGetBrushRef (UINT32 Index)
 as above
void CalculateMaxScaling ()
 Calculates the maximum scaling value possible by dividing the maximum size value by the longest side of the bounding rect of the largest object.
double GetMaxScaling ()
 as above
void CopyDataToProcessor (PathProcessorBrush *pPathProc)
 To copy all of the numeric data about this brush to a path processor.
BOOL BrushContainsGroup ()
 as above
UINT32 GetBrushFileID ()
 as above
void SetBrushFileID (UINT32 ID)
 as above, this should only be called as part of the start-up process.
BOOL ExportBrush (BaseCamelotFilter *pFilter, const BrushHandle Handle)
 To export a Brush definition.
void InitialiseBrushData (BrushData *pData)
 retrieves data from the path processor and puts it into our brushdata object
BrushDataGetBrushData ()
 gets the latest data from our path processor, copies it into our BrushData object which is then returned. Note that you are responsible for deleting this object.
void SetMembersFromData (BrushData Data)
 gets the latest data from our path processor, copies it into our BrushData object which is then returned. Note that you are responsible for deleting this object.

Static Public Member Functions

static BOOL ObjectCanCreateBrush (NodeRenderableInk *pObject)
 To determine if this ink node can be made into a brush, currently returns TRUE for except for bevels, shadows, and contours, which are too damn awkward.

Protected Member Functions

BOOL PreExportSubTree ()
 To perform various functions just prior to saving the subtree of the brush definition. The function loops through the BrushRefs, finding the blendpaths of each and transforming their attribute maps back to the position that they were in when the brush was created.
BOOL PostExportSubTree ()
 To perform various functions just prior to saving the subtree of the brush definition. The function loops through the BrushRefs, finding the blendpaths of each and undoes the transformation performed by PreExportSubTree. This is required because to continue using the brush in our current document we want to use its current position.
BOOL AddNewObject (NodeRenderableInk *pNode)
 creates a brushref object from the inknode and its attributes, then adds the brushref to the member array
BOOL ReplaceBrushWithGroup (NodeRenderableInk *pInk, NodeGroup **ppGroup)
 We are no longer allowed to make brushes from brushes, because of problems when saving and loading. Instead if we have a brush then we will convert it to shapes and use those instead.
void ResetMembers ()
 Initialises the member variables.
void InitialiseBrushArray (UINT32 NumObjects)
 Clears out the m_BrushRefPtrArray if it is not empty, and sets the size.
UINT32 GetFirstRandomNumber (UINT32 Seed=0)
 Seeds srand with either the seed supplied or by using time (i.e. a random seed).
UINT32 GetNextRandomNumber ()
 as above, note that you MUST have already called GetFirstRandomNumber()

Protected Attributes

MILLIPOINT m_BrushSpacing
double m_BrushSpacingIncrProp
MILLIPOINT m_BrushSpacingIncrConst
UINT32 m_BrushSpacingMaxRand
UINT32 m_BrushSpacingRandSeed
UINT32 m_SpacingMaxPressure
BOOL m_bTile
BOOL m_bRotate
double m_RotateAngle
double m_RotAngleIncrProp
double m_RotAngleIncrConst
UINT32 m_RotationMaxRand
UINT32 m_RotationRandSeed
UINT32 m_RotationMaxPressure
PathOffset m_PathOffsetType
MILLIPOINT m_PathOffsetValue
double m_PathOffsetIncrProp
MILLIPOINT m_PathOffsetIncrConst
UINT32 m_OffsetTypeRandSeed
UINT32 m_OffsetValueMaxRand
UINT32 m_OffsetValueRandSeed
UINT32 m_OffsetMaxPressure
double m_BrushScaling
double m_BrushScalingIncr
double m_BrushScalingIncrConst
UINT32 m_BrushScalingMaxRand
UINT32 m_BrushScalingRandSeed
UINT32 m_ScalingMaxPressure
double m_BrushHueIncrement
UINT32 m_BrushHueMaxRand
UINT32 m_BrushHueRandSeed
UINT32 m_HueMaxPressure
double m_BrushSatIncrement
UINT32 m_BrushSatMaxRand
UINT32 m_BrushSatRandSeed
UINT32 m_SatMaxPressure
INT32 m_BrushTransparency
UINT32 m_TranspMaxPressure
SequenceType m_SequenceType
UINT32 m_SequenceRandSeed
double m_TimeStampPeriod
UINT32 m_TimeStampMaxPressure
std::vector< BrushRef * > m_BrushRefPtrArray
UINT32 m_NumBrushObjects
UINT32 m_LastBrushRefRetrieved
DocRect m_LargestBoundingBox
BOOL m_bInitOk
double m_MaxScaling
UINT32 m_DefaultFileID
BOOL m_bActivated

Detailed Description

Stores a vector Brush definition A static list of these items is held in the BrushComponent.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/12/99
See also:
BrushComponent

Definition at line 205 of file brshcomp.h.


Constructor & Destructor Documentation

BrushDefinition::BrushDefinition  ) 
 

Default constructor for the purposes of inherited classes, if you just want a normal brushdef you should really use the constructor above.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/2/97
5/12/2000 Actually I've just read that it is a poor idea to initialise inside constructors, so I think that a reorganisation should occur whereby the construcotr should simply assign the brush tree and we should GenerateBrush after the constructor returns.

Definition at line 210 of file brshcomp.cpp.

00211 {
00212     ResetMembers();
00213 }

BrushDefinition::BrushDefinition Node pBrushTree  ) 
 

Constructor.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/2/97
Parameters:
pBrushTree - A pointer to a Spread node which is the root of a clipart [INPUTS] subtree which should be used for this Brush definition. It must obey these rules: It must be a Spread It must not be linked into any other parent tree structure It should contain at least one ink node (or else the Brush will appear "blank"). It should be attribute complete, or close thereto
See also:
BrushComponent::AddNewBrush

Definition at line 179 of file brshcomp.cpp.

00180 : LineDefinition(pBrushTree)
00181 {
00182     ResetMembers();
00183     InitialiseBrushArray(MAX_BRUSH_OBJECTS);
00184     if (!GenerateBrush())
00185     {
00186         // hmm, not sure what to do here, but you can detect if we failed to initialise
00187         // by calling IsActivated, if that fails you should delete me.
00188     }
00189     
00190 }

BrushDefinition::~BrushDefinition  ) 
 

Destructor.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/2/97

Definition at line 227 of file brshcomp.cpp.

00228 { 
00229     for( size_t i = 0; i < m_BrushRefPtrArray.size(); i++ )
00230     {
00231         // ask the brushref to delete the attribute maps it generated
00232         if (m_BrushRefPtrArray[i] != NULL)
00233         {
00234         //  m_BrushRefPtrArray[i]->DeleteAttributeMapsAndAttributes();
00235             delete m_BrushRefPtrArray[i];
00236         }
00237     }
00238     m_BrushRefPtrArray.clear();
00239 
00240     
00241 
00242 }


Member Function Documentation

BOOL BrushDefinition::AddNewObject NodeRenderableInk pInkNode  )  [protected]
 

creates a brushref object from the inknode and its attributes, then adds the brushref to the member array

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/12/99
Parameters:
pInkNode - node to add [INPUTS] Returns TRUE if successful, FALSE otherwise

Definition at line 608 of file brshcomp.cpp.

00609 {
00610 
00611     if (pInkNode == NULL)
00612     {
00613         ERROR3("Ink node is NULL");
00614         return FALSE;
00615     }
00616 
00617     if (m_NumBrushObjects >= MAX_BRUSH_OBJECTS)
00618     {
00619         ERROR3("Cannot exceed MAX_BRUSH_OBJECTS");
00620         return FALSE;
00621     }
00622 
00623     BrushRef *pNewBrushRef = new BrushRef;
00624 
00625     if (pNewBrushRef == NULL)
00626     {
00627         ERROR3("Failed to allocate brushref");
00628         return FALSE;
00629     }
00630     
00631 
00632     
00633     if (!pNewBrushRef->Initialise(pInkNode))
00634     {
00635         ERROR3("Failed to initialise brushref");
00636         return FALSE;
00637     }
00638 
00639     m_BrushRefPtrArray[m_NumBrushObjects++] = pNewBrushRef;
00640 
00641     return TRUE;
00642 
00643 }

BOOL BrushDefinition::AreBrushParametersIdentical BrushDefinition pOther  ) 
 

Compares the member variables of the two brushes.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/12/99
Parameters:
pOther - the Brush to compare this Brush to [INPUTS]
Returns:
TRUE if they're different FALSE if they are identical

Definition at line 823 of file brshcomp.cpp.

00824 {
00825     if (m_BrushSpacing          != pOther->m_BrushSpacing           ||
00826         m_BrushSpacingIncrProp  != pOther->m_BrushSpacingIncrProp   ||
00827         m_BrushSpacingIncrConst != pOther->m_BrushSpacingIncrConst  ||
00828         m_BrushSpacingMaxRand   != pOther->m_BrushSpacingMaxRand    ||
00829         m_BrushSpacingRandSeed  != pOther->m_BrushSpacingRandSeed   ||
00830         m_SpacingMaxPressure    != pOther->m_SpacingMaxPressure     ||
00831         
00832         m_bTile                 != pOther->m_bTile                  ||
00833         m_bRotate               != pOther->m_bRotate                ||
00834         
00835         m_RotateAngle           != pOther->m_RotateAngle            ||
00836         m_RotAngleIncrProp      != pOther->m_RotAngleIncrProp       ||
00837         m_RotAngleIncrConst     != pOther->m_RotAngleIncrConst      ||
00838         m_RotationMaxRand       != pOther->m_RotationMaxRand        ||
00839         m_RotationRandSeed      != pOther->m_RotationRandSeed       ||
00840         m_RotationMaxPressure   != pOther->m_RotationMaxPressure    ||
00841 
00842         m_PathOffsetType        != pOther->m_PathOffsetType         ||
00843         m_PathOffsetValue       != pOther->m_PathOffsetValue        ||
00844         m_PathOffsetIncrProp    != pOther->m_PathOffsetIncrProp     ||
00845         m_PathOffsetIncrConst   != pOther->m_PathOffsetIncrConst    ||
00846         m_OffsetTypeRandSeed    != pOther->m_OffsetTypeRandSeed     ||
00847         m_OffsetValueMaxRand    != pOther->m_OffsetValueMaxRand     ||
00848         m_OffsetValueRandSeed   != pOther->m_OffsetValueRandSeed    ||
00849         
00850         m_BrushScaling          != pOther->m_BrushScaling           ||
00851         m_BrushScalingIncr      != pOther->m_BrushScalingIncr       ||
00852         m_BrushScalingIncrConst != pOther->m_BrushScalingIncrConst  ||
00853         m_BrushScalingMaxRand   != pOther->m_BrushScalingMaxRand    ||
00854         m_BrushScalingRandSeed  != pOther->m_BrushScalingRandSeed   ||
00855         m_ScalingMaxPressure    != pOther->m_ScalingMaxPressure     ||
00856 
00857         m_BrushHueIncrement     != pOther->m_BrushHueIncrement      ||
00858         m_BrushHueMaxRand       != pOther->m_BrushHueMaxRand        ||
00859         m_BrushHueRandSeed      != pOther->m_BrushHueRandSeed       ||
00860         m_HueMaxPressure        != pOther->m_HueMaxPressure         ||
00861 
00862         m_BrushSatIncrement     != pOther->m_BrushSatIncrement      ||
00863         m_BrushSatMaxRand       != pOther->m_BrushSatMaxRand        ||
00864         m_BrushSatRandSeed      != pOther->m_BrushSatRandSeed       ||
00865         m_SatMaxPressure        != pOther->m_SatMaxPressure         ||
00866 
00867         m_SequenceType          != pOther->m_SequenceType           ||
00868         m_SequenceRandSeed      != pOther->m_SequenceRandSeed       ||
00869 
00870         m_TimeStampPeriod       != pOther->m_TimeStampPeriod)
00871         return FALSE;
00872     else
00873         return TRUE;
00874 }

BOOL BrushDefinition::BrushContainsGroup  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
TRUE, if the brush is made from one or more groups, FALSE if not
See also:
-

Definition at line 2747 of file brshcomp.cpp.

02748 {
02749     for (UINT32 i = 0; i < m_NumBrushObjects; i++)
02750     {
02751         if (m_BrushRefPtrArray[i]->GetNumBlendPaths() > 1)
02752             return TRUE;
02753     }
02754     return FALSE;
02755 }

void BrushDefinition::CalculateMaxScaling  ) 
 

Calculates the maximum scaling value possible by dividing the maximum size value by the longest side of the bounding rect of the largest object.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/12/99
Parameters:
- [INPUTS] Returns -

Definition at line 1121 of file brshcomp.cpp.

01122 {
01123     DocRect BRect = GetLargestBoundingBox();
01124     if (BRect.IsEmpty())
01125     {
01126         //ERROR3("Bounding rect is empty in BrushDefinition::CalculateMaxScaling");
01127         return;
01128     }
01129     MILLIPOINT LongestSide = BRect.Height() > BRect.Width() ? BRect.Height() : BRect.Width();
01130     m_MaxScaling = MAX_BRUSH_SIZE  / LongestSide;
01131 
01132 }

BrushDefinition * BrushDefinition::Copy  ) 
 

Makes a copy of this definition, inknodes and all.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/5/2000
Parameters:
- [INPUTS]
Returns:
Pointer to new brush definition if succesful, NULL if it fails

Definition at line 891 of file brshcomp.cpp.

00892 {   
00893     // we need to make a range in order to copy the nodes to the new brush definition
00894     // so we need the start and end nodes of the range
00895     Node* pStart = NULL;
00896     Node* pNext = NULL;
00897     Node* pLast = NULL;
00898 
00899     // don't forget we start on a spread
00900     Node* pTree = GetLineTree();
00901     if (pTree != NULL)
00902         pTree = pTree->FindFirstChild();  // get the layer
00903     if (pTree != NULL)
00904             pTree = pTree->FindFirstChild();  // get the first ink object
00905     
00906     if (pTree == NULL)
00907     {
00908         ERROR3("Tree node is NULL in BrushDefinition::Copy()");
00909         return NULL;
00910     }
00911     
00912     pNext = pStart = pTree;
00913     while (pNext != NULL)
00914     {
00915         pNext->SetSelected(FALSE);  // we need to do this so that Range::FindFirst doesn't return NULL
00916         pLast = pNext;
00917         pNext = pLast->FindNext();
00918     }
00919 
00920 
00921     // make a range out of our subtree as thats the easiest way to copy all the nodes
00922     RangeControl rc;
00923     rc.Unselected = TRUE;
00924     rc.Selected = FALSE;
00925     Range BrushRange(pStart, pLast, rc);
00926     
00927     // make a new spread to attach our copy tree to
00928     Spread* pSpread = new Spread;
00929     if (pSpread == NULL)
00930     {
00931         ERROR3("Failed to allocate spread in BrushDefinition::Copy");
00932         return NULL;
00933     }
00934 
00935     Layer              *pLayer = new Layer( pSpread, FIRSTCHILD, String_256( TEXT("Diccon did this") ) );
00936     if (pLayer == NULL)
00937     {
00938         ERROR3("Failed to allocate layer in BrushDefinition::Copy");
00939         delete pSpread;
00940         return NULL;
00941     }
00942 
00943     // we need to reset our attributes in the same way that we need to with exporting.
00944     // If we don't do this then attributes with control points end up vanishing
00945     PreExportSubTree();
00946 
00947     if (!pLayer->CopyComplexRange(BrushRange))
00948     {
00949         ERROR3("Failed to copy range in BrushDefinition::Copy");
00950         delete pSpread;
00951         delete pLayer;
00952         return NULL;
00953     }
00954 
00955     PostExportSubTree();
00956 
00957     // lets allocate ourselves a new empty definition
00958     BrushDefinition* pNewBrushDef = new BrushDefinition(pSpread);
00959 
00960     if (pNewBrushDef == NULL)
00961     {
00962         ERROR3("Failed to allocate brush definition in BrushDefinition* BrushDefinition::Copy");
00963         delete pSpread;
00964         delete pLayer;
00965         return NULL;
00966     }
00967 
00968     if (!pNewBrushDef->IsActivated())
00969     {
00970         ERROR3("Brush definition failed to initialise");
00971         delete pNewBrushDef;
00972         delete pSpread;
00973         delete pLayer;
00974         return NULL;
00975     }
00976 
00977     return pNewBrushDef;
00978 }

void BrushDefinition::CopyDataToProcessor PathProcessorBrush pPathProc  ) 
 

To copy all of the numeric data about this brush to a path processor.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
pPathProc - path processor to receive the data [INPUTS]
Returns:
-
See also:
-

Definition at line 4368 of file brshcomp.cpp.

04369 {
04370     if (pPathProc == NULL)
04371     {
04372         ERROR3("Path processor is NULL");
04373         return;
04374     }
04375     
04376     // spacing members
04377     pPathProc->SetSpacing(m_BrushSpacing);
04378     pPathProc->SetSpacingIncrProp(m_BrushSpacingIncrProp);  
04379     pPathProc->SetSpacingIncrConst(m_BrushSpacingIncrConst);
04380     pPathProc->SetSpacingMaxRand(m_BrushSpacingMaxRand);
04381     pPathProc->SetSpacingRandSeed(m_BrushSpacingRandSeed);
04382     
04383     // offset members
04384     pPathProc->SetPathOffsetType(m_PathOffsetType);
04385     pPathProc->SetPathOffsetValue(m_PathOffsetValue);
04386     pPathProc->SetPathOffsetIncrConst(m_PathOffsetIncrConst);
04387     pPathProc->SetPathOffsetIncrProp(m_PathOffsetIncrProp);
04388     pPathProc->SetOffsetTypeRandSeed(m_OffsetTypeRandSeed);
04389     pPathProc->SetOffsetValueMaxRand(m_OffsetValueMaxRand);
04390     pPathProc->SetOffsetValueRandSeed(m_OffsetValueRandSeed);
04391     
04392     
04393     // scaling members
04394     pPathProc->SetBrushScaling(m_BrushScaling);
04395     pPathProc->SetScalingMaxRand(m_BrushScalingMaxRand);
04396     pPathProc->SetScalingRandSeed(m_BrushScalingRandSeed);
04397     pPathProc->SetScalingMaxPressure(m_ScalingMaxPressure);
04398     pPathProc->SetMaxScaling(m_MaxScaling);
04399     pPathProc->SetBrushScalingIncr(m_BrushScalingIncr);
04400     pPathProc->SetBrushScalingIncrConst(m_BrushScalingIncrConst);
04401     
04402 
04403     // rotation
04404     pPathProc->SetRotationMaxRand(m_RotationMaxRand);
04405     pPathProc->SetRotationRandSeed(m_RotationRandSeed);
04406     pPathProc->SetRotationIncrConst(m_RotAngleIncrConst);
04407     pPathProc->SetRotationIncrProp(m_RotAngleIncrProp);
04408     pPathProc->SetRotationMaxPressure(m_RotationMaxPressure);
04409     pPathProc->SetRotationAngle(m_RotateAngle);
04410 
04411     
04412     // sequence
04413     pPathProc->SetSequenceType(m_SequenceType);
04414     pPathProc->SetSequenceSeed(m_SequenceRandSeed);
04415 
04416     // Hue/Saturation
04417     pPathProc->SetHueIncrement(m_BrushHueIncrement);
04418     pPathProc->SetHueMaxRand(m_BrushHueMaxRand);
04419     pPathProc->SetHueRandSeed(m_BrushHueRandSeed);
04420     pPathProc->SetSatIncrement(m_BrushSatIncrement);
04421     pPathProc->SetSatMaxRand(m_BrushSatMaxRand);
04422     pPathProc->SetSatRandSeed(m_BrushSatRandSeed);
04423 
04424     // Transparency
04425     pPathProc->SetBrushTransparency(m_BrushTransparency);
04426     pPathProc->SetTransparencyPressure(m_TranspMaxPressure);
04427 
04428     // Other
04429     pPathProc->SetRotated(m_bRotate);
04430     pPathProc->SetTiling(m_bTile);
04431 }

BOOL BrushDefinition::CopyInkTreeToClipboard  ) 
 

copies the ink objects of this brush definition to the clipboard so they can be used elsewhere

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
TRUE if successful, FALSE otherwise
See also:
-

Definition at line 3245 of file brshcomp.cpp.

03246 {
03247     // first see if we can get the clipboard
03248     InternalClipboard *Clipboard = InternalClipboard::Instance();
03249     if (Clipboard == NULL || !Clipboard->PrepareForCopy())
03250     {
03251         ERROR3("Error copying to clipboard");
03252         return FALSE;
03253     }
03254 
03255     if (m_pTree == NULL)
03256     {
03257         ERROR3("No ink objects");
03258         return FALSE;
03259     }
03260 
03261     // remember that we store the ink nodes in a spread, so the first child
03262     // will be the layer, which we do not want to copy
03263     Node* pFirstNode = m_pTree->FindFirstChild();
03264     if (pFirstNode == NULL)
03265     {
03266         ERROR3("No layer underneath spread");
03267         return FALSE;
03268     }
03269     pFirstNode = pFirstNode->FindFirstChild();
03270     
03271     // Just be sure its an ink node
03272     if (pFirstNode == NULL || !pFirstNode->IsAnObject())
03273     {
03274         ERROR3("No ink object to copy");
03275         return FALSE;
03276     }
03277 
03278     // we want to set up a range to copy to the clipboard, so find the rightmost sibling 
03279     // of our node
03280 
03281     // We need to set them unselected so that range::findfirst doesn't return NULL
03282 
03283     Node* pLastNode = pFirstNode;
03284     Node* pNextNode = pLastNode->FindNext();
03285     while (pNextNode != NULL)
03286     {
03287         pNextNode->SetSelected(FALSE);
03288         pLastNode = pNextNode;
03289         pNextNode = pLastNode->FindNext();
03290     }
03291     pFirstNode->SetSelected(FALSE);
03292     DocCoord Centre;
03293     if (pFirstNode->IsKindOf(CC_RUNTIME_CLASS(NodeRenderableInk)))
03294     {
03295         DocRect BRect = ((NodeRenderableInk*)pFirstNode)->GetBoundingRect();
03296         Centre = BRect.Centre();
03297         TRACEUSER( "Diccon", _T("Ink node centre = %d, %d\n"), Centre.x, Centre.y);
03298     }
03299     Node* pChild = pFirstNode->FindFirstChild(CC_RUNTIME_CLASS(AttrRadialTranspFill));
03300     if (pChild != NULL)
03301     {
03302         DocCoord *pStartPoint = ((AttrRadialTranspFill*)pChild)->GetStartPoint();
03303         if (pStartPoint != NULL)
03304             TRACEUSER( "Diccon", _T("StartPoint pre-export = %d, %d\n"), pStartPoint->x, pStartPoint->y);
03305     }
03306 
03307 
03308     // that should give us our range, now set up the range control, just use the default
03309     RangeControl rc;
03310     rc.Unselected = TRUE;
03311     rc.Selected = FALSE;
03312 
03313     Range BrushRange(pFirstNode, pLastNode, rc);
03314 
03315     PreExportSubTree();
03316     
03317     BOOL ok =  Clipboard->CopyObjects(BrushRange);
03318     BOOL StillOk = Clipboard->CopyCompleted();
03319 
03320     PostExportSubTree();
03321 
03322     return (ok && StillOk);
03323 }

BOOL BrushDefinition::ExportBrush BaseCamelotFilter pFilter,
const BrushHandle  Handle
 

To export a Brush definition.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/12/99
Parameters:
pFilter - the BaseCamelotFilter filter that is being used to export a file. [INPUTS] Handle - the handle assigned to the brush
Returns:
TRUE if export was successful FALSE if export was aborted - no error is set, as in this case, it usually means that the Brush has been deleted, and is being treated as an old-style line. In this case, the caller should simply not bother exporting the attribute using the Brush definition.
Notes: Do not call this function directly, it is better to call it via BrushComponent::ExportBrush as this ensures that each brush is only saved once

Definition at line 3347 of file brshcomp.cpp.

03348 {
03349     ERROR2IF(pFilter == NULL, FALSE, "Filter is null");
03350     ERROR2IF(Handle == BrushHandle_NoBrush, FALSE, "Trying to export null brush");
03351 
03352     BOOL ok = TRUE;
03353 
03354     PreExportSubTree();
03355     CXaraFileRecord Record(TAG_BRUSHDEFINITION, TAG_BRUSHDEFINITION_SIZE);
03356     if (ok) ok = Record.Init();
03357     
03358     // first write the handle
03359     if (ok) ok = Record.WriteUINT32(Handle);
03360     if (ok) pFilter->Write(&Record);
03361 
03362     // then write the subtree - note that this may be moved to the superclass
03363     if (ok)
03364     {
03365         Node* pExportNode = NULL;
03366         if (m_pTree == NULL)
03367             ok = FALSE;
03368         else
03369         {
03370             pExportNode = m_pTree->FindFirstChild();    // Find the Layer
03371             if (pExportNode != NULL)
03372                 pExportNode = pExportNode->FindFirstChild();    // Find the inknode
03373         }
03374 
03375         // Write out the clipart subtree. We have to encapsulate it in DOWN and UP
03376         // records ourselves
03377         CXaraFileRecord DownRec(TAG_DOWN, 0);
03378         if (ok) pFilter->Write(&DownRec);
03379 
03380         if (ok) ok = pFilter->WriteNodes(pExportNode);
03381 
03382         CXaraFileRecord UpRec(TAG_UP, 0);
03383         if (ok) pFilter->Write(&UpRec);
03384         
03385     }
03386     PostExportSubTree();
03387 
03388     // now write the data, note that the handle is written here also as they
03389     // are retrieved separately and will need to be reconciled
03390     CXaraFileRecord DataRecord((INT32)TAG_BRUSHDATA, (INT32)TAG_BRUSHDATA_SIZE);
03391     if (ok) ok = DataRecord.Init();
03392     
03393     BYTE Flags = 0;
03394     if (m_bTile) 
03395         Flags |= TAG_BRUSHTILE_FLAG;
03396     if (m_bRotate)
03397         Flags |= TAG_BRUSHROTATE_FLAG;
03398 
03399 
03400     INT32 Offset = (INT32)m_PathOffsetType;
03401 
03402     if(ok)  ok = DataRecord.WriteUINT32((UINT32)Handle);
03403     if (ok) ok = DataRecord.WriteINT32(m_BrushSpacing);
03404     if (ok) ok = DataRecord.WriteBYTE(Flags);
03405     if (ok) ok = DataRecord.WriteDOUBLE(m_RotateAngle);
03406     if (ok) ok = DataRecord.WriteINT32(Offset);
03407     if (ok) ok = DataRecord.WriteINT32(m_PathOffsetValue); 
03408     if (ok) ok = DataRecord.WriteUnicode((TCHAR *)*(GetLineName()));
03409     if (ok) ok = DataRecord.WriteDOUBLE(m_BrushScaling);
03410     if (ok) pFilter->Write(&DataRecord);
03411     
03412     // write the additional data
03413     CXaraFileRecord NextRec(TAG_MOREBRUSHDATA, TAG_MOREBRUSHDATA_SIZE);
03414     if (ok) ok = NextRec.Init();
03415     if (ok) ok = NextRec.WriteDOUBLE(m_BrushSpacingIncrProp);
03416     if (ok) ok = NextRec.WriteINT32(m_BrushSpacingIncrConst);
03417     if (ok) ok = NextRec.WriteINT32((INT32)m_BrushSpacingMaxRand);
03418     if (ok) ok = NextRec.WriteINT32((INT32)m_BrushSpacingRandSeed);
03419 
03420     if (ok) ok = NextRec.WriteDOUBLE(m_BrushScalingIncr);
03421     if (ok) ok = NextRec.WriteINT32((INT32)m_BrushScalingMaxRand);
03422     if (ok) ok = NextRec.WriteINT32((INT32)m_BrushScalingRandSeed);
03423 
03424     if (ok) ok = NextRec.WriteINT32((INT32)m_SequenceType);
03425     if (ok) ok = NextRec.WriteINT32((INT32)m_SequenceRandSeed);
03426 
03427     if (ok) ok = NextRec.WriteDOUBLE(m_PathOffsetIncrProp);
03428     if (ok) ok = NextRec.WriteINT32(m_PathOffsetIncrConst);
03429     if (ok) ok = NextRec.WriteINT32((INT32)m_OffsetTypeRandSeed);
03430     if (ok) ok = NextRec.WriteINT32((INT32)m_OffsetValueMaxRand);
03431     if (ok) ok = NextRec.WriteINT32((INT32)m_OffsetValueRandSeed);
03432     if (ok) ok = pFilter->Write(&NextRec);
03433 
03434     CXaraFileRecord AnotherRec(TAG_EVENMOREBRUSHDATA, TAG_EVENMOREBRUSHDATA_SIZE);
03435     if (ok) ok = AnotherRec.Init();
03436     if (ok) ok = AnotherRec.WriteINT32((INT32)m_RotationMaxRand);
03437     if (ok) ok = AnotherRec.WriteINT32((INT32)m_RotationRandSeed);
03438     if (ok) ok = pFilter->Write(&AnotherRec);
03439     
03440     CXaraFileRecord PressureRec(TAG_BRUSHPRESSUREINFO, TAG_BRUSHPRESSUREINFO_SIZE);
03441     if (ok) ok = PressureRec.Init();
03442     if (ok) ok = PressureRec.WriteINT32((INT32)m_ScalingMaxPressure);
03443     if (ok) ok = PressureRec.WriteINT32((INT32)m_SpacingMaxPressure);
03444     if (ok) ok = PressureRec.WriteINT32((INT32)m_OffsetMaxPressure);
03445     if (ok) ok = PressureRec.WriteINT32((INT32)m_RotationMaxPressure);
03446     if (ok) ok = PressureRec.WriteINT32((INT32)m_HueMaxPressure);
03447     if (ok) ok = PressureRec.WriteINT32((INT32)m_SatMaxPressure);
03448     if (ok) ok = PressureRec.WriteINT32((INT32)m_TimeStampMaxPressure);
03449     if (ok) ok = pFilter->Write(&PressureRec);
03450     
03451     // now write our transparency info
03452     CXaraFileRecord TranspRec(TAG_BRUSHTRANSPINFO, TAG_BRUSHTRANSPINFO_SIZE);
03453     if (ok) ok = TranspRec.Init();
03454     if (ok) ok = TranspRec.WriteINT32(INT32(m_BrushTransparency));
03455     if (ok) ok = TranspRec.WriteINT32(INT32(m_TranspMaxPressure));
03456     if (ok) ok = TranspRec.WriteDOUBLE(m_RotAngleIncrConst);
03457     if (ok) ok = TranspRec.WriteDOUBLE(m_BrushScalingIncrConst);
03458     if (ok) ok = TranspRec.WriteINT32(INT32(m_BrushHueMaxRand));
03459     if (ok) ok = TranspRec.WriteINT32(INT32(m_BrushHueRandSeed));
03460     if (ok) ok = TranspRec.WriteINT32(INT32(m_BrushSatMaxRand));
03461     if (ok) ok = TranspRec.WriteINT32(INT32(m_BrushSatRandSeed));
03462     if (ok) ok = pFilter->Write(&TranspRec);
03463 
03464     // Finally, mark this stroke as having been written out so we don't do it again
03465     if (ok) SetIOStore(TRUE);
03466 
03467 
03468 
03469     return ok;
03470 
03471 }

BOOL BrushDefinition::GenerateBrush  ) 
 

goes through the input spread and calls AddNewObject() for each ink object found We try to make some intelligent guesses about what to set the starting spacing and offset values depending on the nature of the nodes. The following rules apply:

  • if there are multiple ink objects then the spacing is 1.1 * the largest dimension of the largest bounding box
  • if there is only one object and it contains a positive line width spacing is as above
  • if there is only one object with no line width then spacing is 10000 millipoint
  • defaulf offset is always the largest dimension of the largest BBOX.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/12/99
Parameters:
- [INPUTS] Returns TRUE if successful, FALSE otherwise

Definition at line 340 of file brshcomp.cpp.

00341 {
00342     if (m_pTree == NULL)
00343         return FALSE;
00344 
00345     // get a node that points at the first child of the layer
00346     Node* pNode = m_pTree->FindFirstChild();
00347     pNode       = pNode->FindFirstChild();
00348     
00349 
00350     AttrLineWidth* pLineWidth = NULL;
00351     while (pNode != NULL)
00352     {
00353         if (pNode->IsAnObject())
00354         {
00355             // it has been drawn to my attention that it is possible to end up with a brush object
00356             // that has no line width attribute, which leads to all kinds of problems.  So here we will
00357             // search for one and if we don't find one we will add one.
00358             ((NodeRenderableInk*)pNode)->FindAppliedAttribute(CC_RUNTIME_CLASS(AttrLineWidth), (NodeAttribute**)&pLineWidth);
00359             if (!pLineWidth)
00360             {
00361                 pLineWidth = new AttrLineWidth(pNode, LASTCHILD);
00362                 if (pLineWidth)
00363                 {
00364                     pLineWidth->Value.LineWidth = 501;
00365                     pLineWidth = NULL;
00366                 }
00367             }
00368 
00369             // we don't want to make brushes from brushes, instead we want to convert them
00370             // to shapes first, so use the routine to do that.
00371             NodeGroup* pGroup = NULL;
00372             ReplaceBrushWithGroup((NodeRenderableInk*)pNode, &pGroup);
00373             if (pGroup != NULL)
00374             {
00375                 // we got a group, so we have to delete the original node
00376                 pGroup->AttachNode(pNode, NEXT);
00377                 pGroup->FactorOutCommonChildAttributes();
00378                 // unhook from the tree
00379                 pNode->CascadeDelete();
00380 
00381                 // swap the pointers
00382                 Node* pDelete = pNode;
00383                 pNode = pGroup;
00384                 
00385                 delete pDelete;
00386             }
00387 
00388             if (!AddNewObject((NodeRenderableInk*)pNode))
00389                 return FALSE;
00390         }
00391         pNode = pNode->FindNext();
00392     }
00393     CalculateMaxScaling();
00394 
00395     m_bActivated = TRUE;
00396     return TRUE;
00397 
00398 }

BrushData * BrushDefinition::GetBrushData  ) 
 

gets the latest data from our path processor, copies it into our BrushData object which is then returned. Note that you are responsible for deleting this object.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
our brush data object
See also:
-

Definition at line 3108 of file brshcomp.cpp.

03109 {
03110     BrushData* pNewData = new BrushData;
03111     if (pNewData != NULL)
03112         InitialiseBrushData(pNewData);
03113     return pNewData;
03114 }

UINT32 BrushDefinition::GetBrushFileID  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
the ID of the default file that this brush was created from (if there is one)
See also:
-

Definition at line 2629 of file brshcomp.cpp.

02630 {
02631     return m_DefaultFileID;
02632 }

BrushRef * BrushDefinition::GetBrushRef UINT32  Index  ) 
 

as above

0

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
Index - the array element to get [INPUTS]
Returns:
the brushref at position Index in the array, or NULL if the index is invalid
See also:
-

Definition at line 2719 of file brshcomp.cpp.

02720 {
02721     // check that the index is ok
02722     if( Index > m_NumBrushObjects || Index > (UINT32)( m_BrushRefPtrArray.size() - 1 ) )
02723     {
02724         ERROR3("Invalid index");
02725         return NULL;
02726     }
02727 
02728     // update our member
02729     m_LastBrushRefRetrieved = Index;
02730     return m_BrushRefPtrArray[Index];
02731 }

double BrushDefinition::GetBrushScaling  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
the scaling factor to use when drawing the objects
See also:
-

Definition at line 1991 of file brshcomp.cpp.

01992 {
01993     return m_BrushScaling;
01994 }

double BrushDefinition::GetBrushScalingIncr  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
the scaling factor increment to use when drawing the objects
See also:
-

Definition at line 2010 of file brshcomp.cpp.

02011 {
02012     return m_BrushScalingIncr;
02013 }

double BrushDefinition::GetBrushScalingIncrConst  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
the scaling factor increment to use when drawing the objects
See also:
-

Definition at line 2058 of file brshcomp.cpp.

02059 {
02060     return m_BrushScalingIncrConst;
02061 }

INT32 BrushDefinition::GetBrushTransparency  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
Value - the value to set [INPUTS]
Returns:
our transparency value
See also:
-

Definition at line 2455 of file brshcomp.cpp.

02456 {
02457     return m_BrushTransparency;
02458 }

MILLIPOINT BrushDefinition::GetDefaultLineWidth BOOL  IgnorePressure = FALSE  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
the height of the largest bounding box, to be used as a default line width
See also:
-

Definition at line 2940 of file brshcomp.cpp.

02941 {
02942     DocRect BRect = GetLargestBoundingBox();
02943     MILLIPOINT Height = BRect.Height();
02944     MILLIPOINT Width = BRect.Width();
02945 //  double dHeight = (double)Height;
02946 //  double dWidth = (double)Width;
02947 
02948     double ScaleFactor = 1.0;
02949 
02950     // firstly, if we are rotated, or have random rotation, then use the longest side
02951 //  if (m_RotationMaxRand > 0 || m_RotateAngle != 0.0 || !m_bRotate)
02952     {
02953         if (Width > Height)
02954             Height = Width;
02955     }
02956     
02957     
02958     // next increase by our maximum possible random scaling
02959     if (m_BrushScalingMaxRand > 0)
02960     {
02961         // find out the random range
02962         UINT32 Lower = 0;
02963         UINT32 Upper = 0;
02964         PathProcessorBrush::GetRandomLimits(100, m_BrushScalingMaxRand, &Lower, &Upper);
02965         
02966         //Use the upper limit
02967         ScaleFactor *= ((double)Upper * 0.01);
02968     }
02969 
02970     // and our maximum possible pressure effect
02971 /*  if (m_ScalingMaxPressure > 0 && !IgnorePressure)
02972     {
02973         ScaleFactor *= ((double)m_ScalingMaxPressure * 0.01 + 1);
02974         
02975     }
02976 */
02977 
02978     MILLIPOINT NewHeight = (MILLIPOINT)((double)Height * ScaleFactor);
02979 
02980     // if we have random offset then there will be some effect, this is separate from the offset amount
02981     if (m_OffsetValueMaxRand > 0)
02982     {
02983         // rand value is a percentage of object size
02984         double RandMultiplier = (double)m_OffsetValueMaxRand * 0.01;
02985         double OffsetAmount = (double)Height * RandMultiplier;
02986         
02987         // remember that it goes both sides
02988         MILLIPOINT mpAmount = (MILLIPOINT)(2*OffsetAmount);
02989         NewHeight += mpAmount;
02990     }
02991 
02992     // if we are offset then add that amount
02993     switch (m_PathOffsetType)
02994     {
02995         case OFFSET_NONE:
02996             break;
02997         case OFFSET_LEFT:
02998         case OFFSET_RIGHT:
02999         case OFFSET_ALTERNATE:
03000         {
03001             MILLIPOINT OffsetIncr = 2 * m_PathOffsetValue;
03002             NewHeight += OffsetIncr;
03003         }
03004         break;
03005         case OFFSET_RANDOM:
03006             break;
03007         default:
03008             ERROR3("Invalid offset type");
03009     }
03010 
03011     return NewHeight;
03012 }

BrushRef * BrushDefinition::GetFirstBrushRef  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
the first in the brushref array
See also:
-

Definition at line 2663 of file brshcomp.cpp.

02664 {
02665     if( m_BrushRefPtrArray.empty() )
02666     {
02667         ERROR3("The array is empty!");
02668         return NULL;
02669     }
02670     m_LastBrushRefRetrieved = 0;
02671     return m_BrushRefPtrArray[0];
02672 }

UINT32 BrushDefinition::GetFirstRandomNumber UINT32  Seed = 0  )  [protected]
 

Seeds srand with either the seed supplied or by using time (i.e. a random seed).

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
a seed to use to generate the random number sequence [INPUTS]
Returns:
the first number in a random number sequence
See also:

Definition at line 3200 of file brshcomp.cpp.

03201 {
03202     // seed the random number generator
03203     if (Seed == 0)
03204         srand( (unsigned)time( NULL ) );
03205     else
03206         srand((unsigned)Seed);
03207 
03208     return (UINT32)rand();
03209 }

double BrushDefinition::GetHueIncrement  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
the hue increment for this brush
See also:
-

Definition at line 2216 of file brshcomp.cpp.

02217 {
02218     return m_BrushHueIncrement;
02219 }

UINT32 BrushDefinition::GetHueMaxRand  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
the hue increment random amount for this brush
See also:
-

Definition at line 2255 of file brshcomp.cpp.

02256 {
02257     return m_BrushHueMaxRand;
02258 }

UINT32 BrushDefinition::GetHueRandSeed  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
the hue increment random amount for this brush
See also:
-

Definition at line 2295 of file brshcomp.cpp.

02296 {
02297     return m_BrushHueRandSeed;
02298 }

DocRect BrushDefinition::GetLargestBoundingBox  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
the largest bounding box of all the objects in this definition
See also:
-

Definition at line 2770 of file brshcomp.cpp.

02771 {
02772     // if the member is not empty then we have done this search so return it now
02773     if (!m_LargestBoundingBox.IsEmpty())
02774         return m_LargestBoundingBox;
02775 
02776     // otherwise search through the brushrefs
02777     BrushRef* pBrushRef = GetFirstBrushRef();
02778     DocRect   BRect;
02779     DocRect   BiggestRect;
02780     XLONG     BiggestArea = 0;
02781     while (pBrushRef != NULL)
02782     {   
02783         BRect = pBrushRef->GetBoundingRect();
02784         XLONG RectHeight = BRect.Height();
02785         XLONG RectWidth = BRect.Width();
02786         XLONG ThisRectArea = RectHeight * RectWidth;
02787         
02788         if (ThisRectArea > BiggestArea)
02789         {
02790             BiggestRect = BRect;
02791             BiggestArea = ThisRectArea;
02792             
02793         }
02794         pBrushRef = GetNextBrushRef();
02795 
02796     }
02797     m_LargestBoundingBox = BiggestRect;
02798     return BiggestRect;
02799 }

DocRect BrushDefinition::GetLargestPossibleRect BOOL  AdjustForLineWidth = FALSE  ) 
 

To find out the largest possible bounding box that this brush can achieve, this we get the largest ink rect and then perform the maximum scaling, rotation etc. Note that ScalingIncrConst will be will be excluded from this test as we will never be able to know what affect it will have in advance of drawing the path.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
AdjustForLineWidth - do we include scaling to the current line width in our [INPUTS] calculations?
Returns:
the largest bounding box of all the objects in this definition, plus adjustments for variations in scale
Note: Only use this function to determine the size of the bounding box, the location information should not be used.
See also:
-

Definition at line 2825 of file brshcomp.cpp.

02826 {
02827     DocRect BRect = GetLargestBoundingBox();
02828     
02829     if (BRect.IsEmpty())  // just quit now
02830         return BRect;
02831     
02832     double Scale = 1.0;
02833 
02834     MILLIPOINT LineWidth = GetDefaultLineWidth(TRUE);
02835     
02836     // if we are including the scale to linewidth then work that out here
02837     if (AdjustForLineWidth)
02838     {
02839         MILLIPOINT CurrentLineWidth = OpDrawBrush::GetCurrentLineWidthIfNotDefault();
02840         if (CurrentLineWidth != -1 && CurrentLineWidth > 501) // -1 indicates the default linewidth, hence no scaling
02841         {
02842             Scale = (double)CurrentLineWidth / (double)LineWidth;
02843             // otherwise use the current line width
02844             LineWidth = CurrentLineWidth;
02845         }
02846     }
02847     
02848     // increase the size if we have randomness or pressure
02849     UINT32 MaxRand = GetScalingMaxRand();
02850     double dRand = ((double)MaxRand * 0.01) + 1.0;
02851     UINT32 MaxPressure = GetScalingMaxPressure();
02852     double dPressure = ((double)MaxPressure * 0.01) + 1.0;
02853     
02854     Scale *= dRand;
02855     Scale *= dPressure;
02856 
02857     if (Scale != 1.0)
02858     {
02859         double Height = (double)BRect.Height() * Scale;
02860         double Width = (double)BRect.Width() * Scale;
02861 
02862         BRect.lo.x = 0;
02863         BRect.hi.x = (MILLIPOINT)Height;
02864         BRect.lo.y = 0;
02865         BRect.hi.y = (MILLIPOINT)Width;
02866     }
02867 //  DocRect BRect(0, 0, LineWidth* 1.1, LineWidth* 1.1);
02868 
02869     // as the shape might get rotated we make sure the bitmap is big enough to cope
02870     // so make a temporary rect, rotate it and expand it, and union it with the original
02871     if (m_bRotate || m_RotateAngle || m_RotAngleIncrConst || m_RotationMaxRand)
02872     {
02873         DocRect TempRect = BRect;
02874         BrushAttrValue::RotateBounds(90, &TempRect);
02875         BRect = BRect.Union(TempRect);
02876         TempRect = BRect;
02877         BrushAttrValue::RotateBounds(45, &TempRect);
02878         BRect = BRect.Union(TempRect);
02879     }
02880     
02881     
02882     return BRect;
02883 }

double BrushDefinition::GetMaxScaling  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/12/99
Parameters:
- [INPUTS] Returns the maximum scaling value

Definition at line 1146 of file brshcomp.cpp.

01147 {
01148     return m_MaxScaling;
01149 }

BrushRef * BrushDefinition::GetNextBrushRef  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
the next element in the brushref array, as kept track of by m_LastBrushRefRetrieved
See also:
-

Definition at line 2690 of file brshcomp.cpp.

02691 {
02692     // have we hit the end?
02693     if( m_LastBrushRefRetrieved >= m_NumBrushObjects - 1 )
02694         return NULL;
02695 
02696     // quick check so we don't violate
02697     if( m_LastBrushRefRetrieved >= (UINT32)m_BrushRefPtrArray.size() - 1 )
02698     {
02699         ERROR3("Overran the array");
02700         return NULL;
02701     }
02702     return m_BrushRefPtrArray[++m_LastBrushRefRetrieved];
02703 }

UINT32 BrushDefinition::GetNextRandomNumber  )  [protected]
 

as above, note that you MUST have already called GetFirstRandomNumber()

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
the next number in an already seeded random number sequence
See also:

Definition at line 3225 of file brshcomp.cpp.

03226 {
03227     return (UINT32)rand();
03228 }

UINT32 BrushDefinition::GetNumBrushObjects  )  const
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
the number of brush objects used by this brush
See also:
-

Definition at line 2610 of file brshcomp.cpp.

02611 {
02612     return m_NumBrushObjects;
02613 }

UINT32 BrushDefinition::GetOffsetTypeRandSeed  ) 
 

As above.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Returns:
the seed used to determine the sequence of random numbers for offset value

Definition at line 1610 of file brshcomp.cpp.

01611 {
01612     return m_OffsetTypeRandSeed;
01613 }

UINT32 BrushDefinition::GetOffsetValueMaxRand  ) 
 

As above.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Returns:
the maximum percentage randomness to be applied to Offset

Definition at line 1535 of file brshcomp.cpp.

01536 {
01537     return m_OffsetValueMaxRand;
01538 }

UINT32 BrushDefinition::GetOffsetValueRandSeed  ) 
 

As above.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Returns:
the seed used to determine the sequence of random numbers for offset value

Definition at line 1574 of file brshcomp.cpp.

01575 {
01576     return m_OffsetValueRandSeed;
01577 }

MILLIPOINT BrushDefinition::GetPathOffsetIncrConst  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
The value of the constant path offset increment used by this brush
See also:
-

Definition at line 1451 of file brshcomp.cpp.

01452 {
01453     return m_PathOffsetIncrConst;
01454 }

double BrushDefinition::GetPathOffsetIncrProp  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
The value of the proportional path offset increment used by this brush
See also:
-

Definition at line 1492 of file brshcomp.cpp.

01493 {
01494     return m_PathOffsetIncrProp;
01495 }

PathOffset BrushDefinition::GetPathOffsetType  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
The type of pathoffset this brush is using
See also:
-

Definition at line 1379 of file brshcomp.cpp.

01380 {
01381     return m_PathOffsetType;
01382 }

MILLIPOINT BrushDefinition::GetPathOffsetValue  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
The value of the path offset used by this brush
See also:
-

Definition at line 1415 of file brshcomp.cpp.

01416 {
01417     return m_PathOffsetValue;
01418 }

double BrushDefinition::GetRotationAngle  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
the angle of rotation that has been set
See also:
-

Definition at line 1713 of file brshcomp.cpp.

01714 {
01715     return m_RotateAngle;
01716 }

double BrushDefinition::GetRotationIncrConst  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
the increment to the angle of rotation
See also:
-

Definition at line 1752 of file brshcomp.cpp.

01753 {
01754     return m_RotAngleIncrConst;
01755 }

double BrushDefinition::GetRotationIncrProp  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
the increment to the angle of rotation
See also:
-

Definition at line 1791 of file brshcomp.cpp.

01792 {
01793     return m_RotAngleIncrProp;
01794 }

UINT32 BrushDefinition::GetRotationMaxPressure  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
the seed to use to generate the rotation RNG
See also:
-

Definition at line 1886 of file brshcomp.cpp.

01887 {
01888     return m_RotationMaxPressure;
01889 }

UINT32 BrushDefinition::GetRotationMaxRand  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
the maximum amount of randomness to be applied to the rotation angle
See also:
-

Definition at line 1809 of file brshcomp.cpp.

01810 {
01811     return m_RotationMaxRand;
01812 }

UINT32 BrushDefinition::GetRotationRandSeed  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
the seed to use to generate the rotation RNG
See also:
-

Definition at line 1848 of file brshcomp.cpp.

01849 {
01850     return m_RotationRandSeed;
01851 }

double BrushDefinition::GetSatIncrement  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
the Saturation increment for this brush
See also:
-

Definition at line 2335 of file brshcomp.cpp.

02336 {
02337     return m_BrushSatIncrement;
02338 }

UINT32 BrushDefinition::GetSatMaxRand  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
the Saturation increment random amount for this brush
See also:
-

Definition at line 2374 of file brshcomp.cpp.

02375 {
02376     return m_BrushSatMaxRand;
02377 }

UINT32 BrushDefinition::GetSatRandSeed  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
the Saturation increment random amount for this brush
See also:
-

Definition at line 2414 of file brshcomp.cpp.

02415 {
02416     return m_BrushSatRandSeed;
02417 }

UINT32 BrushDefinition::GetScalingMaxPressure  ) 
 

As above.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Returns:
the maximum percentage effect that pressure will have on Scaling

Definition at line 2175 of file brshcomp.cpp.

02176 {
02177     return m_ScalingMaxPressure;
02178 }

UINT32 BrushDefinition::GetScalingMaxRand  ) 
 

As above.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Returns:
the maximum percentage randomness to be applied to Scaling

Definition at line 2101 of file brshcomp.cpp.

02102 {
02103     return m_BrushScalingMaxRand;
02104 }

UINT32 BrushDefinition::GetScalingRandSeed  ) 
 

As above.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Returns:
the seed used to determine the sequence of random numbers for Scaling

Definition at line 2140 of file brshcomp.cpp.

02141 {
02142     return m_BrushScalingRandSeed;
02143 }

UINT32 BrushDefinition::GetSequenceSeed  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
the seed we are using to generate random sequences
See also:
-

Definition at line 2592 of file brshcomp.cpp.

02593 {
02594     return m_SequenceRandSeed;
02595 }

SequenceType BrushDefinition::GetSequenceType  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
the type of sequence we are using for mutliple ink objects
See also:
-

Definition at line 2535 of file brshcomp.cpp.

02536 {
02537     return m_SequenceType;
02538 }

MILLIPOINT BrushDefinition::GetSpacing  ) 
 

As above.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Returns:
the spacing between the brush objects

Definition at line 1188 of file brshcomp.cpp.

01189 {
01190     return m_BrushSpacing;
01191 }

MILLIPOINT BrushDefinition::GetSpacingIncrConst  ) 
 

As above.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Returns:
the constant spacing increment between the brush objects

Definition at line 1286 of file brshcomp.cpp.

01287 {
01288     return m_BrushSpacingIncrConst;
01289 }

double BrushDefinition::GetSpacingIncrProp  ) 
 

As above.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Returns:
the proportional spacing increment between the brush objects

Definition at line 1240 of file brshcomp.cpp.

01241 {
01242     return m_BrushSpacingIncrProp;
01243 }

UINT32 BrushDefinition::GetSpacingMaxRand  ) 
 

As above.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Returns:
the maximum percentage randomness to be applied to spacing

Definition at line 1304 of file brshcomp.cpp.

01305 {
01306     return m_BrushSpacingMaxRand;
01307 }

UINT32 BrushDefinition::GetSpacingRandSeed  ) 
 

As above.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Returns:
the seed used to determine the sequence of random numbers for spacing

Definition at line 1343 of file brshcomp.cpp.

01344 {
01345     return m_BrushSpacingRandSeed;
01346 }

double BrushDefinition::GetTimeStampingPeriod  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
the time stamping period for this brush, if zero then timestamping is disabled
See also:
-

Definition at line 2898 of file brshcomp.cpp.

02899 {
02900     return m_TimeStampPeriod;
02901 }

UINT32 BrushDefinition::GetTransparencyPressure  ) 
 

Sets the extent to which pressure affects transparency.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
Value - the value to set [INPUTS]
Returns:
See also:
-

Definition at line 2516 of file brshcomp.cpp.

02517 {
02518     return m_TranspMaxPressure;
02519 }

void BrushDefinition::InitialiseBrushArray UINT32  NumObjects  )  [protected]
 

Clears out the m_BrushRefPtrArray if it is not empty, and sets the size.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
Number of objects to size the array at [INPUTS]
Returns:
-

Definition at line 658 of file brshcomp.cpp.

00659 {
00660     size_t              i = 0;
00661     while( i < m_BrushRefPtrArray.size() )
00662     {
00663         delete m_BrushRefPtrArray[i++];
00664     }
00665     m_BrushRefPtrArray.clear();
00666 
00667     m_BrushRefPtrArray.resize( NumObjects );
00668 
00669     // fill the array with NULL objects so that we can check later
00670     // to see if our allocations have worked
00671     i = 0;
00672     while( i < m_BrushRefPtrArray.size() )
00673     {
00674         m_BrushRefPtrArray[i++] = NULL;
00675     }
00676 
00677 }

void BrushDefinition::InitialiseBrushData BrushData pData  ) 
 

retrieves data from the path processor and puts it into our brushdata object

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
-
See also:
-

Definition at line 3029 of file brshcomp.cpp.

03030 {
03031     pData->m_BrushHandle = 100;
03032     
03033     pData->m_BrushScaling = m_BrushScaling;
03034     pData->m_BrushScalingIncr = m_BrushScalingIncr;
03035     pData->m_BrushScalingMaxRand = m_BrushScalingMaxRand;
03036     pData->m_BrushScalingRandSeed = m_BrushScalingRandSeed;
03037     pData->m_ScalingMaxPressure = m_ScalingMaxPressure;
03038 
03039     pData->m_bRotate = m_bRotate;
03040     pData->m_RotateAngle = m_RotateAngle;
03041     pData->m_RotAngleIncrConst = m_RotAngleIncrConst;
03042     pData->m_RotAngleIncrProp  = m_RotAngleIncrProp;
03043     pData->m_RotationMaxRand = m_RotationMaxRand;
03044     pData->m_RotationRandSeed = m_RotationRandSeed;
03045 
03046     pData->m_BrushSpacing  = m_BrushSpacing;
03047     pData->m_BrushSpacingIncrConst = m_BrushSpacingIncrConst;
03048     pData->m_BrushSpacingIncrProp = m_BrushSpacingIncrProp;
03049     pData->m_BrushSpacingMaxRand = m_BrushSpacingMaxRand;
03050     pData->m_BrushSpacingRandSeed = m_BrushSpacingRandSeed;
03051 
03052     pData->m_PathOffsetType = m_PathOffsetType;
03053     pData->m_PathOffsetValue = m_PathOffsetValue;
03054     pData->m_PathOffsetIncrConst = m_PathOffsetIncrConst;
03055     pData->m_PathOffsetIncrProp = m_PathOffsetIncrProp;
03056     pData->m_OffsetValueMaxRand = m_OffsetValueMaxRand;
03057     pData->m_OffsetValueRandSeed = m_OffsetValueRandSeed;
03058     pData->m_OffsetTypeRandSeed = m_OffsetTypeRandSeed;
03059 
03060     pData->m_bTile = m_bTile;
03061 
03062     pData->m_SequenceType = m_SequenceType;
03063     pData->m_SequenceRandSeed = m_SequenceRandSeed;
03064 
03065     pData->m_bUseLocalFillColour = FALSE;
03066     
03067     pData->m_BrushHueIncrement = m_BrushHueIncrement;
03068     pData->m_BrushHueMaxRand   = m_BrushHueMaxRand;
03069     pData->m_BrushHueRandSeed = m_BrushHueRandSeed;
03070 
03071     pData->m_BrushSatIncrement = m_BrushSatIncrement;
03072     pData->m_BrushSatMaxRand   = m_BrushSatMaxRand;
03073     pData->m_BrushSatRandSeed  = m_BrushSatRandSeed;
03074 
03075     pData->m_BrushTransparency = m_BrushTransparency;
03076     pData->m_TranspMaxPressure = m_TranspMaxPressure;
03077 
03078     if (m_TimeStampPeriod <=0)
03079     {
03080         pData->m_bTimeStampBrushes  = FALSE;
03081         pData->m_TimeStampPeriod    = UINT32(-1);
03082     }
03083     else
03084     {
03085         pData->m_bTimeStampBrushes = TRUE;
03086         pData->m_TimeStampPeriod = (UINT32)m_TimeStampPeriod;
03087     }
03088 
03089     pData->m_Name = *GetLineName();
03090 }

BOOL BrushDefinition::IsActivated  ) 
 

To see if this definition was initialised ok or if it was subsequently deactivated for some reason.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/12/99
Parameters:
- [INPUTS] Returns the member indicating whether this definition is active

Definition at line 572 of file brshcomp.cpp.

00573 {
00574     return m_bActivated;
00575 }

BOOL BrushDefinition::IsDifferent LineDefinition pOther  )  [virtual]
 

Determine if 2 BrushDefinitions are considered different. Used when adding Brushes to the global list, so that like Brushes can be merged.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/12/99
Parameters:
pOther - the Brush to compare this Brush to [INPUTS]
Returns:
TRUE if they're different in any way, FALSE if they are identical definitions

Implements LineDefinition.

Definition at line 698 of file brshcomp.cpp.

00699 {
00700     ERROR3IF(pOther == NULL, "Illegal NULL param");
00701 
00702 //  String_32* pName = pOther->GetLineName();
00703     if (!m_Name.IsIdentical(*pOther->GetLineName()))
00704         return(TRUE);
00705 
00706     if (pOther->GetLineTree() == NULL || m_pTree == NULL)
00707     {
00708         ERROR3("BrushDefinition has not been properly initialised");
00709         return(TRUE);
00710     }
00711 
00712     /*
00713     // --- Check to see if the brush bounds are equal
00714     DocRect OtherBounds = ((Spread *)(pOther->GetLineTree()))->GetBoundingRect();
00715     DocRect Bounds = ((Spread *)m_pTree)->GetBoundingRect();
00716     if (Bounds != OtherBounds)
00717         return(TRUE);
00718     */
00719     // --- Check the subtrees node-for-node to see if they are the same
00720     Node *pCurNode1 = m_pTree->FindFirstDepthFirst();
00721     Node *pCurNode2 = pOther->GetLineTree()->FindFirstDepthFirst();
00722 
00723     while (pCurNode1 != NULL && pCurNode2 != NULL)
00724     {
00725         // if they are fill attributes then we want to translate both attributes to the origin.
00726         // This prevents us getting duplication of brushes when we have the 
00727         // same thing in a different place, note that occasionally this fails due to rounding errors.
00728         if (pCurNode1->IsAFillAttr() && pCurNode2->IsAFillAttr() && 
00729             !((AttrFillGeometry*)pCurNode1)->IsAStrokeColour() && 
00730             !((AttrFillGeometry*)pCurNode1)->IsAStrokeTransp())
00731         {
00732             AttrFillGeometry* pFill1 = (AttrFillGeometry*)pCurNode1;
00733             AttrFillGeometry* pFill2 = (AttrFillGeometry*)pCurNode2;
00734             DocCoord* pStartPoint1 = pFill1->GetStartPoint();
00735             DocCoord* pStartPoint2 = pFill2->GetStartPoint();
00736         
00737             // translate them both to 0,0
00738             if (pStartPoint1 && pStartPoint2)
00739             {
00740                 Trans2DMatrix Trans1(-pStartPoint1->x, -pStartPoint1->y);
00741                 Trans2DMatrix Trans2(-pStartPoint2->x, -pStartPoint2->y);
00742                 pFill1->Transform(Trans1);
00743                 pFill2->Transform(Trans2);
00744                 BOOL Different = FALSE;
00745                 if (pCurNode1->IsDifferent(pCurNode2))
00746                     Different = TRUE;
00747 
00748                 Trans1.Invert();
00749                 Trans2.Invert();
00750                 pFill1->Transform(Trans1);
00751                 pFill2->Transform(Trans2);
00752                 if (Different == TRUE)
00753                     return TRUE;
00754             }
00755 
00756         }
00757         else
00758             // likewise if they are an object then translate from the centre of the bounding
00759             // rect to the origin
00760             if (pCurNode1->IsAnObject() && pCurNode2->IsAnObject())
00761             {
00762                 NodeRenderableInk* pInk1 = (NodeRenderableInk*)pCurNode1;
00763                 NodeRenderableInk* pInk2 = (NodeRenderableInk*)pCurNode2;
00764                 DocRect BRect1 = ((NodeRenderableInk*)pCurNode1)->GetBoundingRect();
00765                 DocRect BRect2 = ((NodeRenderableInk*)pCurNode2)->GetBoundingRect();
00766                 DocCoord Coord1 = BRect1.Centre();
00767                 DocCoord Coord2 = BRect2.Centre();
00768                 Trans2DMatrix Trans1(-Coord1.x, -Coord1.y);
00769                 Trans2DMatrix Trans2(-Coord2.x, -Coord2.y);
00770                 pInk1->Transform(Trans1);
00771                 pInk2->Transform(Trans2);
00772                 BOOL Different = FALSE;
00773                 if (pCurNode1->IsDifferent(pCurNode2))
00774                     Different = TRUE;
00775                 
00776                 Trans1.Invert();
00777                 Trans2.Invert();
00778                 pInk1->Transform(Trans1);
00779                 pInk2->Transform(Trans2);
00780                 if (Different ==TRUE)
00781                     return TRUE;
00782             }
00783         else 
00784         {
00785             // otherwise just use the regular == operator
00786             if (pCurNode1->IsDifferent(pCurNode2))
00787                 return(TRUE);
00788         }
00789 
00790         // And go to the next node in both brushes
00791         pCurNode1 = pCurNode1->FindNextDepthFirst(m_pTree);
00792         pCurNode2 = pCurNode2->FindNextDepthFirst(pOther->GetLineTree());
00793     }
00794 
00795     if (!AreBrushParametersIdentical((BrushDefinition*)pOther))
00796         return TRUE;
00797 
00798     // If we did the entire search and both pointers ended up NULL simultaneously, then
00799     // we have an exact match
00800     if (pCurNode1 == NULL && pCurNode2 == NULL)
00801         return(FALSE);
00802 
00803     return(TRUE);
00804 }

BOOL BrushDefinition::IsRotated  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
[INPUTS] 
Returns:
whether or not the brush objects are rotated
See also:
-

Definition at line 1928 of file brshcomp.cpp.

01929 {
01930     return m_bRotate;
01931 }

BOOL BrushDefinition::IsTiled  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
[INPUTS] 
Returns:
whether or not the brush tiles
See also:
-

Definition at line 1668 of file brshcomp.cpp.

01669 {
01670     return m_bTile;
01671 }

BOOL BrushDefinition::ObjectCanCreateBrush NodeRenderableInk pObject  )  [static]
 

To determine if this ink node can be made into a brush, currently returns TRUE for except for bevels, shadows, and contours, which are too damn awkward.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/6/2000
Parameters:
pObject - the object to test [INPUTS] Returns TRUE if we are allowed to make a brush out of this object, FALSE otherwise

Definition at line 1014 of file brshcomp.cpp.

01015 {
01016     ERROR2IF(pObject == NULL, FALSE, "Object is NULL in BrushDefinition::ObjectCanCreateBrush");
01017 
01018     // only way to do it is some ugly IKO's
01019     if (pObject->IS_KIND_OF(NodeShadow))
01020         return FALSE;
01021     if (pObject->IS_KIND_OF(NodeContour))
01022         return FALSE;
01023     if (pObject->IS_KIND_OF(NodeBevel))
01024         return FALSE;
01025 
01026     // if its compound then check all the children
01027     if (pObject->IsCompound())
01028     {
01029         Node* pChild = pObject->FindFirstChild();
01030         while (pChild)
01031         {
01032             if (pChild->IsAnObject())
01033             {
01034                 if (!ObjectCanCreateBrush((NodeRenderableInk*)pChild))
01035                     return FALSE;
01036             }
01037             pChild = pChild->FindNext();
01038         }
01039     }
01040 
01041     return TRUE;
01042 
01043 }

BOOL BrushDefinition::PostExportSubTree  )  [protected]
 

To perform various functions just prior to saving the subtree of the brush definition. The function loops through the BrushRefs, finding the blendpaths of each and undoes the transformation performed by PreExportSubTree. This is required because to continue using the brush in our current document we want to use its current position.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
TRUE if successful, FALSE if something went wrong
See also:
-
Notes: This function is required because if the attribute map is not saved out at the exact position it was created it will become 'out of sync' with the blendpath it applies to. Recall that upon reimporting the brush the blendpaths are generated from scratch whereas the attributes are not.

Definition at line 3537 of file brshcomp.cpp.

03538 {
03539     BrushRef* pBrushRef = GetFirstBrushRef();
03540 
03541     while (pBrushRef != NULL)
03542     {
03543         BlendPath * pBlendPath = pBrushRef->GetFirstBlendPath();
03544         while (pBlendPath != NULL)
03545         {
03546             if (!pBlendPath->TransformBrushAttributesAfterSave())
03547                 ERROR3("Somethings gone wrong");
03548             pBlendPath = pBrushRef->GetNextBlendPath(pBlendPath);
03549         }
03550         pBrushRef = GetNextBrushRef();
03551     }
03552     return TRUE;
03553 }

BOOL BrushDefinition::PreExportSubTree  )  [protected]
 

To perform various functions just prior to saving the subtree of the brush definition. The function loops through the BrushRefs, finding the blendpaths of each and transforming their attribute maps back to the position that they were in when the brush was created.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
TRUE if successful, FALSE if something went wrong
See also:
-
Notes: This function is required because if the attribute map is not saved out at the exact position it was created it will become 'out of sync' with the blendpath it applies to. Recall that upon reimporting the brush the blendpaths are generated from scratch whereas the attributes are not.

Definition at line 3495 of file brshcomp.cpp.

03496 {
03497     BrushRef* pBrushRef = GetFirstBrushRef();
03498     ERROR2IF(pBrushRef== NULL, FALSE, "No brushref");
03499     while (pBrushRef != NULL)
03500     {
03501         BlendPath * pBlendPath = pBrushRef->GetFirstBlendPath();
03502         while (pBlendPath != NULL)
03503         {
03504             if (!pBlendPath->TransformBrushAttributesBeforeSave())
03505                 ERROR2(FALSE, "Somethings gone wrong");
03506             pBlendPath = pBrushRef->GetNextBlendPath(pBlendPath);
03507         }
03508         pBrushRef = GetNextBrushRef();
03509     }
03510     return TRUE;
03511 }

BOOL BrushDefinition::RegenerateBrush  ) 
 

This function deletes the existing brushrefs and recreates them from scratch from m_pTree.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/12/99
Parameters:
- [INPUTS] Returns TRUE if successful, FALSE otherwise
Notes: This function is necessary because of the inaccuracies in our matrix transformation system which make it impossible to repeatedly scale without either growing our objects. Therefore it is recommended that after every render where an object is scaled this function should be called to regenerate the brush. Obviously the potential for disaster is very high for instance we run out of memory in the middle of the operation.

Definition at line 501 of file brshcomp.cpp.

00502 {
00503     /*  As we now always take copies of the brush objects, this is scheduled for demolition...
00504 
00505     // first we need to transform all the attributes back to where they began
00506     PreExportSubTree();
00507 
00508     // make a temporary array to hold the existing elements, as we do not wish 
00509     // to delete them until we are sure regeneration went ok
00510     CTypedPtrArray <CPtrArray, BrushRef*> TempArray;
00511     
00512     TempArray.SetSize(MAX_BRUSH_OBJECTS, -1);
00513 
00514     // fill the array with our existing objects
00515     BrushRef* pRef = NULL;
00516     INT32 i = 0;
00517     for (i = 0; i < TempArray.GetSize(); i++)
00518     {
00519         pRef = m_BrushRefPtrArray[i];
00520         TempArray.SetAt(i, pRef);
00521         m_BrushRefPtrArray.SetAt(i, NULL); // set existing pointer to null
00522     }
00523 
00524     m_NumBrushObjects = 0;
00525 
00526     // now remake ourselves
00527     if  (GenerateBrush() == TRUE)
00528     {
00529         // delete the existing brushrefs
00530         for (i = 0; i < TempArray.GetSize(); i++)
00531         {
00532             if (TempArray[i] != NULL)
00533             {
00534                 delete TempArray[i];
00535             }
00536         }
00537         TempArray.RemoveAll();
00538         
00539         return TRUE;
00540     }
00541 
00542     // ok so something went wrong, not much we can do except for restore the original objects
00543     // and hope for the best
00544     ERROR3("Uh oh - Regenerate Brush failed");
00545     pRef = NULL;
00546     i= 0;
00547     for (i = 0; i < TempArray.GetSize(); i++)
00548     {
00549         pRef = TempArray[i];
00550         m_BrushRefPtrArray.SetAt(i, pRef); // set existing pointer to null
00551         TempArray[i] = NULL;
00552     }
00553     */
00554     return TRUE;
00555 }

BOOL BrushDefinition::ReplaceBrushWithGroup NodeRenderableInk pInk,
NodeGroup **  ppGroup
[protected]
 

We are no longer allowed to make brushes from brushes, because of problems when saving and loading. Instead if we have a brush then we will convert it to shapes and use those instead.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/12/99
Parameters:
pInk - the inknode that we are going to generate a brush from [INPUTS]
if pInk has a brush attribute applied to it then we will generate a new group [OUTPUTS] from that brush Returns TRUE if successful, FALSE otherwise
Note: So you actually have to delete pInk yourself if this function outputs a group. I had to do that to get the recursion to work. Still I'm sure you can handle it.

Definition at line 419 of file brshcomp.cpp.

00420 {
00421     ERROR2IF(pInk == NULL, FALSE, "Invalid inputs to BrushDefinition::ReplaceBrushWithGroups");
00422 
00423     BOOL  ok = TRUE;
00424     // if we're compound then search through all our children first
00425     if (pInk->IsCompound())
00426     {
00427         NodeGroup* pNodeGroup = NULL;
00428         Node* pChild = pInk->FindFirstChild();
00429         Node* pDelete = NULL;       
00430         
00431         while (pChild)
00432         {
00433             if (pChild->IsAnObject())
00434             {
00435                 if (ok) ok = ReplaceBrushWithGroup((NodeRenderableInk*)pChild, &pNodeGroup);
00436                 if (pNodeGroup)
00437                 {
00438                     // attach the new group next to the child
00439                     pNodeGroup->AttachNode(pChild, NEXT);
00440 
00441                     pNodeGroup->FactorOutCommonChildAttributes();
00442 
00443                     // unhook the child
00444                     pChild->CascadeDelete();
00445                     
00446                     // we're ready to delete the original child
00447                     pDelete =  pChild;
00448 
00449                     // swap the pointer
00450                     pChild = pNodeGroup;    
00451 
00452                     delete pDelete;
00453                 }
00454             }
00455             pChild = pChild->FindNext();
00456             pNodeGroup = NULL;
00457         }
00458     }
00459 
00460     AttrBrushType* pAttrBrush = NULL;
00461     pInk->FindAppliedAttribute(CC_RUNTIME_CLASS(AttrBrushType), (NodeAttribute**)&pAttrBrush);
00462 
00463     if (pAttrBrush && pAttrBrush->GetBrushHandle() != BrushHandle_NoBrush && ok)
00464     {
00465         //Turn the brush into a group with lots of nodepaths
00466         BrushBecomeAGroup BecomeA(BECOMEA_PASSBACK, CC_RUNTIME_CLASS(NodePath), NULL);
00467         ok = pAttrBrush->DoBecomeA(&BecomeA, pInk);
00468 
00469         // the brush will create a group out of itself and we want to retrieve that
00470         NodeGroup* pBrushGroup = BecomeA.GetNodeGroup();
00471         pBrushGroup->FactorOutCommonChildAttributes();
00472         pBrushGroup->NormaliseAttributes();
00473         if (pBrushGroup != NULL && ok)
00474         {
00475             *ppGroup = pBrushGroup;
00476         }
00477     }
00478     return ok;
00479 }

void BrushDefinition::ResetMembers  )  [protected]
 

Initialises the member variables.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS] Returns -

Definition at line 258 of file brshcomp.cpp.

00259 {
00260     m_BrushSpacing          = 10000;
00261     m_BrushSpacingIncrProp  = 1.0;
00262     m_BrushSpacingIncrConst = 0;
00263     m_BrushSpacingMaxRand   = 0;
00264     m_BrushSpacingRandSeed  = 0;
00265 
00266     m_PathOffsetType      = OFFSET_NONE;
00267     m_PathOffsetValue     =  0;
00268     m_PathOffsetIncrProp  = 1.0;
00269     m_PathOffsetIncrConst = 0;
00270     m_OffsetTypeRandSeed  = 0;
00271     m_OffsetValueMaxRand  = 0;
00272     m_OffsetValueRandSeed = 0;
00273 
00274     m_bRotate             = TRUE;
00275     m_RotateAngle         = 0;
00276     m_RotationMaxRand     = 0;
00277     m_RotationRandSeed    = 0;
00278     m_RotAngleIncrConst   = 0;
00279     m_RotAngleIncrProp    = 1.0;
00280     m_RotationMaxPressure = 0;
00281 
00282     m_bTile               = TRUE;
00283 
00284     m_BrushScaling        = 1.0;
00285     m_BrushScalingIncr    = 1.0;
00286     m_BrushScalingIncrConst = 0.0;
00287     m_BrushScalingMaxRand   = 0;
00288     m_BrushScalingRandSeed  = 0;
00289     m_ScalingMaxPressure    = 35;
00290     
00291     m_BrushHueIncrement     = 0.0;
00292     m_BrushHueMaxRand       = 0;
00293     m_BrushHueRandSeed      = 1234;
00294 
00295     m_BrushSatIncrement     = 0.0;
00296     m_BrushSatMaxRand       = 0;
00297     m_BrushSatRandSeed      = 5432; 
00298 
00299     m_SequenceType        = SEQ_FORWARD;
00300     m_SequenceRandSeed    = 0;
00301 
00302     m_NumBrushObjects     = 0;
00303     m_bInitOk             = FALSE;
00304 
00305     m_LargestBoundingBox.MakeEmpty();
00306 
00307     m_Name = TEXT("Custom Brush");
00308 
00309     m_TimeStampPeriod = 0;
00310 
00311     m_BrushTransparency  = 100;
00312     m_TranspMaxPressure  = 0;
00313 
00314     m_DefaultFileID = BRUSHFILE_NONE;
00315 
00316     m_bActivated = FALSE;
00317 }

void BrushDefinition::SetActivated BOOL  Value  ) 
 

To set this definition activated or not.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/12/99
Parameters:
Value - the value to set [INPUTS] Returns -

Definition at line 590 of file brshcomp.cpp.

00591 {
00592     m_bActivated = Value;
00593 }

void BrushDefinition::SetBrushFileID UINT32  ID  ) 
 

as above, this should only be called as part of the start-up process.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
ID - the ID of the default file that this file is being created from [INPUTS]
Returns:
-

Definition at line 2645 of file brshcomp.cpp.

02646 {
02647     m_DefaultFileID = ID;
02648 }

BOOL BrushDefinition::SetBrushScaling double  Scale  ) 
 

to set the member that determine to what scale of the original object each brush object is drawn

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
the scale factor to set [INPUTS]
Returns:
TRUE if Scale is within the permitted bounds
See also:
-

Definition at line 1968 of file brshcomp.cpp.

01969 {
01970     if (Scale <= MIN_BRUSH_SCALE || Scale >= MAX_BRUSH_SCALE)
01971         return FALSE;
01972     
01973     m_BrushScaling = Scale;
01974     return TRUE;
01975 }

BOOL BrushDefinition::SetBrushScalingIncr double  Incr  ) 
 

to set the member that determine the increment to scaling applied to each brush object

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
the scale factor increment to set [INPUTS]
Returns:
TRUE unless incr is negative
See also:
-

Definition at line 2032 of file brshcomp.cpp.

02033 {
02034     if (Incr <= 0)
02035     {
02036         ERROR3("Negative scaling increment");
02037         return FALSE;
02038     }
02039 
02040     m_BrushScalingIncr = Incr;
02041     return TRUE;
02042 }

BOOL BrushDefinition::SetBrushScalingIncrConst double  Incr  ) 
 

to set the member that determine the increment to scaling applied to each brush object

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
the scale factor increment to set [INPUTS]
Returns:
TRUE unless Incr >= 100
See also:
-

Definition at line 2080 of file brshcomp.cpp.

02081 {
02082     if (abs((INT32)Incr) >= 100)
02083     {
02084         return FALSE;
02085     }
02086     m_BrushScalingIncrConst = Incr;
02087     return TRUE;
02088 }

BOOL BrushDefinition::SetBrushTransparency INT32  Value  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
Value - the value to set [INPUTS]
Returns:
our transparency value (-1 indicates unused)
See also:
-

Definition at line 2473 of file brshcomp.cpp.

02474 {
02475     if (Value > MAX_TRANSP_VALUE)
02476         return FALSE;
02477 
02478     m_BrushTransparency = Value;
02479     return TRUE;
02480 }

BOOL BrushDefinition::SetHueIncrement double  Incr  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
the hue increment for this brush [INPUTS]
Returns:
-
See also:
-

Definition at line 2235 of file brshcomp.cpp.

02236 {
02237     m_BrushHueIncrement = Incr;
02238     return TRUE;
02239 }

BOOL BrushDefinition::SetHueMaxRand UINT32  Rand  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
the hue increment random amount for this brush [INPUTS]
Returns:
-
See also:
-

Definition at line 2275 of file brshcomp.cpp.

02276 {
02277     m_BrushHueMaxRand = Rand;
02278     return TRUE;
02279 }

BOOL BrushDefinition::SetHueRandSeed UINT32  Rand  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
the hue increment random amount for this brush [INPUTS]
Returns:
-
See also:
-

Definition at line 2315 of file brshcomp.cpp.

02316 {
02317     m_BrushHueRandSeed = Rand;
02318     return TRUE;
02319 }

void BrushDefinition::SetMembersFromData BrushData  Data  ) 
 

gets the latest data from our path processor, copies it into our BrushData object which is then returned. Note that you are responsible for deleting this object.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
our brush data object
See also:
-

Definition at line 3130 of file brshcomp.cpp.

03131 {
03132     m_BrushSpacing          = Data.m_BrushSpacing;
03133     m_BrushSpacingIncrProp  = Data.m_BrushSpacingIncrProp;
03134     m_BrushSpacingIncrConst = Data.m_BrushSpacingIncrConst;
03135     m_BrushSpacingMaxRand   = Data.m_BrushSpacingMaxRand;
03136     m_BrushSpacingRandSeed  = Data.m_BrushSpacingRandSeed;
03137 
03138     m_PathOffsetType      = Data.m_PathOffsetType;
03139     m_PathOffsetValue     = Data.m_PathOffsetValue;
03140     m_PathOffsetIncrProp  = Data.m_PathOffsetIncrProp;
03141     m_PathOffsetIncrConst = Data.m_PathOffsetIncrConst;
03142     m_OffsetTypeRandSeed  = Data.m_OffsetTypeRandSeed;
03143     m_OffsetValueMaxRand  = Data.m_OffsetValueMaxRand;
03144     m_OffsetValueRandSeed = Data.m_OffsetValueRandSeed;
03145 
03146     m_bRotate             = Data.m_bRotate;
03147     m_RotateAngle         = Data.m_RotateAngle;
03148     m_RotationMaxRand     = Data.m_RotationMaxRand;
03149     m_RotationRandSeed    = Data.m_RotationRandSeed;
03150     m_RotAngleIncrConst   = Data.m_RotAngleIncrConst;
03151     m_RotAngleIncrProp    = Data.m_RotAngleIncrProp;
03152     m_RotationMaxPressure = Data.m_RotationMaxPressure;
03153 
03154     m_bTile               = Data.m_bTile;
03155 
03156     m_BrushScaling          = Data.m_BrushScaling;
03157     m_BrushScalingIncr      = Data.m_BrushScalingIncr;
03158     m_BrushScalingIncrConst = Data.m_BrushScalingIncrConst;
03159     m_BrushScalingMaxRand   = Data.m_BrushScalingMaxRand;
03160     m_BrushScalingRandSeed  = Data.m_BrushScalingRandSeed;
03161     m_ScalingMaxPressure    = Data.m_ScalingMaxPressure;
03162     
03163     m_BrushHueIncrement     = Data.m_BrushHueIncrement;
03164     m_BrushHueMaxRand       = Data.m_BrushHueMaxRand;
03165     m_BrushHueRandSeed      = Data.m_BrushHueRandSeed;
03166 
03167     m_BrushSatIncrement     = Data.m_BrushSatIncrement;
03168     m_BrushSatMaxRand       = Data.m_BrushSatMaxRand;
03169     m_BrushSatRandSeed      = Data.m_BrushSatRandSeed;
03170 
03171     m_BrushTransparency     = Data.m_BrushTransparency;
03172     m_TranspMaxPressure     = Data.m_TranspMaxPressure;
03173 
03174     m_SequenceType        = Data.m_SequenceType;
03175     m_SequenceRandSeed    = Data.m_SequenceRandSeed;
03176 
03177     m_LargestBoundingBox.MakeEmpty();
03178 
03179     m_Name = TEXT("Custom Brush");
03180 
03181     m_TimeStampPeriod = Data.m_TimeStampPeriod;
03182 
03183 
03184 }

void BrushDefinition::SetOffsetTypeRandSeed UINT32  Value  ) 
 

As above.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/9 Inputs : the seed used to determine the sequence of random numbers for offset value
Returns:
TRUE if Value is valid, which it always is at the moment

Definition at line 1628 of file brshcomp.cpp.

01629 {
01630     m_OffsetValueRandSeed = Value;
01631 
01632 }

BOOL BrushDefinition::SetOffsetValueMaxRand UINT32  Value  ) 
 

As above.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
: the maximum percentage randomness to be applied to Offset [INPUTS]
Returns:
TRUE if Value is within the legal limits, otherwise FALSE

Definition at line 1553 of file brshcomp.cpp.

01554 {
01555     if (Value < MIN_BRUSH_RAND || Value > MAX_BRUSH_RAND)
01556         return FALSE;
01557     
01558     m_OffsetValueMaxRand = Value;
01559     return TRUE;
01560 }

void BrushDefinition::SetOffsetValueRandSeed UINT32  Value  ) 
 

As above.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/9 Inputs : the seed used to determine the sequence of random numbers for offset value
Returns:
TRUE if Value is valid, which it always is at the moment

Definition at line 1592 of file brshcomp.cpp.

01593 {
01594     m_OffsetValueRandSeed = Value;
01595     
01596 }

BOOL BrushDefinition::SetPathOffsetIncrConst MILLIPOINT  Value  ) 
 

to set the offset distance for this brush

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99 Inputs Value - the offset increment value to set
Returns:
-

Definition at line 1469 of file brshcomp.cpp.

01470 {
01471     if (Value < 0 || Value > MAX_BRUSH_SPACING)
01472         return FALSE;
01473 
01474     m_PathOffsetIncrConst = Value;
01475     return TRUE;
01476 }

BOOL BrushDefinition::SetPathOffsetIncrProp double  Incr  ) 
 

to set the offset distance for this brush

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99 Inputs incr - the proportional offset increment value to set
Returns:
-

Definition at line 1510 of file brshcomp.cpp.

01511 {
01512     if (Incr < 0 )
01513         return FALSE;
01514     // test to see if 10 objects takes us to the limit
01515     double TenIncr = pow(Incr, 10.0);
01516     if ((m_PathOffsetValue * TenIncr) >= MAX_BRUSH_SPACING)
01517         return FALSE;
01518 
01519     m_PathOffsetIncrProp = Incr;
01520     return TRUE;
01521 }

void BrushDefinition::SetPathOffsetType PathOffset  Offset  ) 
 

to set the offset type for this brush

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99 Inputs Offset - the offset type to set
Returns:
-

Definition at line 1396 of file brshcomp.cpp.

01397 {
01398     m_PathOffsetType = Offset;
01399 }

void BrushDefinition::SetPathOffsetValue MILLIPOINT  Value  ) 
 

to set the offset distance for this brush

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99 Inputs Value - the offset value to set
Returns:
-

Definition at line 1432 of file brshcomp.cpp.

01433 {
01434     m_PathOffsetValue = Value;
01435 }

void BrushDefinition::SetRotated BOOL  Value  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
whether or not the brush rotates [INPUTS]
Returns:
-
See also:
-

Definition at line 1947 of file brshcomp.cpp.

01948 {
01949     m_bRotate = Value;
01950 }

BOOL BrushDefinition::SetRotationAngle double  Angle  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
the angle of rotation to set [INPUTS]
Returns:
TRUE if the angle is within the stated bounds
See also:
-

Definition at line 1688 of file brshcomp.cpp.

01689 {
01690 /*  if ((Angle <= MIN_ANGLE) || (Angle >= MAX_ANGLE))
01691     {
01692         ERROR3("Invalid angle");
01693         return FALSE;
01694         
01695     }*/
01696     m_RotateAngle = Angle;
01697     return TRUE;
01698 }

BOOL BrushDefinition::SetRotationIncrConst double  Angle  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
the incremental angle of rotation to set [INPUTS]
Returns:
TRUE if the angle is within the stated bounds
See also:
-

Definition at line 1732 of file brshcomp.cpp.

01733 {
01734     m_RotAngleIncrConst = Angle;
01735 
01736     return TRUE;
01737 }

BOOL BrushDefinition::SetRotationIncrProp double  Value  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
the incremental angle of rotation to set [INPUTS]
Returns:
TRUE if the angle is within the stated bounds
See also:
-

Definition at line 1771 of file brshcomp.cpp.

01772 {
01773     m_RotAngleIncrProp = Value;
01774 
01775     return TRUE;
01776 }

BOOL BrushDefinition::SetRotationMaxPressure UINT32  Value  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
the seed to use [INPUTS]
Returns:
-
See also:
-

Definition at line 1906 of file brshcomp.cpp.

01907 {
01908     if (Value < MIN_PRESSURE_EFFECT || Value > MAX_PRESSURE_EFFECT)
01909         return FALSE;
01910     m_RotationMaxPressure = Value;
01911     return TRUE;
01912 }

BOOL BrushDefinition::SetRotationMaxRand UINT32  Value  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
the maximum amount of randomness (as a %) to be applied to rotation [INPUTS]
Returns:
-
See also:
-

Definition at line 1828 of file brshcomp.cpp.

01829 {
01830     m_RotationMaxRand = Value;
01831     return TRUE;
01832 }

void BrushDefinition::SetRotationRandSeed UINT32  Seed  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
the seed to use [INPUTS]
Returns:
-
See also:
-

Definition at line 1868 of file brshcomp.cpp.

01869 {
01870     m_RotationRandSeed = Seed;
01871 }

BOOL BrushDefinition::SetSatIncrement double  Incr  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
the Saturation increment for this brush [INPUTS]
Returns:
-
See also:
-

Definition at line 2354 of file brshcomp.cpp.

02355 {
02356     m_BrushSatIncrement = Incr;
02357     return TRUE;
02358 }

BOOL BrushDefinition::SetSatMaxRand UINT32  Rand  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
the Saturation increment random amount for this brush [INPUTS]
Returns:
-
See also:
-

Definition at line 2394 of file brshcomp.cpp.

02395 {
02396     m_BrushSatMaxRand = Rand;
02397     return TRUE;
02398 }

BOOL BrushDefinition::SetSatRandSeed UINT32  Rand  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
the Saturation increment random amount for this brush [INPUTS]
Returns:
-
See also:
-

Definition at line 2434 of file brshcomp.cpp.

02435 {
02436     m_BrushSatRandSeed = Rand;
02437     return TRUE;
02438 }

BOOL BrushDefinition::SetScalingMaxPressure UINT32  Max  ) 
 

As above.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
the maximum percentage effect that pressure will have on Scaling [INPUTS]
Returns:
-

Definition at line 2193 of file brshcomp.cpp.

02194 {
02195     if (Max < MIN_PRESSURE_EFFECT || Max > MAX_PRESSURE_EFFECT)
02196         return FALSE;
02197     m_ScalingMaxPressure = Max;
02198     return TRUE;
02199 }

BOOL BrushDefinition::SetScalingMaxRand UINT32  Value  ) 
 

As above.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
: the maximum percentage randomness to be applied to Scaling [INPUTS]
Returns:
TRUE if Value is within the legal limits, otherwise FALSE

Definition at line 2119 of file brshcomp.cpp.

02120 {
02121     if (Value < MIN_BRUSH_RAND || Value > MAX_BRUSH_RAND)
02122         return FALSE;
02123     
02124     m_BrushScalingMaxRand = Value;
02125     return TRUE;
02126 }

void BrushDefinition::SetScalingRandSeed UINT32  Seed  ) 
 

As above.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
the seed to use for our scaling RNG [INPUTS]
Returns:
-

Definition at line 2158 of file brshcomp.cpp.

02159 {
02160     m_BrushScalingRandSeed = Seed;
02161 }

void BrushDefinition::SetSequenceSeed UINT32  Seed  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
the random seed to use for sequences [INPUTS]
Returns:
-
See also:
-

Definition at line 2573 of file brshcomp.cpp.

02574 {
02575     m_SequenceRandSeed = Seed;
02576 }

void BrushDefinition::SetSequenceType SequenceType  Type  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
the type of sequence to use [INPUTS]
Returns:
-
See also:
-

Definition at line 2554 of file brshcomp.cpp.

02555 {
02556     m_SequenceType = Type;
02557 }

BOOL BrushDefinition::SetSpacing MILLIPOINT  Spacing  ) 
 

To set the spacing between brush objects.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
the spacing value to set [INPUTS]
Returns:
TRUE if successful, FALSE if the spacing is invalid
See also:
-

Definition at line 1164 of file brshcomp.cpp.

01165 {
01166     if (Spacing < MIN_BRUSH_SPACING || Spacing > MAX_BRUSH_SPACING)
01167         return FALSE;
01168     
01169     m_BrushSpacing = Spacing;
01170 
01171     return TRUE;
01172 
01173 }

BOOL BrushDefinition::SetSpacingIncrConst MILLIPOINT  Incr  ) 
 

To set the proportional spacing increment between brush objects.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
the constant spacing increment value to set [INPUTS]
Returns:
TRUE if we can draw 10 objects, FALSE if the spacing is invalid
See also:
-

Definition at line 1259 of file brshcomp.cpp.

01260 {
01261     if (Incr <= 0)
01262         return TRUE;
01263 
01264     MILLIPOINT TenthSpacing = 10 * Incr;
01265     if (TenthSpacing >= MAX_BRUSH_SPACING || TenthSpacing < MIN_BRUSH_SPACING)
01266     {
01267         ERROR3("Illegal increment value");
01268         return FALSE;
01269     }
01270     m_BrushSpacingIncrConst = Incr;
01271     return TRUE;
01272 }

BOOL BrushDefinition::SetSpacingIncrProp double  Incr  ) 
 

To set the proportional spacing increment between brush objects.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
the spacing increment value to set [INPUTS]
Returns:
TRUE if we can draw 10 objects, FALSE if the spacing is invalid
See also:
-

Definition at line 1208 of file brshcomp.cpp.

01209 {
01210     if (Incr <= 0)
01211         return FALSE;
01212     
01213     if (Incr != 1.0)
01214     {
01215         double TenIncr = pow(Incr, 10.0);
01216         double TenthSpacing = m_BrushSpacing * TenIncr;
01217         if (TenthSpacing >= MAX_BRUSH_SPACING || TenthSpacing < MIN_BRUSH_SPACING)
01218         {
01219             ERROR3("Illegal increment value");
01220             return FALSE;
01221         }
01222     }
01223     m_BrushSpacingIncrProp = Incr;
01224     return TRUE;
01225 }

BOOL BrushDefinition::SetSpacingMaxRand UINT32  Value  ) 
 

As above.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
: the maximum percentage randomness to be applied to spacing [INPUTS]
Returns:
TRUE if Value is within the legal limits, otherwise FALSE

Definition at line 1322 of file brshcomp.cpp.

01323 {
01324     if (Value < MIN_BRUSH_RAND || Value > MAX_BRUSH_RAND)
01325         return FALSE;
01326     
01327     m_BrushSpacingMaxRand = Value;
01328     return TRUE;
01329 }

void BrushDefinition::SetSpacingRandSeed UINT32  Seed  ) 
 

As above.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
the seed to use for our spacing RNG [INPUTS]
Returns:
-

Definition at line 1361 of file brshcomp.cpp.

01362 {
01363     m_BrushSpacingRandSeed=Seed; // "=Seed" added by AMB 2006-01-06
01364 }

void BrushDefinition::SetTiling BOOL  Value  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
whether or not the brush tiles [INPUTS]
Returns:
-
See also:
-

Definition at line 1648 of file brshcomp.cpp.

01649 {
01650     m_bTile = Value;
01651 }

BOOL BrushDefinition::SetTimeStampingPeriod double  Period  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
time period to set [INPUTS]
Returns:
TRUE if period is valid, else FALSE
See also:
-

Definition at line 2918 of file brshcomp.cpp.

02919 {
02920     if (Period < MIN_TIMESTAMP || Period > MAX_TIMESTAMP)
02921         return FALSE;
02922 
02923     m_TimeStampPeriod = Period;
02924     return TRUE;
02925 }

BOOL BrushDefinition::SetTransparencyPressure UINT32  Value  ) 
 

Sets the extent to which pressure affects transparency.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
Value - the value to set [INPUTS]
Returns:
See also:
-

Definition at line 2496 of file brshcomp.cpp.

02497 {
02498     m_TranspMaxPressure = Value;
02499     return TRUE;
02500 }

BOOL BrushDefinition::StartRender void   ) 
 

Basically due to imprecision in the arithmetic system we ended up corrupting the brush data if we used it too much. So to get around this we never transform the original brush data, instead we make copies of it each time we want to render a version of this brush. This function generates the data copies that we need to render this brush, make sure you call StopRender() to get rid of them.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
4/9/2000
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if successful, FALSE if not. If we return FALSE then don't even think about rendering with this brush.

Definition at line 1065 of file brshcomp.cpp.

01066 {
01067     BrushRef* pBrushRef = GetFirstBrushRef();
01068     BOOL ok = TRUE;
01069     while (pBrushRef != NULL)
01070     {
01071         if (ok)
01072             ok = pBrushRef->MakeCopiesForRendering();
01073         pBrushRef = GetNextBrushRef();
01074     }
01075 
01076     return ok;
01077     
01078 }

void BrushDefinition::StopRender void   ) 
 

Call this when you have finished rendering a node with this brush, it deletes the copied data that we used for rendering.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
4/9/2000
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Definition at line 1096 of file brshcomp.cpp.

01097 {
01098     BrushRef* pBrushRef = GetFirstBrushRef();
01099     while (pBrushRef != NULL)
01100     {
01101         pBrushRef->DeleteRenderCopies();
01102         pBrushRef = GetNextBrushRef();
01103     }
01104 
01105     return;
01106 
01107 }

BOOL BrushDefinition::UsesPressure  ) 
 

as above

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/6/2000
Parameters:
- [INPUTS] Returns TRUE if this brush has one of its pressure variables set

Definition at line 991 of file brshcomp.cpp.

00992 {
00993     if (m_ScalingMaxPressure != 0  ||
00994         m_RotationMaxPressure != 0 ||
00995         m_TranspMaxPressure != 0)
00996         return TRUE;
00997 
00998     return FALSE;
00999 }


Member Data Documentation

BOOL BrushDefinition::m_bActivated [protected]
 

Definition at line 453 of file brshcomp.h.

BOOL BrushDefinition::m_bInitOk [protected]
 

Definition at line 446 of file brshcomp.h.

BOOL BrushDefinition::m_bRotate [protected]
 

Definition at line 394 of file brshcomp.h.

double BrushDefinition::m_BrushHueIncrement [protected]
 

Definition at line 419 of file brshcomp.h.

UINT32 BrushDefinition::m_BrushHueMaxRand [protected]
 

Definition at line 420 of file brshcomp.h.

UINT32 BrushDefinition::m_BrushHueRandSeed [protected]
 

Definition at line 421 of file brshcomp.h.

std::vector< BrushRef * > BrushDefinition::m_BrushRefPtrArray [protected]
 

Definition at line 440 of file brshcomp.h.

double BrushDefinition::m_BrushSatIncrement [protected]
 

Definition at line 424 of file brshcomp.h.

UINT32 BrushDefinition::m_BrushSatMaxRand [protected]
 

Definition at line 425 of file brshcomp.h.

UINT32 BrushDefinition::m_BrushSatRandSeed [protected]
 

Definition at line 426 of file brshcomp.h.

double BrushDefinition::m_BrushScaling [protected]
 

Definition at line 411 of file brshcomp.h.

double BrushDefinition::m_BrushScalingIncr [protected]
 

Definition at line 412 of file brshcomp.h.

double BrushDefinition::m_BrushScalingIncrConst [protected]
 

Definition at line 413 of file brshcomp.h.

UINT32 BrushDefinition::m_BrushScalingMaxRand [protected]
 

Definition at line 414 of file brshcomp.h.

UINT32 BrushDefinition::m_BrushScalingRandSeed [protected]
 

Definition at line 415 of file brshcomp.h.

MILLIPOINT BrushDefinition::m_BrushSpacing [protected]
 

Definition at line 386 of file brshcomp.h.

MILLIPOINT BrushDefinition::m_BrushSpacingIncrConst [protected]
 

Definition at line 388 of file brshcomp.h.

double BrushDefinition::m_BrushSpacingIncrProp [protected]
 

Definition at line 387 of file brshcomp.h.

UINT32 BrushDefinition::m_BrushSpacingMaxRand [protected]
 

Definition at line 389 of file brshcomp.h.

UINT32 BrushDefinition::m_BrushSpacingRandSeed [protected]
 

Definition at line 390 of file brshcomp.h.

INT32 BrushDefinition::m_BrushTransparency [protected]
 

Definition at line 429 of file brshcomp.h.

BOOL BrushDefinition::m_bTile [protected]
 

Definition at line 393 of file brshcomp.h.

UINT32 BrushDefinition::m_DefaultFileID [protected]
 

Definition at line 450 of file brshcomp.h.

UINT32 BrushDefinition::m_HueMaxPressure [protected]
 

Definition at line 422 of file brshcomp.h.

DocRect BrushDefinition::m_LargestBoundingBox [protected]
 

Definition at line 445 of file brshcomp.h.

UINT32 BrushDefinition::m_LastBrushRefRetrieved [protected]
 

Definition at line 443 of file brshcomp.h.

double BrushDefinition::m_MaxScaling [protected]
 

Definition at line 448 of file brshcomp.h.

UINT32 BrushDefinition::m_NumBrushObjects [protected]
 

Definition at line 441 of file brshcomp.h.

UINT32 BrushDefinition::m_OffsetMaxPressure [protected]
 

Definition at line 409 of file brshcomp.h.

UINT32 BrushDefinition::m_OffsetTypeRandSeed [protected]
 

Definition at line 406 of file brshcomp.h.

UINT32 BrushDefinition::m_OffsetValueMaxRand [protected]
 

Definition at line 407 of file brshcomp.h.

UINT32 BrushDefinition::m_OffsetValueRandSeed [protected]
 

Definition at line 408 of file brshcomp.h.

MILLIPOINT BrushDefinition::m_PathOffsetIncrConst [protected]
 

Definition at line 405 of file brshcomp.h.

double BrushDefinition::m_PathOffsetIncrProp [protected]
 

Definition at line 404 of file brshcomp.h.

PathOffset BrushDefinition::m_PathOffsetType [protected]
 

Definition at line 402 of file brshcomp.h.

MILLIPOINT BrushDefinition::m_PathOffsetValue [protected]
 

Definition at line 403 of file brshcomp.h.

double BrushDefinition::m_RotAngleIncrConst [protected]
 

Definition at line 397 of file brshcomp.h.

double BrushDefinition::m_RotAngleIncrProp [protected]
 

Definition at line 396 of file brshcomp.h.

double BrushDefinition::m_RotateAngle [protected]
 

Definition at line 395 of file brshcomp.h.

UINT32 BrushDefinition::m_RotationMaxPressure [protected]
 

Definition at line 400 of file brshcomp.h.

UINT32 BrushDefinition::m_RotationMaxRand [protected]
 

Definition at line 398 of file brshcomp.h.

UINT32 BrushDefinition::m_RotationRandSeed [protected]
 

Definition at line 399 of file brshcomp.h.

UINT32 BrushDefinition::m_SatMaxPressure [protected]
 

Definition at line 427 of file brshcomp.h.

UINT32 BrushDefinition::m_ScalingMaxPressure [protected]
 

Definition at line 416 of file brshcomp.h.

UINT32 BrushDefinition::m_SequenceRandSeed [protected]
 

Definition at line 433 of file brshcomp.h.

SequenceType BrushDefinition::m_SequenceType [protected]
 

Definition at line 432 of file brshcomp.h.

UINT32 BrushDefinition::m_SpacingMaxPressure [protected]
 

Definition at line 391 of file brshcomp.h.

UINT32 BrushDefinition::m_TimeStampMaxPressure [protected]
 

Definition at line 436 of file brshcomp.h.

double BrushDefinition::m_TimeStampPeriod [protected]
 

Definition at line 435 of file brshcomp.h.

UINT32 BrushDefinition::m_TranspMaxPressure [protected]
 

Definition at line 430 of file brshcomp.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:51:41 2007 for Camelot by  doxygen 1.4.4