#include <attrval.h>
Inheritance diagram for StartCapAttribute:
Public Member Functions | |
StartCapAttribute () | |
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 | |
LineCapType | StartCap |
Definition at line 297 of file attrval.h.
|
Definition at line 1868 of file attr.cpp. 01869 { 01870 // Default to butt line caps (because ArtWorks does). 01871 StartCap = LineCapButt; 01872 }
|
|
Declares a preference that allows you to clear memory in delete().
Reimplemented from SimpleCCObject. Definition at line 1908 of file attr.cpp. 01909 { 01910 StartCapAttribute *pAttr = new StartCapAttribute; 01911 if (pAttr == NULL) 01912 return FALSE; 01913 01914 // Default to butt line caps (because ArtWorks does). 01915 pAttr->StartCap = LineCapButt; 01916 01917 UINT32 ID = AttributeManager::RegisterDefaultAttribute(CC_RUNTIME_CLASS(NodeRenderableInk), 01918 pAttr); 01919 if (ID == ATTR_BAD_ID) 01920 return FALSE; 01921 ENSURE(ID == ATTR_STARTCAP, "Incorrect ID for attribute!"); 01922 return TRUE; 01923 }
|
|
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 1874 of file attr.cpp. 01875 { 01876 ENSURE(GetRuntimeClass() == pAttr->GetRuntimeClass(), 01877 "Different attribute types in AttributeValue::IsDifferent()"); 01878 return ((StartCapAttribute *) pAttr)->StartCap != StartCap; 01879 }
|
|
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 1896 of file attr.cpp. 01897 { 01898 // Create new attribute node 01899 AttrStartCap *pAttr = new AttrStartCap; 01900 01901 // Copy attribute value into the new node. 01902 pAttr->Value.SimpleCopy(this); 01903 01904 // Return the new node 01905 return pAttr; 01906 }
|
|
Implements AttributeValue. Definition at line 1886 of file attr.cpp. 01887 { 01888 pRegion->SetStartCap(this, Temp); 01889 }
|
|
Implements AttributeValue. Definition at line 1881 of file attr.cpp. 01882 { 01883 pRegion->RestoreStartCap(this, Temp); 01884 }
|
|
Implements AttributeValue. Definition at line 1891 of file attr.cpp. 01892 { 01893 StartCap = ((StartCapAttribute *) pValue)->StartCap; 01894 }
|
|
|