AttrWindingRule Class Reference

Winding Rule Attribute class. More...

#include <lineattr.h>

Inheritance diagram for AttrWindingRule:

NodeAttribute NodeRenderable Node CCObject SimpleCCObject List of all members.

Public Member Functions

 AttrWindingRule ()
 Default constructor for Join Type Attribute class.
 AttrWindingRule (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE)
 Creates a WindingRule Attribute.
void Render (RenderRegion *pRender)
 'Renders' a WindingRule 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 INT32 operator== (const NodeAttribute &NodeAttrib)
 A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required.
virtual UINT32 GetAttrNameID (void)
 Returns back a string resource ID describing the attribute.
virtual AttributeValueGetAttributeValue ()
virtual CCRuntimeClassGetAttributeType ()
virtual AttrIndex GetAttributeIndex ()
void GetDebugDetails (StringBase *Str)
 For obtaining debug information about the Node.
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.
virtual BOOL WritePreChildrenWeb (BaseCamelotFilter *pFilter)
 Writes the winding rule record to the filter.
virtual BOOL WritePreChildrenNative (BaseCamelotFilter *pFilter)

Public Attributes

WindingRuleAttribute Value

Private Member Functions

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

Detailed Description

Winding Rule Attribute class.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/7/93
See also:
WindingType

Definition at line 717 of file lineattr.h.


Constructor & Destructor Documentation

AttrWindingRule::AttrWindingRule  ) 
 

Default constructor for Join Type Attribute class.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/7/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 3272 of file lineattr.cpp.

03272                                  : NodeAttribute()
03273 {
03274     Value.WindingRule = EvenOddWinding;
03275 }

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

Creates a WindingRule Attribute.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/7/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 3247 of file lineattr.cpp.

03253              : NodeAttribute(ContextNode, Direction, Locked, Mangled, Marked, Selected)  
03254 {                         
03255 } 


Member Function Documentation

void AttrWindingRule::CopyNodeContents AttrWindingRule NodeCopy  )  [private]
 

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

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/4/93
Parameters:
[INPUTS] 
A copy of this node [OUTPUTS]
Returns:
-

Errors: An assertion failure will occur if NodeCopy is NULL

Scope: protected

Definition at line 3391 of file lineattr.cpp.

03392 {
03393     NodeAttribute::CopyNodeContents( NodeCopy );
03394     NodeCopy->Value.WindingRule = Value.WindingRule; 
03395 } 

virtual AttrIndex AttrWindingRule::GetAttributeIndex  )  [inline, virtual]
 

Reimplemented from NodeAttribute.

Definition at line 738 of file lineattr.h.

00738 { return ATTR_WINDINGRULE; }

virtual CCRuntimeClass* AttrWindingRule::GetAttributeType  )  [inline, virtual]
 

Reimplemented from NodeAttribute.

Definition at line 737 of file lineattr.h.

00737 { return CC_RUNTIME_CLASS(AttrWindingRule); }

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

Reimplemented from NodeAttribute.

Definition at line 736 of file lineattr.h.

00736 { return &Value; }

UINT32 AttrWindingRule::GetAttrNameID void   )  [virtual]
 

Returns back a string resource ID describing the attribute.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/2/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
Attribute description ID

Errors: -

See also:
-

Reimplemented from NodeAttribute.

Definition at line 3367 of file lineattr.cpp.

03368 {
03369     return (_R(IDS_WINDING_RULE)); 
03370 }                                 

void AttrWindingRule::GetDebugDetails StringBase Str  )  [virtual]
 

For obtaining debug information about the Node.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/9/93
Parameters:
Str,: String giving debug info about the node [OUTPUTS]

Reimplemented from NodeRenderable.

Definition at line 3441 of file lineattr.cpp.

