MouldAttribute Class Reference

Specifies wether the attributes are moulded or not. More...

#include <fillval.h>

Inheritance diagram for MouldAttribute:

AttributeValue CCObject SimpleCCObject List of all members.

Public Member Functions

 MouldAttribute ()
 Default constructor for Mould Attribute.
 MouldAttribute (NodeMould *pMould, MouldGeometry *pMouldShape)
 Constructor for Mould attribute.
virtual NodeAttributeMakeNode ()
 Make a AttrMould node from this fill colour attribute.
virtual void Restore (RenderRegion *, BOOL)
 Restores the line colour attribute for the given render region. i.e. all lines drawn will now be drawn in this colour.
virtual void Render (RenderRegion *, BOOL Temp=FALSE)
 Sets the line colour attribute for the given render region. i.e. all lines drawn will now be drawn in this colour.
virtual void SimpleCopy (AttributeValue *)
 See AttributeValue::SimpleCopy.
MouldGeometryGetMouldShape ()
void SetMouldShape (MouldGeometry *)
 Set the mould shape associated with this Attr.
BOOL IsPerspective ()
NodeMouldGetParentMould ()
void SetParentMould (NodeMould *)
 Set the parent mould associated with this Attr.

Static Public Member Functions

static BOOL Init ()
 Registers line colour attribute, and provides a default attribute to give black lines.

Protected Attributes

MouldGeometrypMouldShape
BOOL IsPerspectiveMould: 1
NodeMouldpParentMould

Detailed Description

Specifies wether the attributes are moulded or not.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/03/95
See also:
AttributeValue

Definition at line 1915 of file fillval.h.


Constructor & Destructor Documentation

MouldAttribute::MouldAttribute  ) 
 

Default constructor for Mould Attribute.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
03/02/94

Definition at line 9144 of file fillval.cpp.

09145 {
09146     SetParentMould(NULL);
09147     SetMouldShape(NULL);
09148 }

MouldAttribute::MouldAttribute NodeMould pMould,
MouldGeometry pMouldShape
 

Constructor for Mould attribute.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
03/02/94
Parameters:
pMould - the Mould to associate with this attribute [INPUTS]

Definition at line 9161 of file fillval.cpp.

09162 {
09163     SetParentMould(pMould);
09164     SetMouldShape(pMouldShape);
09165 }


Member Function Documentation

MouldGeometry* MouldAttribute::GetMouldShape  )  [inline]
 

Definition at line 1929 of file fillval.h.

01929 { return pMouldShape; }

NodeMould* MouldAttribute::GetParentMould  )  [inline]
 

Definition at line 1934 of file fillval.h.

01934 { return pParentMould; }

BOOL MouldAttribute::Init void   )  [static]
 

Registers line colour attribute, and provides a default attribute to give black lines.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/04/94
Returns:
TRUE - initialised ok; FALSE if not.

Errors: Out of memory.

See also:
AttributeManager

Reimplemented from SimpleCCObject.

Definition at line 9269 of file fillval.cpp.

09270 {
09271     // Default to no Mould
09272     MouldAttribute *pAttr = new MouldAttribute;
09273     if (pAttr == NULL)
09274         return FALSE;
09275 
09276     UINT32 ID = AttributeManager::RegisterDefaultAttribute(CC_RUNTIME_CLASS(NodeRenderableInk), 
09277                                                          pAttr);
09278     ERROR2IF(ID == ATTR_BAD_ID, FALSE, "Bad ID when Initialising MouldAttribute");
09279     ERROR2IF(ID != ATTR_MOULD, FALSE, "Incorrect ID for MouldAttribute");
09280 
09281     return TRUE;
09282 }

BOOL MouldAttribute::IsPerspective  )  [inline]
 

Definition at line 1932 of file fillval.h.

01932 { return IsPerspectiveMould; }  

NodeAttribute * MouldAttribute::MakeNode  )  [virtual]
 

Make a AttrMould node from this fill colour attribute.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/04/94
Returns:
Pointer to the new node, or NULL if out of memory.

Errors: Out of memory

