NodeMoulder Class Reference

defines the structure of a moulder object. The moulder exists only as a child of a mould object, controlling the production and manipulation of moulded versions of associated siblings. ie for each child (C) of a mould object, we create a moulder object (M). M controls the actual production and rendering of paths and bitmaps generated by C. More...

#include <nodemldr.h>

Inheritance diagram for NodeMoulder:

NodeGroup NodeCompound NodeRenderableInk NodeRenderableBounded NodeRenderable Node CCObject SimpleCCObject List of all members.

Public Member Functions

 NodeMoulder ()
 This constructor creates a NodeMoulder linked to no other with all status flags false and an uninitialized bounding rectangle. Note: Initialise() must be called before the NodeMoulder is in a state in which it can be used.
 ~NodeMoulder ()
 Default destructor.
 NodeMoulder (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE)
BOOL Initialise (NodeRenderableInk *ContextNode)
 Initialise a moulder object with information necessary for it to perform a mould.
virtual NodeSimpleCopy ()
 Makes a copy of all the data in the node.
virtual UINT32 GetNodeSize () const
 For finding the size of the node.
virtual DocRect GetBoundingRect (BOOL DontUseAttrs=FALSE, BOOL HitTest=FALSE)
 if the bounding rect is valid it is returned, if not, it is recalculated and then returned.
virtual DocRect GetBlobBoundingRect ()
 Scan through the Mouldered paths finding bounding boxes of Mouldered objects.
DocRect GetChildBBox (BOOL DontUseAttrs)
 Calculates the bounding rectangle of the children of a moulder object. It does this by scanning the child objects and merging each bounded child bbox together.
virtual void PreExportRender (RenderRegion *pRender)
 Called before this node or any of its children have been rendered to the export region. This outputs the "start mould destin objects" command. Supports ArtWorks EPS and Camelot EPS.
virtual BOOL ExportRender (RenderRegion *pRender)
 Called after this node and all of its children have been rendered to the export region. This outputs the "end mould destin objs" command. Supports ArtWorks EPS and Camelot EPS.
void Render (RenderRegion *pRender)
 Will render the steps of this Moulder node.
virtual BOOL NeedsToExport (RenderRegion *pRender, BOOL VisibleLayersOnly=FALSE, BOOL CheckSelected=FALSE)
 Snaps to given coord to the nearest point on the Moulder node. Just returns FALSE currently Virtual function - this version will return FALSE for exporting to native EPS documents. We dont need the moulded objects in these docs.
virtual BOOL CanBecomeA (BecomeA *pBecomeA)
 This function is used by the convert to shapes operation. It determines if the node or any of its children can convert themselves into an InkClass object.
virtual BOOL DoBecomeA (BecomeA *pBecomeA)
 Transforms the object into another type of object. This converts all its children, and replaces itself in the tree with a NodeGroup.
virtual BOOL AllowOp (ObjChangeParam *pParam, BOOL SetOpPermissionState=TRUE, BOOL DoPreTriggerEdit=TRUE)
 Generic AllowOp() for all moulder nodes.
virtual BOOL OnClick (DocCoord, ClickType, ClickModifiers, Spread *)
 Allows the Node to respond to clicks by selecting its blobs or starting drags etc.
virtual String Describe (BOOL Plural, BOOL Verbose)
 To return a description of the Moulder object in either the singular or the plural. This method is called by the DescribeRange method.
virtual void Transform (TransformBase &)
 Transforms all the paths attached to this Moulder node.
void GetDebugDetails (StringBase *Str)
 Displays debugging info of the tree For obtaining debug information about the Node.
virtual void PolyCopyNodeContents (NodeRenderable *pNodeCopy)
 Polymorphically copies the contents of this node to another.
virtual ChangeCode OnChildChange (ObjChangeParam *pParam)
 This function should be overridden in derived object classes. Composite objects can use this function to respond to one of their children undergoing a change. They should return CC_FAIL whenever they are unable to cope with the change.
virtual BOOL WritePreChildrenWeb (BaseCamelotFilter *pFilter)
 Writes out a records associated with this node.
virtual BOOL WritePreChildrenNative (BaseCamelotFilter *pFilter)
virtual BOOL CanWriteChildrenWeb (BaseCamelotFilter *pFilter)
 This allows a node to stop the filter from writing out the child nodes automatically.
virtual BOOL CanWriteChildrenNative (BaseCamelotFilter *pFilter)
virtual BOOL IsValidEffectAttr (NodeAttribute *pAttr) const
 Get width of pixels for use in capturing this group as a tight group bitmapDetermine whether this type of attribute can be an effect attribute On this node at this time.Determine whether this attribute instance can be an effect attribute On this node at this time.
virtual BOOL GroupCanTransformCached (TransformBase &Trans) const
NodeRenderableInkGetProvider ()
NodePathCreateMouldPath (NodePath *, MouldGeometry *, UndoableOperation *)
 Creates a new Node path object containing a moulded version of the path held within the source node path and returns a pointer to it. This can then be inserted somewhere in the tree.
NodeMouldBitmapCreateMouldBitmap (NodeBitmap *, MouldGeometry *, UndoableOperation *)
 Creates a NodeMouldBitmap object which is used during rendering to render normal bitmaps through the mould.
BOOL CreateMouldedObjects (NodeMouldGroup *pGroup, MouldGeometry *, UndoableOperation *)
 Given a pointer to a moulder object, create all the moulded children using the source objects under the nodemouldgroup object.
BOOL MouldAllChildren (Node *pNode, MouldGeometry *pGeometry, TransformBase &Trans, UndoableOperation *pOp)
 Given a pointer to a node, begin moulding it, all its children and all its forward siblings and their children.
BOOL MouldPath (NodePath *, MouldGeometry *, UndoableOperation *)
 This function moulds the path contained within a NodPath to itself. It will use a temp path as a mould destination and copy this back over the source when successful.
BOOL DestroyMouldedObjects ()

Private Member Functions

void PreExportCAMEPS (RenderRegion *pRegion)
 Export delimiter tokens for this particular object. The format is defined as csmp path description cemp.
BOOL PostExportCAMEPS (RenderRegion *pRegion)
void PreExportAWEPS (RenderRegion *pRegion)
BOOL PostExportAWEPS (RenderRegion *pRegion)
BOOL CreateMouldObjsWithUndo (NodeMouldGroup *pGroup, MouldGeometry *, UndoableOperation *)
 Given a pointer to a moulder object, create all the moulded children using the source objects under the nodemouldgroup object.
