MitreLimitAttribute Class Reference

Attribute for mitre limits of paths. More...

#include <attrval.h>

Inheritance diagram for MitreLimitAttribute:

AttributeValue CCObject SimpleCCObject List of all members.

Public Member Functions

 MitreLimitAttribute ()
virtual void Restore (RenderRegion *, BOOL)
virtual void Render (RenderRegion *, BOOL Temp=FALSE)
virtual void SimpleCopy (AttributeValue *)
virtual NodeAttributeMakeNode ()
 Makes the appropriate NodeAttribute-derivative from a mitre-limit attribute.
BOOL IsDifferent (AttributeValue *pAttr)
 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

MILLIPOINT MitreLimit

Detailed Description

Attribute for mitre limits of paths.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/01/94
See also:
FillColourAttribute; StrokeColourAttribute; LineWidthAttribute; StartArrowAttribute; EndArrowAttribute; StartCapAttribute; EndCapAttribute; JoinTypeAttribute; WindingRuleAttribute; DashPatternAttribute

Definition at line 359 of file attrval.h.


Constructor & Destructor Documentation

MitreLimitAttribute::MitreLimitAttribute  ) 
 

Definition at line 1733 of file attr.cpp.

01734 {
01735     MitreLimit = 4000;
01736 }


Member Function Documentation

BOOL MitreLimitAttribute::Init void   )  [static]
 

Declares a preference that allows you to clear memory in delete().

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/4/94
Returns:
TRUE if it worked OK, FALSE if not

Reimplemented from SimpleCCObject.

Definition at line 1782 of file attr.cpp.

01783 {
01784     MitreLimitAttribute *pAttr = new MitreLimitAttribute;
01785     if (pAttr == NULL)
01786         return FALSE;
01787 
01788     pAttr->MitreLimit = 4000;
01789 
01790     UINT32 ID = AttributeManager::RegisterDefaultAttribute(CC_RUNTIME_CLASS(NodeRenderableInk), 
01791                                                          pAttr);
01792     if (ID == ATTR_BAD_ID)
01793         return FALSE;
01794     ENSURE(ID == ATTR_MITRELIMIT, "Incorrect ID for attribute!");
01795     return TRUE;
01796 }

BOOL MitreLimitAttribute::IsDifferent AttributeValue pAttr  )  [virtual]
 

Compare two AttributeValue objects. The base class version always returns TRUE - derived classes should override this function to provide functionality.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/04/94
Parameters:
pAttr - the attribute to compare against this one. [INPUTS]
Returns:
TRUE if objects represent different attributes (e.g. one is red and the other is blue); FALSE otherwise (i.e. they represent the same attribute, e.g. both represent 0.25pt lines).
See also:
AttributeManager::ApplyBasedOnDefaults

Reimplemented from AttributeValue.

Definition at line 1753 of file attr.cpp.

01754 {
01755     ENSURE(GetRuntimeClass() == pAttr->GetRuntimeClass(), 
01756            "Different attribute types in AttributeValue::IsDifferent()");
01757     return ((MitreLimitAttribute *) pAttr)->MitreLimit != MitreLimit;
01758 }

NodeAttribute * MitreLimitAttribute::MakeNode  )  [virtual]
 

Makes the appropriate NodeAttribute-derivative from a mitre-limit attribute.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
1/7/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
A pointer to a NodeAttribute.

Errors: -

See also:
AttributeValue::MakeNode

Reimplemented from AttributeValue.

Definition at line 1775 of file attr.cpp.

01776 {
01777     AttrMitreLimit* pAttr = new AttrMitreLimit;
01778     pAttr->Value.SimpleCopy(this);
01779     return pAttr;
01780 }

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

Implements AttributeValue.

Definition at line 1743 of file attr.cpp.

01744 {
01745     pRegion->SetMitreLimit(this, Temp);
01746 }

void MitreLimitAttribute::Restore RenderRegion ,
BOOL 
[virtual]
 

Implements AttributeValue.

Definition at line 1738 of file attr.cpp.

01739 {
01740     pRegion->RestoreMitreLimit(this, Temp);
01741 }

void MitreLimitAttribute::SimpleCopy AttributeValue  )  [virtual]
 

Implements AttributeValue.

Definition at line 1748 of file attr.cpp.

01749 {
01750     MitreLimit = ((MitreLimitAttribute *) pValue)->MitreLimit;
01751 }


Member Data Documentation

MILLIPOINT MitreLimitAttribute::MitreLimit
 

Definition at line 372 of file attrval.h.


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