See also:
AttributeValue::MakeNode

Reimplemented from AttributeValue.

Definition at line 9222 of file fillval.cpp.

09223 {
09224     // Create new attribute node
09225     AttrMould *pAttr = new AttrMould();
09226 
09227     // Copy attribute value into the new node.
09228     pAttr->Value.SimpleCopy(this);
09229 
09230     // Return the new node
09231     return pAttr;
09232 }

void MouldAttribute::Render RenderRegion pRegion,
BOOL  Temp = FALSE
[virtual]
 

Sets the line colour attribute for the given render region. i.e. all lines drawn will now be drawn in this colour.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/11/94
Parameters:
pRegion - the render region to render this attribute into. [INPUTS]
See also:
MouldAttribute; RenderStack; AttributeValue; NodeAttribute; MouldAttribute::Restore; MouldAttribute::SimpleCopy; AttributeValue::Render; AttributeValue::Restore; AttributeValue::SimpleCopy

Implements AttributeValue.

Definition at line 9182 of file fillval.cpp.

09183 {
09184 //  pRegion->SetMould(this, Temp);
09185 }

void MouldAttribute::Restore RenderRegion pRegion,
BOOL  Temp
[virtual]
 

Restores the line colour attribute for the given render region. i.e. all lines drawn will now be drawn in this colour.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
03/02/94
Parameters:
pRegion - the render region to restore the attribute into. [INPUTS] Temp - TRUE if this is a temporary attribute, FALSE if it is permanent (e.g. it's in a document tree).
See also:
MouldAttribute; RenderStack; AttributeValue; NodeAttribute; MouldAttribute::Render; MouldAttribute::SimpleCopy; AttributeValue::Render; AttributeValue::Restore; AttributeValue::SimpleCopy

Implements AttributeValue.

Definition at line 9204 of file fillval.cpp.

09205 {
09206 //  pRegion->RestoreMould(this, Temp);
09207 }

void MouldAttribute::SetMouldShape MouldGeometry pMould  ) 
 

Set the mould shape associated with this Attr.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/03/95

Definition at line 9294 of file fillval.cpp.

09295 {
09296     pMouldShape = pMould;
09297     IsPerspectiveMould = FALSE;
09298 
09299     if (pMouldShape == NULL)
09300         return;
09301 
09302     if (pMouldShape->IsKindOf(CC_RUNTIME_CLASS(MouldPerspective)))
09303     {
09304         IsPerspectiveMould = TRUE;
09305     }
09306 }

void MouldAttribute::SetParentMould NodeMould pMould  ) 
 

Set the parent mould associated with this Attr.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/03/95

Definition at line 9318 of file fillval.cpp.

09319 {
09320     pParentMould = pMould;
09321 }

void MouldAttribute::SimpleCopy AttributeValue pValue  )  [virtual]
 

See AttributeValue::SimpleCopy.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
03/02/94
Parameters:
pAttr - pointer to the AttributeValue to copy. [INPUTS]
See also:
FillColourAttribute; RenderStack; AttributeValue; NodeAttribute; FillColourAttribute::Render; FillColourAttribute::Restore; AttributeValue::Render; AttributeValue::Restore; AttributeValue::SimpleCopy

Implements AttributeValue.

Definition at line 9248 of file fillval.cpp.

09249 {
09250     ERROR3IF(!pValue->IsKindOf(CC_RUNTIME_CLASS(MouldAttribute)), "MouldAttribute::SimpleCopy can only copy MouldAttributes");
09251     SetParentMould(((MouldAttribute*)pValue)->GetParentMould());
09252     SetMouldShape(((MouldAttribute*)pValue)->GetMouldShape());
09253 }


Member Data Documentation

BOOL MouldAttribute::IsPerspectiveMould [protected]
 

Definition at line 1939 of file fillval.h.

MouldGeometry* MouldAttribute::pMouldShape [protected]
 

Definition at line 1938 of file fillval.h.

NodeMould* MouldAttribute::pParentMould [protected]
 

Definition at line 1941 of file fillval.h.


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