BOOL CreateMouldObjsWithoutUndo (NodeMouldGroup *pGroup, MouldGeometry *pGeometry)
 Given a pointer to a moulder object, create all the moulded children using the source objects under the nodemouldgroup object.
void CopyNodeContents (NodeMoulder *pCopyOfNode)
 Copies the data in this node to pCopyOfNode by first calling the base class to get it to copy its stuff, and then copying its own stuff Scope: protected.

Private Attributes

NodeRenderableInkpProviderNode

Detailed Description

defines the structure of a moulder object. The moulder exists only as a child of a mould object, controlling the production and manipulation of moulded versions of associated siblings. ie for each child (C) of a mould object, we create a moulder object (M). M controls the actual production and rendering of paths and bitmaps generated by C.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
1/12/94
See also:
Mould (the parent object)

Definition at line 134 of file nodemldr.h.


Constructor & Destructor Documentation

NodeMoulder::NodeMoulder  ) 
 

This constructor creates a NodeMoulder linked to no other with all status flags false and an uninitialized bounding rectangle. Note: Initialise() must be called before the NodeMoulder is in a state in which it can be used.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
2/12/94
See also:
Initialise()

Definition at line 205 of file nodemldr.cpp.

00205                         : NodeGroup()
00206 {
00207     pProviderNode = NULL;
00208 }

NodeMoulder::~NodeMoulder  ) 
 

Default destructor.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
2/12/94

Definition at line 221 of file nodemldr.cpp.

00222 {
00223 }

NodeMoulder::NodeMoulder Node ContextNode,
AttachNodeDirection  Direction,
BOOL  Locked = FALSE,
BOOL  Mangled = FALSE,
BOOL  Marked = FALSE,
BOOL  Selected = FALSE
 


Member Function Documentation

BOOL NodeMoulder::AllowOp ObjChangeParam pParam,
BOOL  SetOpPermissionState = TRUE,
BOOL  DoPreTriggerEdit = TRUE
[virtual]
 

Generic AllowOp() for all moulder nodes.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>; Karim 20/01/2000
Date:
30/6/95
Parameters:
pParam - pointer to the change parameter object [INPUTS] SetOpPermissionState - TRUE to set the Nodes permission flags DoPreTriggerEdit - if TRUE then calls NameGallery::PreTriggerEdit. Must* be TRUE if the calling Op may make any nodes change their bounds, eg move, line width, cut. Use TRUE if unsure.
Returns:
TRUE if the operation can proceede, FALSE to stop it

Reimplemented from Node.

Definition at line 1502 of file nodemldr.cpp.

01504 {
01505     ERROR2IF(pParam==NULL,FALSE,"Node::AllowOp() - pParam==NULL");
01506 
01507     // if not called by a child AllowOp(), ensure AllowOp() called for all nodes in compound nodes,
01508     if (pParam->GetDirection()!=OBJCHANGE_CALLEDBYCHILD)
01509     {
01510         BOOL AnyAllowed=AllowOp_AccountForCompound( pParam,
01511                                                     SetOpPermissionState,
01512                                                     DoPreTriggerEdit );
01513         // if called by a parent, just pass this result back
01514         if (pParam->GetDirection()==OBJCHANGE_CALLEDBYPARENT)
01515             return AnyAllowed;
01516     }
01517     else
01518     {
01519         // clean out the calling-child ptr, so it doesn't get passed around unintentionally.
01520         pParam->SetCallingChild(NULL);
01521     }
01522 
01523     // at this point we must have been called directly by the op or via a child AllowOp()
01524 
01525     // decide if we allow it, we dont allow very much at the moment, the only thing you can
01526     // actually do to children of a moulder is to copy them
01527     BOOL allowed=TRUE;
01528     ObjChangeFlags Flags=pParam->GetChangeFlags();
01529     if ((pParam->GetDirection()==OBJCHANGE_CALLEDBYCHILD) ||
01530         (pParam->GetDirection()==OBJCHANGE_CALLEDBYOP))
01531 //      if (Flags.DeleteNode || Flags.ReplaceNode || Flags.MoveNode || Flags.Attribute || Flags.MultiReplaceNode || Flags.TransformNode)
01532         {
01533             pParam->SetReasonForDenial(_R(IDS_MOULD_CANT_OP_ON_CHILDREN));
01534             allowed=FALSE;
01535         }
01536 
01537     // if we allowed it, see if our parents do ...
01538     if (allowed && Parent!=NULL)
01539     {
01540         ObjChangeDirection OldDirection=pParam->GetDirection();
01541         pParam->SetCallingChild(this);
01542         pParam->SetDirection(OBJCHANGE_CALLEDBYCHILD);
01543         allowed=Parent->AllowOp(pParam,SetOpPermissionState,DoPreTriggerEdit);
01544         pParam->SetDirection(OldDirection);
01545     }
01546 
01547     // if setting permisions ...
01548     if (SetOpPermissionState)
01549     {
01550         // if allowed, mark parent accordingly, else mark child as denied and update parents
01551         if (allowed)
01552             Parent->SetOpPermission(PERMISSION_ALLOWED);
01553         else
01554             SetOpPermission(PERMISSION_DENIED,TRUE);
01555     }
01556 
01557     // if we're ok so far and were asked to do a PreTriggerEdit, then
01558     // determine whether the Op may change the bounds of some nodes.
01559     // If it may, then call NameGallery::PreTriggerEdit.
01560     if (allowed && DoPreTriggerEdit)
01561     {
01562         // if the Op is non-NULL then query its MayChangeNodeBounds() method.
01563         UndoableOperation* pChangeOp = pParam->GetOpPointer();
01564         if (pChangeOp != NULL && pChangeOp->MayChangeNodeBounds())
01565         {
01566             if (NameGallery::Instance())
01567                 allowed = NameGallery::Instance()->PreTriggerEdit(pChangeOp, pParam, this);
01568         }
01569     }
01570 
01571     // return result (directly, or indirectly via a child AllowOp()) to op
01572     return allowed;
01573 }

BOOL NodeMoulder::CanBecomeA BecomeA pBecomeA  )  [virtual]
 

