AttrFillMappingLinear Class Reference

Linear fill mapping Attribute class. More...

#include <fillattr2.h>

Inheritance diagram for AttrFillMappingLinear:

AttrFillMapping NodeAttribute NodeRenderable Node CCObject SimpleCCObject List of all members.

Public Member Functions

 AttrFillMappingLinear ()
 AttrFillMappingLinear (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE)
void Render (RenderRegion *pRender)
 'Renders' a linear graduation fill mapping attribute.
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 GetAttrNameID (void)
 Returns a string resource ID describing the attribute.
virtual UINT32 GetNodeSize () const
 For finding the size of the node.
virtual AttributeValueGetAttributeValue ()
virtual BOOL WritePreChildrenWeb (BaseCamelotFilter *pFilter)
 Writes the linear fill mapping record to the filter.
virtual BOOL WritePreChildrenNative (BaseCamelotFilter *pFilter)
virtual void PolyCopyNodeContents (NodeRenderable *pNodeCopy)
 Polymorphically copies the contents of this node to another.

Public Attributes

FillMappingLinearAttribute Value

Private Member Functions

BOOL CopyNodeContents (AttrFillMappingLinear *NodeCopy)
 This method copies the node's contents to the node pointed to by NodeCopy.

Detailed Description

Linear fill mapping Attribute class.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/07/94
See also:
FillMappingLinearAttribute

Definition at line 2568 of file fillattr2.h.


Constructor & Destructor Documentation

AttrFillMappingLinear::AttrFillMappingLinear  )  [inline]
 

Definition at line 2573 of file fillattr2.h.

02573 : AttrFillMapping() {}

AttrFillMappingLinear::AttrFillMappingLinear Node ContextNode,
AttachNodeDirection  Direction,
BOOL  Locked = FALSE,
BOOL  Mangled = FALSE,
BOOL  Marked = FALSE,
BOOL  Selected = FALSE
[inline]
 

Definition at line 2574 of file fillattr2.h.

02579                                      : 
02580         AttrFillMapping(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}


Member Function Documentation

BOOL AttrFillMappingLinear::CopyNodeContents AttrFillMappingLinear NodeCopy  )  [private]
 

This method copies the node's contents to the node pointed to by NodeCopy.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/8/94
Parameters:
NodeCopy - the node to copy. [INPUTS]
A copy of this node [OUTPUTS]
Returns:
Errors: An assertion failure will occur if NodeCopy is NULL Scope: protected

Definition at line 18383 of file fillattr.cpp.

18384 {
18385     ERROR2IF(NodeCopy == NULL, FALSE, "NULL pointer in AttrFillMappingLinear::CopyNodeContents!");
18386 
18387     NodeAttribute::CopyNodeContents(NodeCopy);
18388 
18389     // Copy contents specific to derived class here
18390     NodeCopy->Value.SimpleCopy(&Value);
18391     return TRUE;
18392 } 

virtual AttributeValue* AttrFillMappingLinear::GetAttributeValue  )  [inline, virtual]
 

Reimplemented from NodeAttribute.

Definition at line 2588 of file fillattr2.h.

02588 { return &Value; }

UINT32 AttrFillMappingLinear::GetAttrNameID void   )  [virtual]
 

Returns a string resource ID describing the attribute.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/8/94
Returns:
Attribute description ID

Reimplemented from NodeAttribute.

Definition at line 18363 of file fillattr.cpp.

18364 {
18365     return (_R(IDS_FILLMAPPINGLINEAR)); 
18366 }                                  

UINT32 AttrFillMappingLinear::GetNodeSize  )  const [virtual]
 

For finding the size of the node.

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

Reimplemented from Node.

Definition at line 18430 of file fillattr.cpp.

18431 {     
18432     return (sizeof(AttrFillMappingLinear)); 
18433 }  

void AttrFillMappingLinear::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 NodeRenderable.

Definition at line 18407 of file fillattr.cpp.

18408 {
18409     ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node");
18410     ENSURE(IS_A(pNodeCopy, AttrFillMappingLinear), "PolyCopyNodeContents given wrong dest node type");
18411 
18412     if (IS_A(pNodeCopy, AttrFillMappingLinear))
18413         CopyNodeContents((AttrFillMappingLinear*)pNodeCopy);
18414 }

void AttrFillMappingLinear::Render RenderRegion pRender  )  [virtual]
 

'Renders' a linear graduation fill mapping attribute.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/8/94

Reimplemented from NodeAttribute.

Definition at line 18320 of file fillattr.cpp.

18321 {
18322     pRender->SetFillMapping(&Value, FALSE);
18323 }

Node * AttrFillMappingLinear::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:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/8/94
Returns:
A copy of the node, or NULL if memory runs 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. Scope: protected

Reimplemented from NodeAttribute.

Definition at line 18341 of file fillattr.cpp.

18342 {
18343     AttrFillMappingLinear* NodeCopy = new AttrFillMappingLinear;
18344     if (NodeCopy == NULL)
18345         return NULL;
18346 
18347     CopyNodeContents(NodeCopy);
18348     
18349     return NodeCopy;
18350 }  

BOOL AttrFillMappingLinear::WritePreChildrenNative BaseCamelotFilter pFilter  )  [virtual]
 

Reimplemented from Node.

Definition at line 18491 of file fillattr.cpp.

18492 {
18493 #ifdef DO_EXPORT
18494     return WritePreChildrenWeb(pFilter);
18495 #else
18496     return FALSE;
18497 #endif
18498 }

BOOL AttrFillMappingLinear::WritePreChildrenWeb BaseCamelotFilter pFilter  )  [virtual]
 

Writes the linear fill mapping record to the filter.

> virtual BOOL AttrFillMappingLinear::WritePreChildrenWeb(BaseCamelotFilter* pFilter)

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/5/96
Parameters:
pFilter = ptr to the filter [INPUTS]
Returns:
TRUE if record is written, FALSE if not
See also:
-

Reimplemented from Node.

Definition at line 18451 of file fillattr.cpp.

18452 {
18453 #ifdef DO_EXPORT
18454     ERROR2IF(pFilter == NULL,FALSE,"NULL filter param");
18455 
18456     UINT32 Tag = TAG_UNDEFINED, TagSize = 1;
18457     switch (Value.Repeat)
18458     {
18459         case 0 :
18460         case 1 :    Tag     = TAG_FILL_NONREPEATING;
18461                     TagSize = TAG_FILL_NONREPEATING_SIZE;
18462                     break;
18463         case 2 :    Tag     = TAG_FILL_REPEATING;
18464                     TagSize = TAG_FILL_REPEATING_SIZE;
18465                     break;
18466         case 3 :    Tag     = TAG_FILL_REPEATINGINVERTED;
18467                     TagSize = TAG_FILL_REPEATINGINVERTED_SIZE;
18468                     break;
18469 //Mark Howitt. 8/10/97. Make repeating grad fills a special case
18470 #ifdef NEW_FEATURES
18471         case 4 :    Tag     = TAG_FILL_REPEATING_EXTRA;
18472                     TagSize = TAG_FILL_REPEATING_EXTRA_SIZE;
18473                     break;
18474 #endif
18475         default:
18476             ERROR3("Unknown repeat type in this fill mapping attr");
18477             return FALSE;
18478             break;
18479     }
18480 
18481     CamelotFileRecord Rec(pFilter,Tag,TagSize);
18482     return pFilter->Write(&Rec);
18483 #else
18484     return FALSE;
18485 #endif
18486 }


Member Data Documentation

FillMappingLinearAttribute AttrFillMappingLinear::Value
 

Definition at line 2599 of file fillattr2.h.


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