#include <attrval.h>
Inheritance diagram for WindingRuleAttribute:
Public Member Functions | |
WindingRuleAttribute () | |
WindingRuleAttribute (WindingType NewRule) | |
virtual void | Restore (RenderRegion *, BOOL) |
virtual void | Render (RenderRegion *, BOOL Temp=FALSE) |
virtual void | SimpleCopy (AttributeValue *) |
virtual NodeAttribute * | MakeNode () |
Used when restoring attributes from the render region's context stack.Used when a render region needs to change a particular rendering attribute.This function provides a way of copying the contents of an AttributeValue derived class to another. It is assumed that the source object is the same class as the destination object. The data from the object pointed to by pAttr is copied into this object. This is primarily used when cloning render regions - the context stack must be copied, and if it points to any temporary objects, then they must be copied too, to avoid multiple deletion errors. Given an AttributeValue object, construct the appropriate NodeAttribute object which can be put into a document tree. This should be over-ridden for all derived AttributeValue classes, except those that cannot be put into the document tree (e.g. DrawingModeAttribute). The base class version (i.e. this one) will always ENSURE because it should not be called. | |
virtual BOOL | IsDifferent (AttributeValue *) |
See base class version. | |
Static Public Member Functions | |
static BOOL | Init () |
Declares a preference that allows you to clear memory in delete(). | |
Public Attributes | |
WindingType | WindingRule |
Definition at line 390 of file attrval.h.
|
Definition at line 1799 of file attr.cpp. 01800 { 01801 // Default to even-odd winding 01802 WindingRule = EvenOddWinding; 01803 }
|
|
Definition at line 395 of file attrval.h. 00395 { WindingRule = NewRule; }
|
|
Declares a preference that allows you to clear memory in delete().
Reimplemented from SimpleCCObject. Definition at line 1851 of file attr.cpp. 01852 { 01853 WindingRuleAttribute *pAttr = new WindingRuleAttribute; 01854 if (pAttr == NULL) 01855 return FALSE; 01856 01857 // Default to even-odd winding 01858 pAttr->WindingRule = EvenOddWinding; 01859 UINT32 ID = AttributeManager::RegisterDefaultAttribute(CC_RUNTIME_CLASS(NodeRenderableInk), 01860 pAttr); 01861 if (ID == ATTR_BAD_ID) 01862 return FALSE; 01863 ENSURE(ID == ATTR_WINDINGRULE, "Incorrect ID for attribute!"); 01864 return TRUE; 01865 }
|
|
See base class version.
Reimplemented from AttributeValue. Definition at line 1844 of file attr.cpp. 01845 { 01846 ENSURE(GetRuntimeClass() == pAttr->GetRuntimeClass(), 01847 "Different attribute types in AttributeValue::IsDifferent()"); 01848 return ((WindingRuleAttribute *) pAttr)->WindingRule != WindingRule; 01849 }
|
|
Used when restoring attributes from the render region's context stack.Used when a render region needs to change a particular rendering attribute.This function provides a way of copying the contents of an AttributeValue derived class to another. It is assumed that the source object is the same class as the destination object. The data from the object pointed to by pAttr is copied into this object. This is primarily used when cloning render regions - the context stack must be copied, and if it points to any temporary objects, then they must be copied too, to avoid multiple deletion errors. Given an AttributeValue object, construct the appropriate NodeAttribute object which can be put into a document tree. This should be over-ridden for all derived AttributeValue classes, except those that cannot be put into the document tree (e.g. DrawingModeAttribute). The base class version (i.e. this one) will always ENSURE because it should not be called.
Reimplemented from AttributeValue. Definition at line 1820 of file attr.cpp. 01821 { 01822 // Create new attribute node 01823 AttrWindingRule *pAttr = new AttrWindingRule; 01824 01825 // Copy attribute value into the new node. 01826 pAttr->Value.SimpleCopy(this); 01827 01828 // Return the new node 01829 return pAttr; 01830 }
|
|
Implements AttributeValue. Definition at line 1810 of file attr.cpp. 01811 { 01812 pRegion->SetWindingRule(this, Temp); 01813 }
|
|
Implements AttributeValue. Definition at line 1805 of file attr.cpp. 01806 { 01807 pRegion->RestoreWindingRule(this, Temp); 01808 }
|
|
Implements AttributeValue. Definition at line 1815 of file attr.cpp. 01816 { 01817 WindingRule = ((WindingRuleAttribute *) pValue)->WindingRule; 01818 }
|
|
|