This function is used by the convert to shapes operation. It determines if the node or any of its children can convert themselves into an InkClass object.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
2/12/94
Parameters:
InkClass,: The class of object [INPUTS] pNumObjects = ptr to place number of objects of type pClass that will be created (Note: can be NULL). pNumObects in undefined on entry
Returns:
TRUE if the node, or any of its children can transmogrify themselves to become an InkClass object
The number you put into pNumObjects (if it's not NULL) should exactly equal the total number of pClass objects you create. It should NOT contain any additional objects you may produce such as group objects for containing the pClass object, or attributes.

Also, the entry value of *pNumObjects cannot be assumed to be 0.

Reimplemented from NodeCompound.

Definition at line 1116 of file nodemldr.cpp.

01117 {
01118     // The NodeMoulder can become a NodePath
01119     if (pBecomeA->BAPath())
01120     {
01121         if (pBecomeA->IsCounting())
01122         {
01123             // Count the number of NodePaths that are children of this NodeMoulder
01124             Node* pNode = FindFirstChild();
01125             while (pNode != NULL)
01126             {
01127                 pNode->CanBecomeA(pBecomeA);        // Increments count
01128 
01129                 pNode = pNode->FindNext();
01130             }
01131         }
01132 
01133         return TRUE;
01134     }
01135 
01136     return FALSE;
01137 }

BOOL NodeMoulder::CanWriteChildrenNative BaseCamelotFilter pFilter  )  [virtual]
 

Reimplemented from Node.

Definition at line 1647 of file nodemldr.cpp.

01648 {
01649     return CanWriteChildrenWeb(pFilter);
01650 }

BOOL NodeMoulder::CanWriteChildrenWeb BaseCamelotFilter pFilter  )  [virtual]
 

This allows a node to stop the filter from writing out the child nodes automatically.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/7/96
Parameters:
pFilter = ptr to the filter to write to [INPUTS]
Returns:
TRUE if children can be written automatically, FALSE otherwise
NodeMoulders do NOT save anything out in the current version of Camelot. Therefore, none of it's children can be saved out either.

Reimplemented from Node.

Definition at line 1640 of file nodemldr.cpp.

01641 {
01642     return FALSE;
01643 }

void NodeMoulder::CopyNodeContents NodeMoulder pCopyOfNode  )  [private]
 

Copies the data in this node to pCopyOfNode by first calling the base class to get it to copy its stuff, and then copying its own stuff Scope: protected.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
2/12/94
Parameters:
pCopyOfNode - The node to copy data to [INPUTS]
See also:
NodeRenderableInk::CopyNodeContents

Definition at line 827 of file nodemldr.cpp.

00828 {
00829     NodeRenderableInk::CopyNodeContents(pCopyOfNode);
00830     // Copy contents specific to derived class here
00831 }

NodeMouldBitmap * NodeMoulder::CreateMouldBitmap NodeBitmap pSourceNodeBlit,
MouldGeometry pGeometry,
UndoableOperation pOp
 

Creates a NodeMouldBitmap object which is used during rendering to render normal bitmaps through the mould.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/12/94
Parameters:
pSourceNodeBlit = pointer to a node bitmap [INPUTS] pGeometry = pointer to a mould shape to use for moulding pOp = pointer to an active operation or NULL if none
See also:
- Notes:
We've found a source bitmap so we need to do something about moulding it. We either mould to a destination bitmap or create a NodeMouldBitmap node, which uses the bitmap and renders through the current mould. Eek

Algorithm (1) Create NodeMouldBitmap node (2) Add the source node type to it (3) Add the source node object pointer to it (4) return ok;

The idea here is hopefully simple. Currently bitmaps get rendered in Camelot as fill attributes. That means what really gets rendered is a rectangular path, with a fill attribute set to the bitmap. We should attempt to simulate this but use one of our manifold paths instead. So when asked to render a NodeMouldBitmap object that we create here, the render function will simply take the original rectangle, mould it and render the result with a bitmap fill. I hope. Hmm, actually this may not be the best way. We need a MouldInk object but we cannot use a pointer to NodeBitmap due to the fact that we are in trouble if we copy the whole structure to another document.

Definition at line 416 of file nodemldr.cpp.

00419 {                           
00420     ERROR2IF(pSourceNodeBlit==NULL, NULL, "CreateMouldBitmap() called with a null source pointer");
00421     ERROR2IF(pGeometry==NULL, NULL, "CreateMouldBitmap() called with a null geometry pointer");
00422 
00423     // ok we have the source node, so lets create a mould render object
00424     NodeMouldBitmap* pNodeMouldBitmap;
00425     ALLOC_WITH_FAIL( pNodeMouldBitmap, new NodeMouldBitmap, pOp);
00426     if (!pNodeMouldBitmap) 
00427         return NULL;
00428 
00429     return pNodeMouldBitmap;
00430 }

BOOL NodeMoulder::CreateMouldedObjects NodeMouldGroup pGroup,
MouldGeometry pGeometry,
UndoableOperation pOp
 

Given a pointer to a moulder object, create all the moulded children using the source objects under the nodemouldgroup object.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/12/94
Parameters:
pGroup = pointer to a node mould group object [INPUTS] pGeometry = pointer to a node path shape to use for moulding pOp = pointer to an active operation or NULL if none
[OUTPUTS] 
Returns:
TRUE if all moulded objects have been created FALSE if unable to create some moulded objects

Definition at line 479 of file nodemldr.cpp.

00480 {
00481     BOOL Success;
00482 
00483     if (pOp!=NULL)
00484         Success=CreateMouldObjsWithUndo(pGroup, pGeometry, pOp);
00485     else
00486         Success=CreateMouldObjsWithoutUndo(pGroup, pGeometry);
00487 
00488     return Success;
00489 }

BOOL NodeMoulder::CreateMouldObjsWithoutUndo NodeMouldGroup pGroup,
MouldGeometry pGeometry
[private]
 

Given a pointer to a moulder object, create all the moulded children using the source objects under the nodemouldgroup object.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/12/94
Parameters:
pGroup = pointer to a node mould group object [INPUTS] pGeometry = pointer to a node path shape to use for moulding
[OUTPUTS] 
Returns:
TRUE if all moulded objects have been created FALSE if unable to create some moulded objects

Definition at line 617 of file nodemldr.cpp.