03442 {
03443 #ifdef _DEBUG
03444     NodeAttribute::GetDebugDetails( Str );
03445 
03446     String_256 TempStr;
03447     char *p;
03448     switch (Value.WindingRule)
03449     {
03450         case NonZeroWinding: p = "Non-zero"; break;
03451         case NegativeWinding: p = "Negative"; break;
03452         case EvenOddWinding: p = "Even-odd"; break;
03453         case PositiveWinding: p = "Positive"; break;
03454         default: p = "??"; break;
03455     }
03456     TempStr._MakeMsg( TEXT("\r\nWinding=#1%s\r\n"), p );
03457     (*Str) += TempStr;
03458 #endif
03459 }

UINT32 AttrWindingRule::GetNodeSize  )  const [virtual]
 

For finding the size of the node.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
The size of the node in bytes
See also:
Node::GetSubtreeSize

Reimplemented from Node.

Definition at line 3477 of file lineattr.cpp.

03478 {     
03479     return (sizeof(AttrWindingRule)); 
03480 }  

INT32 AttrWindingRule::operator== const NodeAttribute Attrib  )  [virtual]
 

A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/2/94
Parameters:
Atrib,: The attribute to compare, which must be an AttrWindingRule [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: An ENSURE failure will occur if Attrib does not have a AttrWindingRule runtime class.

See also:
NodeAttribute::operator==

Reimplemented from NodeAttribute.

Definition at line 3343 of file lineattr.cpp.

03344 {
03345     ENSURE(Attrib.IsKindOf(CC_RUNTIME_CLASS(AttrWindingRule)),
03346         "Trying to compare two objects with different types"); 
03347     AttrWindingRule* Attr = (AttrWindingRule*) &Attrib;
03348     return (Attr->Value.WindingRule == Value.WindingRule); 
03349 } 

void AttrWindingRule::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 3411 of file lineattr.cpp.

03412 {
03413     ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node");
03414     ENSURE(IS_A(pNodeCopy, AttrWindingRule), "PolyCopyNodeContents given wrong dest node type");
03415 
03416     if (IS_A(pNodeCopy, AttrWindingRule))
03417         CopyNodeContents((AttrWindingRule*)pNodeCopy);
03418 }

void AttrWindingRule::Render RenderRegion pRender  )  [virtual]
 

'Renders' a WindingRule attribute.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/7/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Reimplemented from NodeAttribute.

Definition at line 3292 of file lineattr.cpp.

03293 {
03294     pRender->SetWindingRule(&Value, FALSE);
03295 }

Node * AttrWindingRule::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:
9/7/93
Parameters:
- [INPUTS]
[OUTPUTS] 
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 3316 of file lineattr.cpp.

03317 {
03318     AttrWindingRule* NodeCopy = new AttrWindingRule();
03319     ERRORIF(NodeCopy == NULL, _R(IDE_NOMORE_MEMORY), NULL); 
03320     CopyNodeContents(NodeCopy);
03321     return NodeCopy;
03322 }  

BOOL AttrWindingRule::WritePreChildrenNative BaseCamelotFilter pFilter  )  [virtual]
 

Reimplemented from Node.

Definition at line 3518 of file lineattr.cpp.

03519 {
03520 #ifdef DO_EXPORT
03521     return WritePreChildrenWeb(pFilter);
03522 #else
03523     return FALSE;
03524 #endif
03525 }

BOOL AttrWindingRule::WritePreChildrenWeb BaseCamelotFilter pFilter  )  [virtual]
 

Writes the winding rule record to the filter.

> virtual BOOL AttrWindingRule::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 3498 of file lineattr.cpp.

03499 {
03500 #ifdef DO_EXPORT
03501     ERROR2IF(pFilter == NULL,FALSE,"NULL filter param");
03502 
03503     CamelotFileRecord Rec(pFilter,TAG_WINDINGRULE,TAG_WINDINGRULE_SIZE);
03504 
03505     BOOL ok = Rec.Init();
03506     if (ok) ok = Rec.WriteBYTE(BYTE(Value.WindingRule));
03507     if (ok) ok = pFilter->Write(&Rec);
03508 
03509     return ok;
03510 #else
03511     return FALSE;
03512 #endif
03513 }


Member Data Documentation

WindingRuleAttribute AttrWindingRule::Value
 

Definition at line 757 of file lineattr.h.


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