FillTools Class Reference

Provides functionality for generating a list of AttrFillGeometry nodes. This class is used by the profiling function GetProfileFromSelection (virtual overide). More...

#include <filltool.h>

List of all members.

Static Public Member Functions

static BOOL GetSelectedAttrList (List *pList, const CCRuntimeClass *pClass, BOOL bGradFill, BOOL bTranspFill, EffectsStack *pUseThisStack=NULL)
 Returns TRUE if the node is a gradient fill.

Static Private Member Functions

static BOOL IsNodeInList (List *pList, const Node *pNode)
 Enables or disables the check for Similar Fill meshes overwriting each other.Builds a list of all given attribute nodes in the selectionRecurses down the tree building a list of all light attribute nodesReturns TRUE if the node is in the list.
static BOOL IsNodeTrueFill (const Node *pNode)

Static Private Attributes

static BOOL bScanForTransparency


Detailed Description

Provides functionality for generating a list of AttrFillGeometry nodes. This class is used by the profiling function GetProfileFromSelection (virtual overide).

Author:
Chris_Snook (Xara Group Ltd) <camelotdev@xara.com> (based upon DMc BevelTools class)
Date:
9/2/2000
And I'm fed up with explaining why this class exists, so here is a short and blunt explanation:

"we have to do a couple of extra things, so its much better to have the functionality here than it is to go mucking up things as far as bevel nodes etc. are concerned.

Definition at line 237 of file filltool.h.


Member Function Documentation

BOOL FillTools::GetSelectedAttrList List pList,
const CCRuntimeClass pClass,
BOOL  bGradFill,
BOOL  bTranspFill,
EffectsStack pUseThisStack = NULL
[static]
 

Returns TRUE if the node is a gradient fill.

Author:
Chris_Snook (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/2/2000
Parameters:
A ptr to the current node [INPUTS]

Definition at line 521 of file filltool.cpp.

00526 {
00527     ERROR2IF(pList==NULL, FALSE, "GetSelectedAttrList passed NULL list pointer");
00528     ERROR2IF(pClass==NULL, FALSE, "GetSelectedAttrList passed NULL class pointer");
00529 
00530     EffectsStack* pStack = NULL;
00531 
00532     if (pUseThisStack != NULL)
00533         pStack = pUseThisStack;
00534     else
00535         pStack = GetApplication()->FindSelection()->GetEffectsStack();  // From cache
00536 
00537     ENSURE(pStack, "Can't find PostProStack");
00538 
00539     INT32 iStackPos = STACKPOS_TOP;
00540     Range* pLevelRange = pStack->GetLevelRange(&iStackPos, FALSE);      // Don't escape old controllers when scanning for attributes
00541     if (pLevelRange == NULL)
00542         return FALSE;
00543 
00544     Node* pNode = pLevelRange->FindFirst();
00545     while (pNode)
00546     {
00547         if (pNode->IsAnObject())
00548         {
00549             NodeAttribute* pAttr = ((NodeRenderableInk*)pNode)->FindAppliedAttribute((CCRuntimeClass*)pClass);
00550             if (pAttr && !pAttr->IsADefaultAttr() && pAttr->IsAGradFill()==bGradFill && pAttr->IsATranspFill()==bTranspFill)
00551             {
00552                 NodeListItem * pItem = new NodeListItem;
00553                 if (pItem)
00554                 {
00555                     pItem->pNode = pAttr;
00556                     pList->AddTail(pItem);
00557                 }
00558                 else
00559                 {
00560                     pList->DeleteAll();
00561                     return FALSE;
00562                 }
00563             }
00564         }
00565 
00566         pNode = pLevelRange->FindNext(pNode);
00567     }
00568 
00569     return TRUE;
00570 }

BOOL FillTools::IsNodeInList List pList,
const Node pNode
[static, private]
 

Enables or disables the check for Similar Fill meshes overwriting each other.Builds a list of all given attribute nodes in the selectionRecurses down the tree building a list of all light attribute nodesReturns TRUE if the node is in the list.

Author:
Chris_Snook (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/2/2000
Parameters:
A list of NodeListItems and the node to search for [INPUTS]

Definition at line 466 of file filltool.cpp.

00467 {
00468     NodeListItem * pItem = (NodeListItem * )pList->GetHead();
00469 
00470     while (pItem)
00471     {
00472         if (pItem->pNode == pNode)
00473             return TRUE;
00474 
00475         pItem = (NodeListItem * )pList->GetNext(pItem);
00476     }
00477 
00478     return FALSE;
00479 }

static BOOL FillTools::IsNodeTrueFill const Node pNode  )  [static, private]
 


Member Data Documentation

BOOL FillTools::bScanForTransparency [static, private]
 

Definition at line 264 of file filltool.h.


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