00618 {
00619     ERROR2IF(pGroup==NULL, FALSE, "CreateMouldedObjects() called with a null group pointer");
00620     ERROR2IF(pGeometry==NULL, FALSE, "CreateMouldedObjects() called with a null geometry pointer");
00621 
00622     Node *pNode;
00623 
00624     // Stage1
00625     // Copy the tree as shapes
00626     if (!pGroup->CopyChildrenAsShapes(this))
00627         return FALSE;
00628 
00629     // Stage2
00630     // Process all objects, moulding each object as we go
00631     pNode = FindFirstChild();
00632     MouldTransform Transformer(pGeometry);
00633     if (!MouldAllChildren(pNode, pGeometry, Transformer, NULL))
00634         return FALSE;
00635 
00636     // Stage 3
00637     // Factor out those attributes!
00638     if (!FactorOutCommonChildAttributes(FALSE,NULL))
00639         return FALSE;
00640 
00641     // Stage3
00642     // Deselect all the naughty selected objects inside ourselves
00643     pNode = FindFirstChild();
00644     while (pNode)
00645     {
00646         pNode->SetSelected(FALSE);
00647         pNode=pNode->FindNext();
00648     }
00649 
00650     // Stage4, make sure we know our bounds will be updated.
00651     InvalidateBoundingRect();
00652     return TRUE;
00653 }

BOOL NodeMoulder::CreateMouldObjsWithUndo NodeMouldGroup pGroup,
MouldGeometry pGeometry,
UndoableOperation pOp
[private]
 

Given a pointer to a moulder object, create all the moulded children using the source objects under the nodemouldgroup object.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/12/94
Parameters:
pGroup = pointer to a node mould group object [INPUTS] pGeometry = pointer to a node path shape to use for moulding pOp = pointer to an active operation
[OUTPUTS] 
Returns:
TRUE if all moulded objects have been created FALSE if unable to create some moulded objects

Definition at line 511 of file nodemldr.cpp.

00512 {
00513     ERROR2IF(pGroup==NULL, FALSE, "CreateMouldedObjects() called with a null group pointer");
00514     ERROR2IF(pGeometry==NULL, FALSE, "CreateMouldedObjects() called with a null geometry pointer");
00515 
00516     Node *pNode, *qNode;
00517 
00518     // Stage 1
00519     // Copy all objects from the mould group to this new moulder object
00520     pNode = pGroup->FindFirstChild();
00521     while (pNode)
00522     {
00523         if (!IS_A(pNode,NodeHidden))
00524         {
00525             if (!pNode->CopyNode(this,LASTCHILD))
00526             {
00527                 CascadeDelete();
00528                 return FALSE;
00529             }
00530         }
00531         pNode=pNode->FindNext();
00532     }
00533 
00534     // Localise the current attributes. I do this because, although
00535     // most DoBecomeA() functions do their own localisation, bitmaps
00536     // see to apply AttrStrokeColour attributes to Pathified bitmaps
00537     // without localisation. This causes things like ConvertToShapes
00538     // produce MakeAttributeComplete found duplicate attr errors.
00539     if (!pOp->DoLocaliseCommonAttributes(this))
00540         return FALSE;
00541 
00542     // Stage 2
00543     // Get all objects to become paths or nodemouldbitmaps
00544     // Set up a BecomeA derived object, so that we can get everyone to become paths
00545     BecomeA ParamBecomeA(BECOMEA_REPLACE, CC_RUNTIME_CLASS(NodePath), pOp, FALSE);
00546     
00547     AttrStrokeType* pStroke = NULL;
00548     
00549     pNode = FindFirstChild();
00550     while (pNode)
00551     {
00552         qNode = pNode->FindNext();
00553         
00554         // bodge to deal with variable width strokes
00555         if (pNode->IsAnObject())
00556         {
00557             ((NodeRenderableInk*)pNode)->FindAppliedAttribute(CC_RUNTIME_CLASS(AttrStrokeType), (NodeAttribute**)&pStroke);
00558             if (pStroke && pStroke->HasPathProcessor())
00559             {
00560                 if (!pStroke->DoBecomeA(&ParamBecomeA, (NodeRenderableInk*)pNode))
00561                     return FALSE;
00562             }
00563             else
00564                 if (!pNode->DoBecomeA(&ParamBecomeA))
00565                     return FALSE;
00566 
00567         }
00568         pStroke = NULL;
00569         pNode=qNode;
00570     }
00571 
00572     // As we've localised lets factor up. Make sure we do the factoring NONE globally.
00573     // We don't want to confuse any attributes.
00574     if (!pOp->DoFactorOutCommonChildAttributes(this))
00575         return FALSE;
00576 
00577     // Stage3
00578     // Process all objects, moulding each object as we go
00579     pNode = FindFirstChild();
00580     MouldTransform Transformer(pGeometry);
00581     if (!MouldAllChildren(pNode, pGeometry, Transformer, pOp))
00582         return FALSE;
00583 
00584     // Stage4
00585     // Deselect all the naughty selected objects inside ourselves
00586     pNode = FindFirstChild();
00587     while (pNode)
00588     {
00589         pNode->SetSelected(FALSE);
00590         pNode=pNode->FindNext();
00591     }
00592 
00593     // Stage5, make sure we know our bounds will be updated.
00594     InvalidateBoundingRect();
00595     return TRUE;
00596 }

NodePath * NodeMoulder::CreateMouldPath NodePath pSourceNodePath,
MouldGeometry pGeometry,
UndoableOperation pOp
 

Creates a new Node path object containing a moulded version of the path held within the source node path and returns a pointer to it. This can then be inserted somewhere in the tree.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/12/94 Inputs pSourceNodePath = pointer to a source node path object pGeometry = pointer to a mould shape pOp = pointer to an active operation or NULL if none
Parameters:
[OUTPUTS] 
Returns:
a pointer to a node path if successfull. NULL if failed to create the object

Definition at line 294 of file nodemldr.cpp.

00297 {                           
00298     ERROR2IF(pSourceNodePath==NULL, NULL, "CreateMouldPath called with a null source pointer");
00299     ERROR2IF(pGeometry==NULL, NULL, "CreateMouldPath called with a null geometry pointer");
00300 
00301     BOOL ok;
00302 
00303     // ok we have the source node, so find the original path and mould it
00304     Path* pSourcePath = &(pSourceNodePath->InkPath);
00305 
00306     // create a node path receptor.
00307     NodePath* pDestinNodePath;
00308     ALLOC_WITH_FAIL( pDestinNodePath, new NodePath, pOp);
00309     if (!pDestinNodePath)
00310         return NULL;
00311 
00312     // allocate the node path some space
00313     CALL_WITH_FAIL((pDestinNodePath->SetUpPath(12,12)),pOp,ok);
00314     if (!ok)
00315     {
00316         delete pDestinNodePath;
00317         return NULL;
00318     }
00319 
00320     // create a destination path receptor for the mould
00321     Path* pDestinPath = &(pDestinNodePath->InkPath);
00322     CALL_WITH_FAIL((pGeometry->MouldPathToPath(pSourcePath, pDestinPath)),pOp,ok);
00323     if (!ok)
00324     {
00325         delete pDestinNodePath;
00326         return NULL;
00327     }
00328 
00329     // Set up the fill where necessary
00330     pDestinPath->IsFilled = pSourcePath->IsFilled;
00331 
00332     return pDestinNodePath;
00333 }

