#include <brshbeca.h>
Inheritance diagram for BrushBecomeA:
Public Member Functions | |
BrushBecomeA (BecomeAReason Reason, CCRuntimeClass *pClass, UndoableOperation *pOp, BlendRef *pThisBlendRef) | |
constructor | |
virtual BOOL | PassBack (NodeRenderableInk *pNewNode, NodeRenderableInk *pCreatedByNode, CCAttrMap *pAttrMap) |
the money function, takes the nodepaths that are generated and makes blendpaths out of them. Note that for this to work pNewNode MUST be a nodepath. | |
Protected Attributes | |
BlendRef * | m_pBlendRef |
Definition at line 171 of file brshbeca.h.
|
constructor
Definition at line 544 of file brshbeca.cpp. 00545 : BecomeA(Reason, pClass, pOp) 00546 { 00547 m_pBlendRef = pBlendRef; 00548 }
|
|
the money function, takes the nodepaths that are generated and makes blendpaths out of them. Note that for this to work pNewNode MUST be a nodepath.
Reimplemented from BecomeA. Definition at line 567 of file brshbeca.cpp. 00568 { 00569 ERROR2IF(pNewNode == NULL || pCreatedByNode == NULL, FALSE, "Input pointers are NULL in BrushBecomeA::PassBack"); 00570 00571 if (!pNewNode->IsNodePath()) 00572 { 00573 ERROR3("New node is not NodePath in BrushBecomeA::PassBack"); 00574 return FALSE; 00575 } 00576 00577 Path* pInkPath = &(((NodePath*)pNewNode)->InkPath); 00578 00579 //Node * pPathNode = (NodePath *)pNewNode; 00580 00581 //INT32 NumCoords = pInkPath->GetNumCoords(); 00582 //INT32 StartIndex=0,EndIndex=0; 00583 //UINT32 NumSubPaths=0; 00584 00585 // Create a new NodePath for this subpath 00586 NodePath* pNewNodePath = new NodePath; 00587 BOOL ok = (pNewNodePath != NULL); 00588 if (ok) 00589 { 00590 // Copy the subpath in TempPath into the new NodePath's path object 00591 Path* pNewPath = &(pNewNodePath->InkPath); 00592 ok = pNewPath->Initialise(pInkPath->GetNumCoords()); 00593 00594 if (ok) ok = pNewPath->CopyPathDataFrom(pInkPath); 00595 00596 if (ok) 00597 { 00598 // Create a new BlendPath obect 00599 BlendPath* pBlendPath = new BlendPath; 00600 ok = (pBlendPath != NULL); 00601 00602 // Initialise the BlendPath object with the generated NodePath 00603 // and add the BlendPath to the BlendRef 00604 if (ok) ok = pBlendPath->Initialise(pNewNodePath, 0, pCreatedByNode, 1, 0, pAttrMap, FALSE); 00605 if (ok) ok = m_pBlendRef->AddBlendPath(pBlendPath); 00606 00607 } 00608 } 00609 00610 00611 if (ok) 00612 { 00613 //pBlendRef->SetAWComplex(NumSubPaths > 1); // This is the 'complex' flag used when exporting to AW EPS 00614 pNewNode->CascadeDelete(); 00615 delete pNewNode; 00616 pNewNode = NULL; 00617 } 00618 00619 return ok; 00620 }
|
|
Definition at line 187 of file brshbeca.h. |