AttrStrokeColourChange Class Reference

Change Stroke colour Attribute class. This Attribute never exists in the Tree. It is used for changing the colours of an existing Stroke. More...

#include <lineattr.h>

Inheritance diagram for AttrStrokeColourChange:

AttrValueChange AttrFillGeometry NodeAttribute NodeRenderable Node CCObject SimpleCCObject List of all members.

Public Member Functions

 AttrStrokeColourChange (BOOL bLineWidth=FALSE)
virtual AttributeValueGetAttributeValue ()
virtual CCRuntimeClassGetAttributeType ()
 Determines the scope of the value change.
virtual AttrFillGeometryMutateFill (AttrFillGeometry *FillToMutate)
 Changes the stroke colour in some way.
virtual NodeAttributeGetOtherAttrToApply (BOOL *IsMutate)
 Some attributes require a secondary atribute to be changed when they are changed. This routine obtains a pointer to the secondary attribute to apply.
virtual UINT32 GetAttrNameID (void)
 Returns a string resource ID describing the attribute.
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).

Protected Attributes

StrokeColourAttribute Value

Private Attributes

BOOL m_bLineWidth

Detailed Description

Change Stroke colour Attribute class. This Attribute never exists in the Tree. It is used for changing the colours of an existing Stroke.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
8/8/94
See also:
AttrFillGeometry

Definition at line 327 of file lineattr.h.


Constructor & Destructor Documentation

AttrStrokeColourChange::AttrStrokeColourChange BOOL  bLineWidth = FALSE  )  [inline]
 

Definition at line 334 of file lineattr.h.

00334 : AttrValueChange() { m_bLineWidth = bLineWidth;}


Member Function Documentation

BOOL AttrStrokeColourChange::EffectsParentBounds  )  [virtual]
 

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).

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/5/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE

Reimplemented from NodeAttribute.

Definition at line 1144 of file lineattr.cpp.

01145 {
01146     return TRUE;
01147 }

virtual CCRuntimeClass* AttrStrokeColourChange::GetAttributeType  )  [inline, virtual]
 

Determines the scope of the value change.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/12/94
Returns:
A CC_RUNTIME_CLASS depending on whether this should change colour or transparency attribute.

Reimplemented from AttrValueChange.

Definition at line 337 of file lineattr.h.

virtual AttributeValue* AttrStrokeColourChange::GetAttributeValue  )  [inline, virtual]
 

Implements AttrValueChange.

Definition at line 336 of file lineattr.h.

00336 { return &Value; }

UINT32 AttrStrokeColourChange::GetAttrNameID void   )  [virtual]
 

Returns a string resource ID describing the attribute.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
29/1/95
Returns:
Attribute description ID

Reimplemented from AttrValueChange.

Definition at line 1100 of file lineattr.cpp.

01101 {
01102     // if it's called in the line width combo-box then we return "line width"
01103     // rather than "line colour"
01104     if (m_bLineWidth)
01105         return (_R(IDS_LINE_WIDTH));
01106 
01107     return (_R(IDS_STROKECOLOUR_CHANGE));
01108 }                                  

NodeAttribute * AttrStrokeColourChange::GetOtherAttrToApply BOOL *  IsMutate  )  [virtual]
 

Some attributes require a secondary atribute to be changed when they are changed. This routine obtains a pointer to the secondary attribute to apply.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/8/95
Returns:
The secondary attribute to apply, or NULL if none to apply

Reimplemented from NodeAttribute.

Definition at line 1061 of file lineattr.cpp.

01062 {
01063     return NULL;
01064 
01065 /*  ERROR3IF(IsMutate == NULL, "NULL flag pointer passed to GetOtherAttrToApply");
01066 
01067     // A stroke colour change also needs to set the Stroke Transparency
01068 
01069     NodeAttribute* OtherAttr = new AttrStrokeTranspChange;
01070     if (OtherAttr == NULL)
01071         return NULL;
01072 
01073     UINT32 Transp;
01074 
01075     DocColour Col = *GetStartColour();
01076 
01077     if (Col.IsTransparent())
01078         Transp = 255;
01079     else
01080         Transp = 0;
01081 
01082     ((AttrStrokeTranspChange *)OtherAttr)->SetStartTransp(&Transp);
01083 
01084     *IsMutate = TRUE;
01085 
01086     return OtherAttr; */
01087 }

AttrFillGeometry * AttrStrokeColourChange::MutateFill AttrFillGeometry FillToMutate  )  [virtual]
 

Changes the stroke colour in some way.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/11/94
Parameters:
The value change attribute [INPUTS]
Returns:
A new stroke colour attr, with the appropriate changes made

Reimplemented from AttrValueChange.

Definition at line 1036 of file lineattr.cpp.

01037 { 
01038     // Make a copy of this Fill and change the copys' control point colours
01039     AttrFillGeometry* NewFill = (AttrFillGeometry*)FillToMutate->SimpleCopy();
01040     if (NewFill == NULL)
01041         return NULL;
01042 
01043     NewFill->SetStartColour(GetStartColour());
01044 
01045     return NewFill; 
01046 }


Member Data Documentation

BOOL AttrStrokeColourChange::m_bLineWidth [private]
 

Definition at line 358 of file lineattr.h.

StrokeColourAttribute AttrStrokeColourChange::Value [protected]
 

Definition at line 350 of file lineattr.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:50:34 2007 for Camelot by  doxygen 1.4.4