String NodeMoulder::Describe BOOL  Plural,
BOOL  Verbose
[virtual]
 

To return a description of the Moulder object in either the singular or the plural. This method is called by the DescribeRange method.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
5/12/94
Parameters:
Plural,: Flag indicating if the string description should be plural or [INPUTS] singular.
- [OUTPUTS] Retuns: Description of the moulder node
The description will always begin with a lower case letter.

Reimplemented from NodeGroup.

Definition at line 265 of file nodemldr.cpp.

00266 {     
00267     if (Plural)
00268         return(String(_R(IDS_MOULDER_DESCRP)));  
00269     else
00270         return(String(_R(IDS_MOULDER_DESCRS))); 
00271 }; 

BOOL NodeMoulder::DestroyMouldedObjects  ) 
 

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/12/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if the moulder children were all destroyed successfully FALSE, if failed.

Definition at line 447 of file nodemldr.cpp.

00448 {
00449     // first need to add a record to the undo to rebuild the
00450     // moulded objects on a fail!
00451     Node* pChild = FindFirstChild();
00452     if (pChild!=NULL)
00453         DeleteChildren(pChild);
00454 
00455     return TRUE;
00456 }

BOOL NodeMoulder::DoBecomeA BecomeA pBecomeA  )  [virtual]
 

Transforms the object into another type of object. This converts all its children, and replaces itself in the tree with a NodeGroup.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
5/12/94
Parameters:
pBecomeA = ptr to a class that contains all the info needed to become a new [INPUTS] type of node.
- [OUTPUTS]
Returns:
TRUE if the object has been transformed, FALSE if we run out of memory

Errors: -

See also:
Node::CanBecomeA

Reimplemented from NodeCompound.

Definition at line 1158 of file nodemldr.cpp.

01159 {
01160     // Check for a NULL entry param
01161     ERROR2IF_PF(pBecomeA == NULL,FALSE,("NodeMoulder::DoBecomeA() called with a NULL ptr"));
01162 
01163     switch (pBecomeA->GetReason())
01164     {
01165         case BECOMEA_REPLACE:
01166         {
01167             // If replacing the moulder with shapes, hide the moulder, create a group, and move all the children
01168             // so they become children of the new group node
01169             ERROR2IF(pBecomeA->GetUndoOp() == NULL,FALSE,"Trying to replace a NodeMoulder, but pUndoOp == NULL");
01170             UndoableOperation* pUndoOp = pBecomeA->GetUndoOp();
01171             BOOL ok;
01172 
01173             // If being repaced in the tree, deselect the node
01174             BOOL IsSelected=this->IsSelected();
01175             SetSelected(FALSE);
01176 
01177             // Pass on this message to our child ink nodes first
01178             Node* pNode = FindFirstChild();
01179             while (pNode != NULL)
01180             {
01181                 Node* pThisNode = pNode;
01182                 pNode = pNode->FindNext();
01183                 pThisNode->DoBecomeA(pBecomeA);
01184             }
01185 
01186             // Allocate a new NodeGroup node
01187             NodeGroup* pNodeGroup;
01188             ALLOC_WITH_FAIL(pNodeGroup, (new NodeGroup), pUndoOp); 
01189             if (pNodeGroup == NULL)
01190                 return FALSE;
01191 
01192             // Insert the NodeGroup where the NodeMoulder used to be
01193             if (!pUndoOp->DoInsertNewNode(pNodeGroup,this,NEXT,FALSE,FALSE,FALSE,FALSE))
01194                 return FALSE;
01195 
01196             // if we were selected the lets select our group
01197             if (IsSelected)
01198             {
01199                 // Select the group
01200                 if (!pUndoOp->DoSelectNode(pNodeGroup,FALSE))
01201                     return FALSE;
01202             }
01203 
01204             // localise common child attributes before moving objects!
01205             if (!pUndoOp->DoLocaliseCommonAttributes(this))
01206                 return FALSE;
01207 
01208             // Now move each node in turn.
01209             pNode = FindLastChild();
01210             while (pNode != NULL)
01211             {                                                          
01212                 // Find the next node to move before we shift up the children
01213                 Node* pPrevNode = pNode->FindPrevious(); 
01214                 if (pNode->IsAnObject())
01215                 {
01216                     CALL_WITH_FAIL(pUndoOp->DoMoveNode(pNode, pNodeGroup, FIRSTCHILD), pUndoOp, ok);
01217                     if (!ok)
01218                         return FALSE;
01219                 }
01220                 pNode = pPrevNode;  
01221             }
01222 
01223             // factor up on the group.
01224             if (!pUndoOp->DoFactorOutCommonChildAttributes(pNodeGroup))
01225                 return FALSE;
01226 
01227             // Hide the moulder node
01228             NodeHidden* pNodeHidden; 
01229             if (!pUndoOp->DoHideNode(this, FALSE, &pNodeHidden, FALSE))
01230                 return FALSE;                
01231 
01232             // and finally remove any nasty perspective fills from the result
01233             NodeMould::RemovePerspectiveFills(pNodeGroup, pUndoOp);
01234     
01235         }
01236         break;
01237 
01238         case BECOMEA_PASSBACK:
01239         {
01240             // We have been called to becomea passback on the moulder.
01241             // We cannot allow paths to be put in the tree with perspective fills
01242             // in them so we must hide the fills and replace them with standard ones
01243             // We should not do this on the clipboard however as undo/redo fails and
01244             // pasting clipboard contents wont work after!
01245             Document* pOwner = (Document*)FindOwnerDoc();
01246             if (pOwner == NULL || pOwner->IsNotAClipboard())
01247                 NodeMould::RemovePerspectiveFills(this, pBecomeA->GetUndoOp());
01248 
01249             // Sequentially ask the children of the moulder to DoBecomeA
01250             // This is all that's required because the child objects are only passing back
01251             // the new node type, and NOT replacing themselves in the tree
01252             // This also ensures the receipient gets the list of paths in render order
01253             Node* pNode = FindFirstChild();
01254             while (pNode != NULL)
01255             {
01256                 if (!pNode->DoBecomeA(pBecomeA))
01257                     return FALSE;
01258 
01259                 pNode = pNode->FindNext();
01260             }
01261         }
01262         break;
01263 
01264         default:
01265             ERROR3_PF(("Unknown BecomeA reason %d",pBecomeA->GetReason()));
01266             break;
01267     }
01268 
01269 
01270     // If this is a Perspective Mould, then we need to ensure
01271     // that any perspective fills are removed, as it is 
01272     // dangerous to allow the user to edit a shape containing
01273     // a perspectivised fill.
01274     return TRUE;
01275 }

