NodeMouldBitmap Class Reference

This class controls the renderable mould objects. ie those objects which are moulded and rendered in one action. It will live under Moulder objects along with NodePaths eg. More...

#include <ndmldink.h>

Inheritance diagram for NodeMouldBitmap:

NodeRenderableInk NodeRenderableBounded NodeRenderable Node CCObject SimpleCCObject List of all members.

Public Member Functions

 NodeMouldBitmap ()
 This constructor creates a NodeMouldBitmap linked to no other, with all status flags false and an uninitialised bounding rectangle.
 NodeMouldBitmap (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE)
 This method initialises the node and links it to ContextNode in the direction specified by Direction. All necessary tree links are updated.
 ~NodeMouldBitmap ()
 default destructor for the NodeMouldBitmap class
virtual void Render (RenderRegion *pRegion)
 Will construct a moulded path from the renderable reference nodes bounding rectangle and render the reference node into it. This currently only makes sense for bitmap nodes. These are usually rendered as bitmap fills inside a rectangle. If we can generate the destination path by moulding the NodeBitmap bounding rectangle, we should be able to render the bitmap into the result.
virtual String Describe (BOOL Plural, BOOL Verbose)
 To return a description of the NodeMouldBitmap object in either the singular or the plural. This method is called by the DescribeRange method. The description will always begin with a lower case letter.
virtual NodeSimpleCopy ()
 This method returns a shallow copy of the node with all Node pointers NULL. The function is virtual, and must be defined for all derived classes.
virtual UINT32 GetNodeSize () const
 For finding the size of the node.
virtual void PolyCopyNodeContents (NodeRenderable *pNodeCopy)
 Polymorphically copies the contents of this node to another.

Private Member Functions

 CC_DECLARE_DYNAMIC (NodeMouldBitmap)
void CopyNodeContents (NodeMouldBitmap *pCopyOfNode)
 Copies the data from this node to pCopyOfNode by first calling the base class to get it to copy its stuff, and then copying its own stuff.

Detailed Description

This class controls the renderable mould objects. ie those objects which are moulded and rendered in one action. It will live under Moulder objects along with NodePaths eg.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/12/94
NodeMoulder NodePath -> NodePath -> NodeMouldBitmap -> NodePath -> NodeMouldBitmap etc

Definition at line 124 of file ndmldink.h.


Constructor & Destructor Documentation

NodeMouldBitmap::NodeMouldBitmap  ) 
 

This constructor creates a NodeMouldBitmap linked to no other, with all status flags false and an uninitialised bounding rectangle.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/12/94
Parameters:
[INPUTS] 
[OUTPUTS] 
Returns:

Errors:

Definition at line 135 of file ndmldink.cpp.

00135                                 : NodeRenderableInk()
00136 {
00137 }

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

This method initialises the node and links it to ContextNode in the direction specified by Direction. All necessary tree links are updated.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
5/12/94
Parameters:
ContextNode,: Pointer to a node which this node is to be attached to. [INPUTS]
Direction:

Specifies the direction in which this node is to be attached to the ContextNode. The values this variable can take are as follows:

PREV : Attach node as a previous sibling of the context node NEXT : Attach node as a next sibling of the context node FIRSTCHILD: Attach node as the first child of the context node LASTCHILD : Attach node as a last child of the context node

The remaining inputs specify the status of the node:

Locked: Is node locked ? Mangled: Is node mangled ? Marked: Is node marked ? Selected: Is node selected ?

Parameters:
- [OUTPUTS]
Returns:
-

Errors: An assertion error will occur if ContextNode is NULL

Definition at line 184 of file ndmldink.cpp.

00190                 :NodeRenderableInk(ContextNode, Direction, Locked, Mangled, Marked, Selected) 
00191 { 
00192 } 

NodeMouldBitmap::~NodeMouldBitmap  ) 
 

default destructor for the NodeMouldBitmap class

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

Definition at line 205 of file ndmldink.cpp.

