#include <lineattr.h>
Inheritance diagram for AttrStrokeColour:
Public Member Functions | |
AttrStrokeColour () | |
Default constructor for Line Colour Attribute class. | |
AttrStrokeColour (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE) | |
Creates a LineColour Attribute. | |
void | Render (RenderRegion *pRender) |
'Renders' a Line Colour attribute. | |
Node * | SimpleCopy () |
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 DocRect | GetBlobBoundingRect () |
Calculates the bounding rectangle of the attrs blobs.This should always be calculated on the fly as the view scale can change without the attr knowing, giving an incorrect result. | |
virtual BOOL | EffectsParentBounds () |
Indicates that the stroke colour can effect the bounds of the object it is applied to (as it determines whether the path is stroked or not). | |
virtual CCRuntimeClass * | GetAttributeType () |
virtual AttributeValue * | GetAttributeValue () |
virtual AttrIndex | GetAttributeIndex () |
virtual AttrFillGeometry * | ChangeAttrValue (AttrValueChange *) |
Changes the stroke colour in some way. | |
virtual BOOL | IsAStrokeColour () const |
Virtual function for determining if the node is an attribute. | |
virtual void | PolyCopyNodeContents (NodeRenderable *pNodeCopy) |
Polymorphically copies the contents of this node to another. | |
virtual BOOL | WritePreChildrenWeb (BaseCamelotFilter *pFilter) |
Writes the line colour record to the filter. | |
virtual BOOL | WritePreChildrenNative (BaseCamelotFilter *pFilter) |
virtual BOOL | WriteColourDefinitions (BaseCamelotFilter *pFilter) |
Writes out colour definitions for this fill. | |
void | GetDebugDetails (StringBase *Str) |
For obtaining debug information about the Node. | |
virtual UINT32 | GetNodeSize () const |
For finding the size of the node. | |
Public Attributes | |
StrokeColourAttribute | Value |
Private Member Functions | |
void | CopyNodeContents (AttrStrokeColour *NodeCopy) |
This method copies the node's contents to the node pointed to by NodeCopy. |
Definition at line 198 of file lineattr.h.
|
Default constructor for Line Colour Attribute class.
Definition at line 658 of file lineattr.cpp.
|
|
Creates a LineColour Attribute.
Definition at line 633 of file lineattr.cpp. 00639 : AttrFillGeometry(ContextNode, Direction, Locked, Mangled, Marked, Selected) 00640 { 00641 }
|
|
Changes the stroke colour in some way.
Reimplemented from AttrFillGeometry. Definition at line 890 of file lineattr.cpp. 00891 { 00892 AttrFillGeometry* NewFill = NULL; 00893 00894 // Make a copy of this Fill and change the copys' control point colours 00895 NewFill = (AttrFillGeometry*)this->SimpleCopy(); 00896 if (NewFill == NULL) 00897 return NULL; 00898 00899 if (Mutator->MutateFill(NewFill)) 00900 return NewFill; 00901 00902 return NewFill; 00903 }
|
|
This method copies the node's contents to the node pointed to by NodeCopy.
Definition at line 777 of file lineattr.cpp. 00778 { 00779 NodeAttribute::CopyNodeContents( NodeCopy ); 00780 00781 //Copy contents specific to derived class here 00782 NodeCopy->Value.Colour = Value.Colour; 00783 }
|
|
Indicates that the stroke colour can effect the bounds of the object it is applied to (as it determines whether the path is stroked or not).
Reimplemented from NodeAttribute. Definition at line 1125 of file lineattr.cpp. 01126 { 01127 return TRUE; 01128 }
|
|
Reimplemented from NodeAttribute. Definition at line 222 of file lineattr.h. 00222 { return ATTR_STROKECOLOUR; }
|
|
Reimplemented from NodeAttribute. Definition at line 220 of file lineattr.h. 00220 { return CC_RUNTIME_CLASS(AttrStrokeColour); }
|
|
Implements AttrFillGeometry. Definition at line 221 of file lineattr.h. 00221 { return &Value; }
|
|
Returns back a string resource ID describing the attribute.
Reimplemented from NodeAttribute. Definition at line 753 of file lineattr.cpp. 00754 { 00755 return (_R(IDS_LINE_COLOUR)); 00756 }
|
|
Calculates the bounding rectangle of the attrs blobs.This should always be calculated on the fly as the view scale can change without the attr knowing, giving an incorrect result.
Reimplemented from AttrFillGeometry. Definition at line 217 of file lineattr.h. 00217 { return DocRect(0,0,0,0); }
|
|
For obtaining debug information about the Node.
Reimplemented from NodeRenderable. Definition at line 830 of file lineattr.cpp. 00831 { 00832 #ifdef _DEBUG 00833 NodeAttribute::GetDebugDetails( Str ); 00834 00835 String_256 TempStr; 00836 00837 #if FALSE 00838 if (Value.LineColour.IsTransparent()) 00839 TempStr._MakeMsg( TEXT("\r\nLine colour=transparent\r\n")); 00840 else 00841 { 00842 INT32 Red, Green, Blue; 00843 Value.LineColour.GetRGBValue(&Red, &Green, &Blue); 00844 00845 TempStr._MakeMsg( TEXT("\r\nLine colour=(#1%ld, #2%ld, #3%ld)\r\n"), 00846 Red, Green, Blue); 00847 } 00848 #else 00849 // TempStr._MakeMsg( TEXT("\r\nLine")); 00850 // Value.Colour.GetDebugDetails(&TempStr); 00851 #endif 00852 00853 (*Str) += TempStr; 00854 #endif 00855 }
|
|
For finding the size of the node.
Reimplemented from Node. Definition at line 873 of file lineattr.cpp. 00874 { 00875 return (sizeof(AttrStrokeColour)); 00876 }
|
|
Virtual function for determining if the node is an attribute.
Reimplemented from NodeAttribute. Definition at line 226 of file lineattr.h. 00226 { return TRUE; }
|
|
A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required.
Reimplemented from AttrFillGeometry. Definition at line 729 of file lineattr.cpp. 00730 { 00731 ENSURE(Attrib.IsKindOf(CC_RUNTIME_CLASS(AttrStrokeColour)), 00732 "Trying to compare two objects with different types"); 00733 AttrStrokeColour* Attr = (AttrStrokeColour*) &Attrib; 00734 return (Attr->Value.Colour == Value.Colour); 00735 }
|
|
Polymorphically copies the contents of this node to another.
Reimplemented from AttrFillGeometry. Definition at line 799 of file lineattr.cpp. 00800 { 00801 ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node"); 00802 ENSURE(IS_A(pNodeCopy, AttrStrokeColour), "PolyCopyNodeContents given wrong dest node type"); 00803 00804 if (IS_A(pNodeCopy, AttrStrokeColour)) 00805 CopyNodeContents((AttrStrokeColour*)pNodeCopy); 00806 }
|
|
'Renders' a Line Colour attribute.
Reimplemented from NodeAttribute. Definition at line 677 of file lineattr.cpp. 00678 { 00679 pRender->SetLineColour((StrokeColourAttribute *) &Value, FALSE); 00680 }
|
|
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.
Reimplemented from NodeAttribute. Definition at line 701 of file lineattr.cpp. 00702 { 00703 AttrStrokeColour* NodeCopy = new AttrStrokeColour(); 00704 ERRORIF(NodeCopy == NULL, _R(IDE_NOMORE_MEMORY), NULL); 00705 CopyNodeContents(NodeCopy); 00706 00707 return NodeCopy; 00708 }
|
|
Writes out colour definitions for this fill. > virtual BOOL AttrStrokeColour::WriteColourDefinitions (BaseCamelotFilter* pFilter)
Reimplemented from AttrFillGeometry. Definition at line 1010 of file lineattr.cpp. 01011 { 01012 INT32 ColRef = pFilter->WriteRecord(&Value.Colour); 01013 01014 // Is the colour reference ok? 01015 01016 return (ColRef != 0); 01017 }
|
|
Reimplemented from Node. Definition at line 986 of file lineattr.cpp. 00987 { 00988 #ifdef DO_EXPORT 00989 return WritePreChildrenWeb(pFilter); 00990 #else 00991 return FALSE; 00992 #endif 00993 }
|
|
Writes the line colour record to the filter. > virtual BOOL AttrStrokeColour::WritePreChildrenWeb(BaseCamelotFilter* pFilter)
Reimplemented from Node. Definition at line 919 of file lineattr.cpp. 00920 { 00921 #ifdef DO_EXPORT 00922 ERROR2IF(pFilter == NULL,FALSE,"NULL filter param"); 00923 00924 INT32 ColourRef = pFilter->WriteRecord(&Value.Colour); 00925 00926 BOOL ok = (ColourRef != 0); 00927 00928 if (ok) 00929 { 00930 BOOL ColourRequired = TRUE; 00931 INT32 Tag = TAG_LINECOLOUR; 00932 INT32 Size = TAG_LINECOLOUR_SIZE; 00933 switch (ColourRef) 00934 { 00935 case REF_DEFAULTCOLOUR_TRANSPARENT: 00936 Tag = TAG_LINECOLOUR_NONE; 00937 Size = TAG_LINECOLOUR_NONE_SIZE; 00938 ColourRequired = FALSE; 00939 break; 00940 case REF_DEFAULTCOLOUR_BLACK: 00941 Tag = TAG_LINECOLOUR_BLACK; 00942 Size = TAG_LINECOLOUR_BLACK_SIZE; 00943 ColourRequired = FALSE; 00944 break; 00945 case REF_DEFAULTCOLOUR_WHITE: 00946 Tag = TAG_LINECOLOUR_WHITE; 00947 Size = TAG_LINECOLOUR_WHITE_SIZE; 00948 ColourRequired = FALSE; 00949 break; 00950 } 00951 00952 CamelotFileRecord Rec(pFilter,Tag,Size); 00953 00954 ok = Rec.Init(); 00955 00956 if (ok && ColourRequired) ok = Rec.WriteReference(ColourRef); 00957 if (ok) ok = pFilter->Write(&Rec); 00958 } 00959 00960 if (!ok) 00961 pFilter->GotError(_R(IDE_FILE_WRITE_ERROR)); 00962 00963 return ok; 00964 00965 /* INT32 ColourRef = pFilter->WriteRecord(&Value.Colour); 00966 00967 BOOL ok = (ColourRef >= 1); 00968 00969 if (ok) ok = (pFilter->StartRecord(TAG_LINECOLOUR,TAG_LINECOLOUR_SIZE) != 0); 00970 if (ok) ok = pFilter->Write(ColourRef); 00971 if (ok) ok = pFilter->EndRecord(); 00972 00973 if (!ok) 00974 pFilter->GotError(_R(IDE_FILE_WRITE_ERROR)); 00975 00976 return ok; 00977 */ 00978 #else 00979 return FALSE; 00980 #endif 00981 }
|
|
Definition at line 248 of file lineattr.h. |