BOOL NodeMoulder::ExportRender RenderRegion pRegion  )  [virtual]
 

Called after this node and all of its children have been rendered to the export region. This outputs the "end mould destin objs" command. Supports ArtWorks EPS and Camelot EPS.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/03/95
Parameters:
pRegion = ptr to the export render region to export to [INPUTS]
[OUTPUTS] 
Returns:
TRUE if ok, FALSE if something went wrong

Errors:

Reimplemented from NodeGroup.

Definition at line 1404 of file nodemldr.cpp.

01405 {
01406 #ifdef DO_EXPORT
01407     if (pRegion->IS_KIND_OF(CamelotEPSRenderRegion))
01408         return PostExportCAMEPS(pRegion);
01409 
01410     if (pRegion->IS_KIND_OF(ArtWorksEPSRenderRegion))
01411         return PostExportAWEPS(pRegion);
01412 #endif  
01413     return FALSE;
01414 }

DocRect NodeMoulder::GetBlobBoundingRect  )  [virtual]
 

Scan through the Mouldered paths finding bounding boxes of Mouldered objects.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
2/12/94
Returns:
DocRect - Returns the bounding rect of the Moulder node and its blobs

Reimplemented from NodeGroup.

Definition at line 1042 of file nodemldr.cpp.

01043 {
01044     return (GetBoundingRect());
01045 }

DocRect NodeMoulder::GetBoundingRect BOOL  DontUseAttrs = FALSE,
BOOL  HitTest = FALSE
[virtual]
 

if the bounding rect is valid it is returned, if not, it is recalculated and then returned.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
2/12/94
Parameters:
DontUseAttrs - TRUE if we should ignore the nodes attributes. [INPUTS] Defaults to FALSE HitTest - TRUE if being called during HitTest
Returns:
The nodes bounding rect
See also:
NodeMoulder::GetBlobBoundingRect

Reimplemented from NodeGroup.

Definition at line 977 of file nodemldr.cpp.

00978 {
00979     if (!IsBoundingRectValid || DontUseAttrs)
00980     {
00981         DocRect NewRect = GetChildBBox(DontUseAttrs);
00982 
00983         // just return this rectangle as it is not the nodes true bounding rect
00984         if (DontUseAttrs) 
00985             return NewRect;
00986             
00987         // copy the new docrect into the node bounding rect
00988         BoundingRectangle = NewRect;
00989         IsBoundingRectValid = TRUE;
00990     }
00991 
00992     // Return the resulting bounding rect
00993     return BoundingRectangle;
00994 }

DocRect NodeMoulder::GetChildBBox BOOL  DontUseAttrs  ) 
 

Calculates the bounding rectangle of the children of a moulder object. It does this by scanning the child objects and merging each bounded child bbox together.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/12/94
Parameters:
DontUseAttrs - TRUE if we should ignore the nodes attributes. [INPUTS] Defaults to FALSE
Returns:
The bounding rectangle of all the moulder children

Definition at line 1013 of file nodemldr.cpp.

01014 {
01015     // Find the moulders mangled object bounds
01016     DocRect Rect(0,0,0,0);
01017     Node* pNode = FindFirstChild();
01018     while (pNode!=NULL)
01019     {
01020         // if this node is bounded, union its bounds with the others
01021         if (pNode->IsBounded())
01022             Rect = Rect.Union(((NodeRenderableBounded*)pNode)->GetBoundingRect(DontUseAttrs));
01023         pNode = pNode->FindNext();
01024     }
01025     return Rect;
01026 }

void NodeMoulder::GetDebugDetails StringBase Str  )  [virtual]
 

Displays debugging info of the tree For obtaining debug information about the Node.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
2/12/94
Parameters:
Str,: String giving debug info about the node [OUTPUTS]

Reimplemented from NodeRenderableBounded.

Definition at line 891 of file nodemldr.cpp.

00892 {
00893 #ifdef _DEBUG
00894     // Call base class
00895     NodeRenderableInk::GetDebugDetails( Str );
00896     
00897     String_256 TempStr;
00898         
00899     (*Str) += TEXT( "\r\nMoulder Data Dump\r\n" );
00900 
00901 /*  TempStr._MakeMsg(   "Mould steps = #1%ld\n"
00902                         "Index start = #2%ld\n"
00903                         "Index end   = #3%ld\n\n"
00904                         "",
00905                         IndexStart,
00906                         IndexEnd);
00907 
00908     *Str += TempStr;
00909 */
00910     DocRect BlobRect = GetBlobBoundingRect();
00911     TempStr._MakeMsg( TEXT("Blob Bounding Rect :-\r\n\t#1%ld,\t#2%ld\r\n\t#3%ld,\t#4%ld\r\n"),
00912                       BlobRect.lo.x, BlobRect.lo.y, BlobRect.hi.x, BlobRect.hi.y );
00913     (*Str) += TempStr;
00914 #endif
00915 }

UINT32 NodeMoulder::GetNodeSize  )  const [virtual]
 

For finding the size of the node.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
2/12/94
Returns:
The size of the node in bytes
See also:
Node::GetSubtreeSize

Reimplemented from NodeGroup.

Definition at line 1062 of file nodemldr.cpp.

01063 {     
01064     return (sizeof(NodeMoulder)); 
01065 }  

NodeRenderableInk* NodeMoulder::GetProvider  )  [inline]
 

Definition at line 205 of file nodemldr.h.

00205 { return pProviderNode; };

virtual BOOL NodeMoulder::GroupCanTransformCached TransformBase Trans  )  const [inline, virtual]
 

Reimplemented from NodeGroup.

Definition at line 201 of file nodemldr.h.

00201 {return FALSE;}

BOOL NodeMoulder::Initialise NodeRenderableInk pContextNode  ) 
 

Initialise a moulder object with information necessary for it to perform a mould.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
2/12/94
Parameters:
pContextNode = pointer to node which will be moulded [INPUTS]
Returns:
TRUE if able to initialise the moulder object FALSE if not

Definition at line 240 of file nodemldr.cpp.

00241 {
00242     ERROR2IF(pContextNode == NULL,FALSE,"pContext == NULL in NodeMoulder::Init");
00243     pProviderNode = pContextNode; 
00244     return (TRUE);
00245 }