00206 {
00207 }


Member Function Documentation

NodeMouldBitmap::CC_DECLARE_DYNAMIC NodeMouldBitmap   )  [private]
 

void NodeMouldBitmap::CopyNodeContents NodeMouldBitmap pCopyOfNode  )  [private]
 

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

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/12/94
Parameters:
pCopyOfNode - The node to copy data to [INPUTS]
- [OUTPUTS]
Returns:
-

Definition at line 309 of file ndmldink.cpp.

00310 {
00311     ERROR3IF(pCopyOfNode == NULL,"NodeMouldBitmap::CopyNodeContents was asked to copy into a NULL pointer");
00312 
00313     // Copy from the base class
00314     NodeRenderableInk::CopyNodeContents(pCopyOfNode);
00315 
00316 }

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

To return a description of the NodeMouldBitmap object in either the singular or the plural. This method is called by the DescribeRange method. The description will always begin with a lower case letter.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/12/94
Parameters:
Plural,: Flag indicating if the string description should be plural or [INPUTS] singular.
- [OUTPUTS] Retuns: Description of the mould node
Returns:
Errors: -
See also:
-

Reimplemented from Node.

Definition at line 257 of file ndmldink.cpp.

00258 {     
00259     if (Plural)
00260         return(String(_R(IDS_MOULDINK_DESCRP)));  
00261     else
00262         return(String(_R(IDS_MOULDINK_DESCRS))); 
00263 }; 

UINT32 NodeMouldBitmap::GetNodeSize  )  const [virtual]
 

For finding the size of the node.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/12/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
The size of the node in bytes

Reimplemented from Node.

Definition at line 355 of file ndmldink.cpp.

00356 {     
00357     return (sizeof(NodeMouldBitmap)); 
00358 }  

void NodeMouldBitmap::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 NodeRenderableBounded.

Definition at line 331 of file ndmldink.cpp.

00332 {
00333     ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node");
00334     ENSURE(IS_A(pNodeCopy, NodeMouldBitmap), "PolyCopyNodeContents given wrong dest node type");
00335 
00336     if (IS_A(pNodeCopy, NodeMouldBitmap))
00337         CopyNodeContents((NodeMouldBitmap*)pNodeCopy);
00338 }

void NodeMouldBitmap::Render RenderRegion pRegion  )  [virtual]
 

Will construct a moulded path from the renderable reference nodes bounding rectangle and render the reference node into it. This currently only makes sense for bitmap nodes. These are usually rendered as bitmap fills inside a rectangle. If we can generate the destination path by moulding the NodeBitmap bounding rectangle, we should be able to render the bitmap into the result.

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

Reimplemented from Node.

Definition at line 227 of file ndmldink.cpp.

00228 {            
00229     // find the mould root object
00230     /*
00231     NodeMould* pNodeMould = (NodeMould*)this->FindParent(CC_RUNTIME_CLASS(NodeMould));
00232     MouldGeometry* pMouldGeom = pNodeMould->GetGeometry();
00233     if (pMouldGeom)
00234         pMouldGeom->MouldBitmapRender(&TheBitmap, Parallel, pRegion);
00235     */
00236 }

Node * NodeMouldBitmap::SimpleCopy void   )  [virtual]
 

This method returns a shallow copy of the node with all Node pointers NULL. The function is virtual, and must be defined for all derived classes.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/12/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
A copy of the node, or NULL if memory has run out

Errors: If memory runs out when trying to copy, then ERROR is called with an out of memory error and the function returns NULL.

Reimplemented from NodeRenderableInk.

Definition at line 286 of file ndmldink.cpp.

00287 {
00288     NodeMouldBitmap* pCopyOfNode = new NodeMouldBitmap();
00289     ERROR1IF(pCopyOfNode == NULL,NULL,_R(IDE_NOMORE_MEMORY)); 
00290     CopyNodeContents(pCopyOfNode);
00291     return (pCopyOfNode);
00292 }   


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