FillBlobSelectionState Class Reference

Used to record the fill blob selection state to determine wether apply ops should be merged or not. More...

#include <fillattr.h>

List of all members.

Public Member Functions

 FillBlobSelectionState ()
 Constructor for the blob selection state record class.
 ~FillBlobSelectionState ()
 Constructor for the blob selection state record class. Deletes all the blob selection states in the list.
BOOL Record ()
 Makes a record of the current fill blob selection state so it can be compared at some later date.
BOOL operator== (FillBlobSelectionState &SelState)
 Compares two blob states to see if they are the same.
void DeleteAll ()

Private Member Functions

 CC_DECLARE_MEMDUMP (FillBlobSelectionState)

Private Attributes

CCRuntimeClassFillType
UINT32 BlobCount
List BlobStateList


Detailed Description

Used to record the fill blob selection state to determine wether apply ops should be merged or not.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/3/96
See also:
-

Definition at line 712 of file fillattr.h.


Constructor & Destructor Documentation

FillBlobSelectionState::FillBlobSelectionState  ) 
 

Constructor for the blob selection state record class.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/3/96

Definition at line 20275 of file fillattr.cpp.

20276 {
20277     BlobCount = 0;
20278     FillType = NULL;
20279 }

FillBlobSelectionState::~FillBlobSelectionState  ) 
 

Constructor for the blob selection state record class. Deletes all the blob selection states in the list.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/3/96

Definition at line 20292 of file fillattr.cpp.

20293 {
20294     BlobStateList.DeleteAll();
20295 }


Member Function Documentation

FillBlobSelectionState::CC_DECLARE_MEMDUMP FillBlobSelectionState   )  [private]
 

void FillBlobSelectionState::DeleteAll  )  [inline]
 

Definition at line 722 of file fillattr.h.

00722 { BlobStateList.DeleteAll(); }

BOOL FillBlobSelectionState::operator== FillBlobSelectionState SelState  ) 
 

Compares two blob states to see if they are the same.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/3/96
Returns:
TRUE if the blobs states are the same

Definition at line 20360 of file fillattr.cpp.

20361 {
20362 #if !defined(EXCLUDE_FROM_RALPH)
20363     // Were the same type of fills visible ?
20364     if (FillType != SelState.FillType)
20365         return FALSE;
20366 
20367     // Were the same number of blobs selected ?
20368     if (BlobCount != SelState.BlobCount)
20369         return FALSE;
20370 
20371     // Were the same fills selected ?
20372     if (BlobStateList.GetCount() != SelState.BlobStateList.GetCount())
20373         return FALSE;
20374 
20375     // So are they *really* identical ?
20376     if (BlobStateList.GetCount() > 0)
20377     {
20378         FillAttrBlobState* pBlobState = (FillAttrBlobState*)BlobStateList.GetHead();
20379         FillAttrBlobState* pOtherBlobState = (FillAttrBlobState*)SelState.BlobStateList.GetHead();
20380 
20381         while (pBlobState != NULL && pOtherBlobState != NULL)
20382         {
20383             if ( !(*pBlobState == *pOtherBlobState) )
20384                 return FALSE;
20385 
20386             pBlobState = (FillAttrBlobState*)BlobStateList.GetNext(pBlobState);
20387             pOtherBlobState = (FillAttrBlobState*)SelState.BlobStateList.GetNext(pOtherBlobState);
20388         }
20389     }
20390 #endif
20391     return TRUE;
20392 }

BOOL FillBlobSelectionState::Record  ) 
 

Makes a record of the current fill blob selection state so it can be compared at some later date.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/3/96
Returns:
TRUE if all ok

Definition at line 20309 of file fillattr.cpp.

20310 {
20311 #if !defined(EXCLUDE_FROM_RALPH)
20312     BlobStateList.DeleteAll();
20313     FillType = NULL;
20314 
20315     if (GetApplication()->GetBlobManager()->GetCurrentInterest().Fill)
20316     {
20317         FillType = AttrFillGeometry::IsColourMeshVisible() ? CC_RUNTIME_CLASS(AttrFillGeometry)
20318                                                            : CC_RUNTIME_CLASS(AttrTranspFillGeometry);
20319 
20320         // Find the first Fill Attribute in the current Selection
20321         AttrFillGeometry* pAttr = AttrFillGeometry::FindFirstSelectedAttr(FillType);
20322 
20323         while (pAttr != NULL)
20324         {
20325             // Count this fill selected control points
20326             // and keep a running total
20327             if (pAttr->IsVisible())
20328             {
20329                 if (pAttr->GetSelectionCount() > 0)
20330                 {
20331                     FillAttrBlobState* pBlobState = new FillAttrBlobState();
20332                     if (pBlobState != NULL)
20333                     {
20334                         pBlobState->pFillAttr = pAttr;
20335                         pBlobState->count = pAttr->GetSelectionState(&(pBlobState->SelectionState));
20336                         BlobStateList.AddTail(pBlobState);
20337                     }
20338                 }
20339             }
20340 
20341             // Move on to the next Fill
20342             pAttr = AttrFillGeometry::FindNextSelectedAttr(FillType);
20343         }
20344     }
20345 #endif
20346     return TRUE;
20347 }


Member Data Documentation

UINT32 FillBlobSelectionState::BlobCount [private]
 

Definition at line 727 of file fillattr.h.

List FillBlobSelectionState::BlobStateList [private]
 

Definition at line 728 of file fillattr.h.

CCRuntimeClass* FillBlobSelectionState::FillType [private]
 

Definition at line 726 of file fillattr.h.


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