AttrTranspFillMappingLinear Class Reference

Linear fill mapping Attribute class. More...

#include <fillattr2.h>

Inheritance diagram for AttrTranspFillMappingLinear:

AttrTranspFillMapping NodeAttribute NodeRenderable Node CCObject SimpleCCObject List of all members.

Public Member Functions

 AttrTranspFillMappingLinear ()
 AttrTranspFillMappingLinear (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE)
void Render (RenderRegion *pRender)
 'Renders' a linear graduation FillTransp 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 void PolyCopyNodeContents (NodeRenderable *pNodeCopy)
 Polymorphically copies the contents of this node to another.
virtual BOOL HasEquivalentDefaultValue (BOOL bAppearance=FALSE)
 Determine whether this attribute has the default value or not.
virtual BOOL WritePreChildrenWeb (BaseCamelotFilter *pFilter)
 Writes the linear fill mapping record to the filter.
virtual BOOL WritePreChildrenNative (BaseCamelotFilter *pFilter)

Public Attributes

TranspFillMappingLinearAttribute Value

Private Member Functions

BOOL CopyNodeContents (AttrTranspFillMappingLinear *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:
TranspFillMappingLinearAttribute

Definition at line 2861 of file fillattr2.h.


Constructor & Destructor Documentation

AttrTranspFillMappingLinear::AttrTranspFillMappingLinear  )  [inline]
 

Definition at line 2866 of file fillattr2.h.

02866 : AttrTranspFillMapping() {}

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

Definition at line 2867 of file fillattr2.h.

02872                                      : 
02873         AttrTranspFillMapping(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}


Member Function Documentation

BOOL AttrTranspFillMappingLinear::CopyNodeContents AttrTranspFillMappingLinear 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 19330 of file fillattr.cpp.

19331 {
19332     ERROR2IF(NodeCopy == NULL, FALSE, "NULL pointer in AttrTranspFillMappingLinear::CopyNodeContents!");
19333 
19334     NodeAttribute::CopyNodeContents(NodeCopy);
19335 
19336     // Copy contents specific to derived class here
19337     NodeCopy->Value.SimpleCopy(&Value);
19338     return TRUE;
19339 } 

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

Reimplemented from NodeAttribute.

Definition at line 2881 of file fillattr2.h.

02881 { return &Value; }

UINT32 AttrTranspFillMappingLinear::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 19310 of file fillattr.cpp.

19311 {
19312     return (_R(IDS_FILLMAPPINGLINEAR)); 
19313 }                                  

UINT32 AttrTranspFillMappingLinear::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 19377 of file fillattr.cpp.

19378 {     
19379     return (sizeof(AttrTranspFillMappingLinear)); 
19380 }  

BOOL AttrTranspFillMappingLinear::HasEquivalentDefaultValue BOOL  bAppearance = FALSE  )  [virtual]
 

Determine whether this attribute has the default value or not.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/09/2005
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if this node has a value equivalent to the relevant FALSE otherwise

Errors: -

See also:
-

Reimplemented from NodeAttribute.

Definition at line 19463 of file fillattr.cpp.

19464 {
19465     return (Value.Repeat==2);
19466 }

void AttrTranspFillMappingLinear::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 19354 of file fillattr.cpp.

19355 {
19356     ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node");
19357     ENSURE(IS_A(pNodeCopy, AttrTranspFillMappingLinear), "PolyCopyNodeContents given wrong dest node type");
19358 
19359     if (IS_A(pNodeCopy, AttrTranspFillMappingLinear))
19360         CopyNodeContents((AttrTranspFillMappingLinear*)pNodeCopy);
19361 }

void AttrTranspFillMappingLinear::Render RenderRegion pRender  )  [virtual]
 

'Renders' a linear graduation FillTransp mapping attribute.

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

Reimplemented from NodeAttribute.

Definition at line 19267 of file fillattr.cpp.

19268 {
19269     pRender->SetTranspFillMapping(&Value, FALSE);
19270 }

Node * AttrTranspFillMappingLinear::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 19288 of file fillattr.cpp.

19289 {
19290     AttrTranspFillMappingLinear* NodeCopy = new AttrTranspFillMappingLinear;
19291     if (NodeCopy == NULL)
19292         return NULL;
19293 
19294     CopyNodeContents(NodeCopy);
19295     
19296     return NodeCopy;
19297 }  

BOOL AttrTranspFillMappingLinear::WritePreChildrenNative BaseCamelotFilter pFilter  )  [virtual]
 

Reimplemented from Node.

Definition at line 19439 of file fillattr.cpp.

19440 {
19441 #ifdef DO_EXPORT
19442     return WritePreChildrenWeb(pFilter);
19443 #else
19444     return FALSE;
19445 #endif
19446 }

BOOL AttrTranspFillMappingLinear::WritePreChildrenWeb BaseCamelotFilter pFilter  )  [virtual]
 

Writes the linear fill mapping record to the filter.

> virtual BOOL AttrTranspFillMappingLinear::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 19397 of file fillattr.cpp.

19398 {
19399 #ifdef DO_EXPORT
19400     ERROR2IF(pFilter == NULL,FALSE,"NULL filter param");
19401 
19402     UINT32 Tag = TAG_UNDEFINED, TagSize = 1;
19403     switch (Value.Repeat)
19404     {
19405         case 0 :
19406         case 1 :    Tag     = TAG_TRANSPARENTFILL_NONREPEATING;
19407                     TagSize = TAG_TRANSPARENTFILL_NONREPEATING_SIZE;
19408                     break;
19409         case 2 :    Tag     = TAG_TRANSPARENTFILL_REPEATING;
19410                     TagSize = TAG_TRANSPARENTFILL_REPEATING_SIZE;
19411                     break;
19412         case 3 :    Tag     = TAG_TRANSPARENTFILL_REPEATINGINVERTED;
19413                     TagSize = TAG_TRANSPARENTFILL_REPEATINGINVERTED_SIZE;
19414                     break;
19415     //Mark Howitt. 8/10/97. (well actually Chris Snook - 8/12/99); cause we need to do it here
19416     //as well - Make repeating grad fills a special case
19417 #ifdef NEW_FEATURES
19418         case 4 :    Tag     = TAG_TRANSPARENTFILL_REPEATING_EXTRA;
19419                     TagSize = TAG_TRANSPARENTFILL_REPEATING_EXTRA_SIZE;
19420                     break;
19421 #endif
19422 
19423         default:
19424             ERROR3("Unknown repeat type in this fill mapping attr");
19425             return FALSE;
19426             break;
19427     }
19428 
19429     CamelotFileRecord Rec(pFilter,Tag,TagSize);
19430     return pFilter->Write(&Rec);
19431 #else
19432     return FALSE;
19433 #endif
19434 }


Member Data Documentation

TranspFillMappingLinearAttribute AttrTranspFillMappingLinear::Value
 

Definition at line 2893 of file fillattr2.h.


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