#include <attrval.h>
Inheritance diagram for JoinTypeAttribute:
Public Member Functions | |
JoinTypeAttribute () | |
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 *) |
Compare two AttributeValue objects. The base class version always returns TRUE - derived classes should override this function to provide functionality. | |
Static Public Member Functions | |
static BOOL | Init () |
Declares a preference that allows you to clear memory in delete(). | |
Public Attributes | |
JointType | JoinType |
Definition at line 328 of file attrval.h.
|
Definition at line 1927 of file attr.cpp. 01928 { 01929 // Default to Bevelled line joins. 01930 JoinType = BevelledJoin; 01931 }
|
|
Declares a preference that allows you to clear memory in delete().
Reimplemented from SimpleCCObject. Definition at line 1967 of file attr.cpp. 01968 { 01969 JoinTypeAttribute *pAttr = new JoinTypeAttribute; 01970 if (pAttr == NULL) 01971 return FALSE; 01972 01973 // Default to Bevelled line joins. 01974 pAttr->JoinType = BevelledJoin; 01975 01976 UINT32 ID = AttributeManager::RegisterDefaultAttribute(CC_RUNTIME_CLASS(NodeRenderableInk), 01977 pAttr); 01978 if (ID == ATTR_BAD_ID) 01979 return FALSE; 01980 ENSURE(ID == ATTR_JOINTYPE, "Incorrect ID for attribute!"); 01981 return TRUE; 01982 }
|
|
Compare two AttributeValue objects. The base class version always returns TRUE - derived classes should override this function to provide functionality.
Reimplemented from AttributeValue. Definition at line 1933 of file attr.cpp. 01934 { 01935 ENSURE(GetRuntimeClass() == pAttr->GetRuntimeClass(), 01936 "Different attribute types in AttributeValue::IsDifferent()"); 01937 return ((JoinTypeAttribute *) pAttr)->JoinType != JoinType; 01938 }
|
|
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 1955 of file attr.cpp. 01956 { 01957 // Create new attribute node 01958 AttrJoinType *pAttr = new AttrJoinType; 01959 01960 // Copy attribute value into the new node. 01961 pAttr->Value.SimpleCopy(this); 01962 01963 // Return the new node 01964 return pAttr; 01965 }
|
|
Implements AttributeValue. Definition at line 1945 of file attr.cpp. 01946 { 01947 pRegion->SetJoinType(this, Temp); 01948 }
|
|
Implements AttributeValue. Definition at line 1940 of file attr.cpp. 01941 { 01942 pRegion->RestoreJoinType(this, Temp); 01943 }
|
|
Implements AttributeValue. Definition at line 1950 of file attr.cpp. 01951 { 01952 JoinType = ((JoinTypeAttribute *) pValue)->JoinType; 01953 }
|
|
|