virtual BOOL NodeMoulder::IsValidEffectAttr NodeAttribute pAttr  )  const [inline, virtual]
 

Get width of pixels for use in capturing this group as a tight group bitmapDetermine whether this type of attribute can be an effect attribute On this node at this time.Determine whether this attribute instance can be an effect attribute On this node at this time.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/01/2005
Parameters:
Attribute [INPUTS]
Returns:
TRUE if the attr is a valid effect attr

Reimplemented from NodeGroup.

Definition at line 200 of file nodemldr.h.

00200 {return FALSE;}

BOOL NodeMoulder::MouldAllChildren Node pNode,
MouldGeometry pGeometry,
TransformBase Trans,
UndoableOperation pOp
 

Given a pointer to a node, begin moulding it, all its children and all its forward siblings and their children.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/01/95
Parameters:
pNode = pointer to a node to start moulding from [INPUTS] pGeometry = pointer to a node path shape to use for moulding Trans = reference to a mould transform object pOp = pointer to an active operation or NULL if none
[OUTPUTS] 
Returns:
TRUE if all objects have been moulded FALSE if unable to mould some objects

Definition at line 678 of file nodemldr.cpp.

00682 {
00683     Node* qNode;
00684 
00685     while (pNode)
00686     {
00687         if (pNode->IsKindOf(CC_RUNTIME_CLASS(NodePath)))
00688         {
00689             // Ok, alter the path
00690             NodePath* pNodePath = (NodePath*)pNode;
00691             if (!MouldPath(pNodePath,pGeometry,pOp))
00692                 return FALSE;
00693         }
00694         else
00695         {
00696             if (pNode->IsAnAttribute())
00697             {
00698                 NodeAttribute* pAttr = (NodeAttribute*)pNode;
00699 
00700                 if ( pAttr->IsAFillAttr() && IS_A(pGeometry,MouldPerspective) )
00701                 {
00702                     // Tell the fill attr to render perspectivised
00703                     ((AttrFillGeometry*)pAttr)->MakePerspective();
00704                 }
00705 
00706                 pAttr->Transform(Trans);
00707             }
00708         }
00709 
00710         qNode=pNode->FindFirstChild();
00711         pNode=pNode->FindNext();
00712         if (qNode)
00713         {   
00714             if (!MouldAllChildren(qNode, pGeometry, Trans, pOp))
00715                 return FALSE;
00716         }
00717     }
00718     return TRUE;
00719 }

BOOL NodeMoulder::MouldPath NodePath pNodePath,
MouldGeometry pGeometry,
UndoableOperation pOp
 

This function moulds the path contained within a NodPath to itself. It will use a temp path as a mould destination and copy this back over the source when successful.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/12/94 Inputs pNodePath = pointer to a source node path object pGeometry = pointer to a mould shape pOp = pointer to an active operation or NULL if none
Parameters:
[OUTPUTS] 
Returns:
TRUE if the path has been moulded correctly FALSE, then unable to mould the path, the originial is intact

Definition at line 357 of file nodemldr.cpp.

00360 {                           
00361     ERROR2IF(pNodePath==NULL, FALSE, "MouldPath called with a null source pointer");
00362     ERROR2IF(pGeometry==NULL, FALSE, "MouldPath called with a null geometry pointer");
00363 
00364     // ok we have the source node, so find the original path and mould it
00365     Path* pSourcePath = &(pNodePath->InkPath);
00366 
00367     // convert the source path into a destination path
00368     if (!pGeometry->MouldPathToPath(pSourcePath, pSourcePath))
00369         return FALSE;
00370 
00371     pNodePath->InvalidateBoundingRect();
00372     return TRUE;
00373 }

BOOL NodeMoulder::NeedsToExport RenderRegion pRender,
BOOL  VisibleLayersOnly = FALSE,
BOOL  CheckSelected = FALSE
[virtual]
 

Snaps to given coord to the nearest point on the Moulder node. Just returns FALSE currently Virtual function - this version will return FALSE for exporting to native EPS documents. We dont need the moulded objects in these docs.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/03/95
Parameters:
pRender - A pointer to the current export region [INPUTS] VisibleLayersOnly - TRUE => remove nodes which are on invisible layers
  • FALSE => export everything CheckSelected - TRUE => we check if object selected and only export selected bjects
  • FALSE => we don't bother checking for selection or not
    Returns:
    TRUE => please export me.

Reimplemented from NodeRenderable.

Definition at line 1326 of file nodemldr.cpp.

01328 {
01329 #ifdef DO_EXPORT
01330     if (pRender==NULL)
01331         return TRUE;
01332 
01333     // dont export to native documents
01334     if (pRender->IS_KIND_OF(NativeRenderRegion))
01335         return FALSE;
01336 
01337     // If we have the check selection flag on then see if this moulder node is:-
01338     // - selected or not = render it
01339     // - a child of the selection e.g. part of selected group where we are an item in the
01340     //   group and hence are not directly selected but still need to be exported
01341     // - a parent of the selected item e.g. selected inside item of group and we are at the
01342     //   group and hence need to include the group in the range 
01343     // Otherwise just return True as this is a moulder node and always needs to be exported
01344     // unless of course some node overrides this or the test above fails.
01345     if (CheckSelected)
01346         return (IsSelected() || IsChildOfSelected() || IsParentOfSelected());
01347     else
01348         return TRUE;
01349 #else
01350     return FALSE;
01351 #endif
01352 }

ChangeCode NodeMoulder::OnChildChange ObjChangeParam pParam  )  [virtual]
 

This function should be overridden in derived object classes. Composite objects can use this function to respond to one of their children undergoing a change. They should return CC_FAIL whenever they are unable to cope with the change.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/01/95
Parameters:
pParam = pointer to a object change parameter class [INPUTS]
Returns:
CC_OK if we have successfully processed the change. CC_FAIL if we cannot handle this particular change and must prevent the child from continuing
See also:
WarnParentOfChange();

Reimplemented from NodeGroup.

Definition at line 1594 of file nodemldr.cpp.

01595 {
01596     return CC_OK;
01597 }

BOOL NodeMoulder::OnClick DocCoord  PointerPos,
ClickType  Click,
ClickModifiers  ClickMods,
Spread pSpread
[virtual]
 

Allows the Node to respond to clicks by selecting its blobs or starting drags etc.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/10/94
Parameters:
PointerPos - The Location of the mouse pointer at the time of the click [INPUTS] Click - The type of click received (single, double, drag etc) ClickMods - The modifiers to the click (eg shift, control etc )
Returns:
BOOL - TRUE if the node claims the click as its own and FALSE if it is not interested in the click

