#include <lineattr.h>
Inheritance diagram for AttrStrokeTransp:
Public Member Functions | |
AttrStrokeTransp () | |
Default constructor for Line Colour Attribute class. | |
AttrStrokeTransp (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 CCRuntimeClass * | GetAttributeType () |
virtual AttributeValue * | GetAttributeValue () |
virtual AttrIndex | GetAttributeIndex () |
virtual AttrFillGeometry * | ChangeAttrValue (AttrValueChange *) |
Changes the stroke colour in some way. | |
virtual BOOL | IsAStrokeTransp () const |
Virtual function for determining if the node is an attribute. | |
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 stroke transparancy record to the filter. | |
virtual BOOL | WritePreChildrenNative (BaseCamelotFilter *pFilter) |
virtual BOOL | NeedsTransparency () const |
Called to determine whether transparency is needed to render properly. | |
Public Attributes | |
StrokeTranspAttribute | Value |
Private Member Functions | |
void | CopyNodeContents (AttrStrokeTransp *NodeCopy) |
This method copies the node's contents to the node pointed to by NodeCopy. |
Definition at line 261 of file lineattr.h.
|
Default constructor for Line Colour Attribute class.
Definition at line 1199 of file lineattr.cpp.
|
|
Creates a LineColour Attribute.
Definition at line 1174 of file lineattr.cpp. 01180 : AttrFillGeometry(ContextNode, Direction, Locked, Mangled, Marked, Selected) 01181 { 01182 }
|
|
Changes the stroke colour in some way.
Reimplemented from AttrFillGeometry. Definition at line 1425 of file lineattr.cpp. 01426 { 01427 AttrFillGeometry* NewFill = NULL; 01428 01429 // Make a copy of this Fill and change the copys' control point colours 01430 NewFill = (AttrFillGeometry*)this->SimpleCopy(); 01431 if (NewFill == NULL) 01432 return NULL; 01433 01434 if (Mutator->MutateFill(NewFill)) 01435 return NewFill; 01436 01437 return NewFill; 01438 }
|
|
This method copies the node's contents to the node pointed to by NodeCopy.
Definition at line 1319 of file lineattr.cpp. 01320 { 01321 NodeAttribute::CopyNodeContents( NodeCopy ); 01322 01323 //Copy contents specific to derived class here 01324 NodeCopy->Value.Transp = Value.Transp; 01325 NodeCopy->Value.TranspType = Value.TranspType; 01326 }
|
|
Reimplemented from NodeAttribute. Definition at line 284 of file lineattr.h. 00284 { return ATTR_STROKETRANSP; }
|
|
Reimplemented from NodeAttribute. Definition at line 282 of file lineattr.h. 00282 { return CC_RUNTIME_CLASS(AttrStrokeTransp); }
|
|
Implements AttrFillGeometry. Definition at line 283 of file lineattr.h. 00283 { return &Value; }
|
|
Returns back a string resource ID describing the attribute.
Reimplemented from NodeAttribute. Definition at line 1295 of file lineattr.cpp. 01296 { 01297 return (_R(IDS_LINE_TRANSP)); 01298 }
|
|
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 280 of file lineattr.h. 00280 { return DocRect(0,0,0,0); }
|
|
For obtaining debug information about the Node.
Reimplemented from NodeRenderable. Definition at line 1373 of file lineattr.cpp. 01374 { 01375 #ifdef _DEBUG 01376 NodeAttribute::GetDebugDetails( Str ); 01377 01378 String_256 TempStr; 01379 01380 TempStr._MakeMsg(TEXT("\r\nLine Transparency = #1%ld "), 01381 *GetStartTransp()); 01382 01383 (*Str) += TempStr; 01384 01385 TempStr._MakeMsg(TEXT("\nTransparency Type = #1%ld "), 01386 GetTranspType()); 01387 01388 (*Str) += TempStr; 01389 #endif 01390 }
|
|
For finding the size of the node.
Reimplemented from Node. Definition at line 1408 of file lineattr.cpp. 01409 { 01410 return (sizeof(AttrStrokeTransp)); 01411 }
|
|
Virtual function for determining if the node is an attribute.
Reimplemented from NodeAttribute. Definition at line 288 of file lineattr.h. 00288 { return TRUE; }
|
|
Called to determine whether transparency is needed to render properly. > virtual BOOL AttrStrokeTransp::NeedsTransparency() const
Reimplemented from AttrFillGeometry. Definition at line 1497 of file lineattr.cpp. 01498 { 01499 AttrStrokeTransp* pNonConst = (AttrStrokeTransp*) this; 01500 return pNonConst->GetTranspType() != TT_Mix || *(pNonConst->GetStartTransp()) != 0; 01501 }
|
|
A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required.
Reimplemented from AttrFillGeometry. Definition at line 1270 of file lineattr.cpp. 01271 { 01272 ENSURE(Attrib.IsKindOf(CC_RUNTIME_CLASS(AttrStrokeTransp)), 01273 "Trying to compare two objects with different types"); 01274 AttrStrokeTransp* Attr = (AttrStrokeTransp*) &Attrib; 01275 return (Attr->Value.Transp == Value.Transp && 01276 Attr->Value.TranspType == Value.TranspType ); 01277 }
|
|
Polymorphically copies the contents of this node to another.
Reimplemented from AttrFillGeometry. Definition at line 1342 of file lineattr.cpp. 01343 { 01344 ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node"); 01345 ENSURE(IS_A(pNodeCopy, AttrStrokeTransp), "PolyCopyNodeContents given wrong dest node type"); 01346 01347 if (IS_A(pNodeCopy, AttrStrokeTransp)) 01348 CopyNodeContents((AttrStrokeTransp*)pNodeCopy); 01349 }
|
|
'Renders' a Line Colour attribute.
Reimplemented from NodeAttribute. Definition at line 1218 of file lineattr.cpp. 01219 { 01220 pRender->SetLineTransp((StrokeTranspAttribute *) &Value, FALSE); 01221 }
|
|
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 1242 of file lineattr.cpp. 01243 { 01244 AttrStrokeTransp* NodeCopy = new AttrStrokeTransp(); 01245 ERRORIF(NodeCopy == NULL, _R(IDE_NOMORE_MEMORY), NULL); 01246 CopyNodeContents(NodeCopy); 01247 01248 return NodeCopy; 01249 }
|
|
Reimplemented from Node. Definition at line 1477 of file lineattr.cpp. 01478 { 01479 #ifdef DO_EXPORT 01480 return WritePreChildrenWeb(pFilter); 01481 #else 01482 return FALSE; 01483 #endif 01484 }
|
|
Writes the stroke transparancy record to the filter. > virtual BOOL AttrStrokeTransp::WritePreChildrenWeb(BaseCamelotFilter* pFilter)
Reimplemented from Node. Definition at line 1454 of file lineattr.cpp. 01455 { 01456 #ifdef DO_EXPORT 01457 ERROR2IF(pFilter == NULL,FALSE,"NULL filter param"); 01458 ERROR3IF(Value.Transp > 255,"Transparency level is too high to be stored as a byte"); 01459 ERROR3IF(Value.TranspType > 255,"Transparency type is too high to be stored as a byte"); 01460 01461 CamelotFileRecord Rec(pFilter,TAG_LINETRANSPARENCY,TAG_LINETRANSPARENCY_SIZE); 01462 01463 BOOL ok = Rec.Init(); 01464 if (ok) ok = Rec.WriteBYTE(BYTE(Value.Transp)); 01465 if (ok) ok = Rec.WriteBYTE(BYTE(Value.TranspType)); 01466 if (ok) ok = pFilter->Write(&Rec); 01467 01468 return ok; 01469 #else 01470 return FALSE; 01471 #endif 01472 }
|
|
Definition at line 311 of file lineattr.h. |