Reimplemented from NodeGroup.

Definition at line 1086 of file nodemldr.cpp.

01088 {
01089     // we did not use the click, so let someone else try
01090     return FALSE;
01091 }

void NodeMoulder::PolyCopyNodeContents NodeRenderable pNodeCopy  )  [virtual]
 

Polymorphically copies the contents of this node to another.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/12/2003
Parameters:
- [OUTPUTS]
Returns:
Errors: An assertion failure will occur if NodeCopy is NULL Scope: protected

Reimplemented from NodeGroup.

Definition at line 846 of file nodemldr.cpp.

00847 {
00848     ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node");
00849     ENSURE(IS_A(pNodeCopy, NodeMoulder), "PolyCopyNodeContents given wrong dest node type");
00850 
00851     if (IS_A(pNodeCopy, NodeMoulder))
00852         CopyNodeContents((NodeMoulder*)pNodeCopy);
00853 }

BOOL NodeMoulder::PostExportAWEPS RenderRegion pRegion  )  [private]
 

Definition at line 1475 of file nodemldr.cpp.

01476 {
01477     return FALSE;
01478 }

BOOL NodeMoulder::PostExportCAMEPS RenderRegion pRegion  )  [private]
 

Definition at line 1445 of file nodemldr.cpp.

01446 {
01447 #ifdef DO_EXPORT
01448     // Make sure this token goes out only in Native documents
01449     if (pRegion->IS_KIND_OF(NativeRenderRegion))
01450     {
01451         EPSExportDC *pDC = (EPSExportDC *) pRegion->GetRenderDC();
01452         pDC->OutputToken(_T("cedo"));           // Camelot "end mould destin" token
01453         pDC->OutputNewLine();
01454         return TRUE;
01455     }
01456 #endif
01457     // Otherwise render as paths (e.g. in EPS)
01458     return FALSE;
01459 }

void NodeMoulder::PreExportAWEPS RenderRegion pRegion  )  [private]
 

void NodeMoulder::Pre/Post ExportAWEPS(RenderRegion* pRegion)

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/03/95

Definition at line 1471 of file nodemldr.cpp.

01472 {
01473 }

void NodeMoulder::PreExportCAMEPS RenderRegion pRegion  )  [private]
 

Export delimiter tokens for this particular object. The format is defined as csmp path description cemp.

BOOL NodeMoulder::Pre/Post ExportCAMEPS(RenderRegion* pRegion)

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/03/95

Definition at line 1431 of file nodemldr.cpp.

01432 {
01433 #ifdef DO_EXPORT
01434     // Make sure this token goes out only in Native documents
01435     if (pRegion->IS_KIND_OF(NativeRenderRegion))
01436     {
01437         EPSExportDC *pDC = (EPSExportDC *) pRegion->GetRenderDC();
01438         pDC->OutputToken(_T("csdo"));           // Camelot "start mould destin" token
01439         pDC->OutputNewLine();
01440     }
01441 #endif
01442 }

void NodeMoulder::PreExportRender RenderRegion pRegion  )  [virtual]
 

Called before this node or any of its children have been rendered to the export region. This outputs the "start mould destin objects" command. Supports ArtWorks EPS and Camelot EPS.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/03/95
Parameters:
pRegion = ptr to the export render region to export to [INPUTS]
[OUTPUTS] 
Returns:

Errors:

Reimplemented from NodeGroup.

Definition at line 1371 of file nodemldr.cpp.

01372 {
01373 #ifdef DO_EXPORT
01374     if (pRegion->IS_KIND_OF(CamelotEPSRenderRegion))
01375     {
01376         PreExportCAMEPS(pRegion);
01377         return;
01378     } 
01379 
01380     if (pRegion->IS_KIND_OF(ArtWorksEPSRenderRegion))
01381     {
01382         PreExportAWEPS(pRegion);
01383         return;
01384     }
01385 #endif
01386 }

void NodeMoulder::Render RenderRegion pRender  )  [virtual]
 

Will render the steps of this Moulder node.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/10/94
Parameters:
Pointer to a render region [INPUTS]

Reimplemented from Node.

Definition at line 953 of file nodemldr.cpp.

00954 {
00955 //  pRender->SaveContext();
00956 //  RenderMoulderedObjs(pRender);       // Only supply a render region, because we're only rendering
00957 //  pRender->RestoreContext();
00958 }  

Node * NodeMoulder::SimpleCopy void   )  [virtual]
 

Makes a copy of all the data in the node.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
2/12/94
Returns:
Pointer to a Node

Reimplemented from NodeGroup.

Definition at line 802 of file nodemldr.cpp.

00803 {
00804     // Make a new NodeMoulder and then copy things into it
00805     NodeMoulder* pCopyOfNode = new NodeMoulder();
00806     if (pCopyOfNode)
00807         CopyNodeContents(pCopyOfNode);
00808     
00809     return pCopyOfNode;
00810 }            

void NodeMoulder::Transform TransformBase Trans  )  [virtual]
 

Transforms all the paths attached to this Moulder node.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
2/12/94
Parameters:
Trans - The transform Object [INPUTS]
See also:
NodeRenderableInk::Transform()

Reimplemented from NodeGroup.

Definition at line 931 of file nodemldr.cpp.

00932 {
00933     // the moulder node bbox is now invalid
00934     InvalidateBoundingRect();
00935     // Transform all the children
00936     // See GroupCanTransformCached()
00937     NodeGroup::Transform(Trans);
00938 }

BOOL NodeMoulder::WritePreChildrenNative BaseCamelotFilter pFilter  )  [virtual]
 

Reimplemented from NodeGroup.

Definition at line 1620 of file nodemldr.cpp.

01621 {
01622     return WritePreChildrenWeb(pFilter);
01623 }

BOOL NodeMoulder::WritePreChildrenWeb BaseCamelotFilter pFilter  )  [virtual]
 

Writes out a records associated with this node.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/7/96
Parameters:
pFilter = ptr to the filter to write to [INPUTS]
Returns:
TRUE is a record has been written, FALSE otherwise
NodeMoulders do NOT save anything out in the current version of Camelot.

Reimplemented from NodeGroup.

Definition at line 1613 of file nodemldr.cpp.

01614 {
01615     return FALSE;
01616 }


Member Data Documentation

NodeRenderableInk* NodeMoulder::pProviderNode [private]
 

Definition at line 226 of file nodemldr.h.


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