EndArrowAttribute Class Reference

Attribute for end arrow type of paths. More...

#include <attrval.h>

Inheritance diagram for EndArrowAttribute:

AttributeValue CCObject SimpleCCObject List of all members.

Public Member Functions

virtual void Restore (RenderRegion *, BOOL)
virtual void Render (RenderRegion *, BOOL Temp=FALSE)
virtual void SimpleCopy (AttributeValue *)
virtual NodeAttributeMakeNode ()
 Makes the appropriate NodeAttribute-derivative from an end-arrow 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 ()
 Registers line width attribute, and provides a default attribute to give non-dotted lines.

Public Attributes

ArrowRec EndArrow

Detailed Description

Attribute for end arrow type of paths.

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

Definition at line 267 of file attrval.h.


Member Function Documentation

BOOL EndArrowAttribute::Init void   )  [static]
 

Registers line width attribute, and provides a default attribute to give non-dotted lines.

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

Errors: Out of memory.

See also:
AttributeManager

Reimplemented from SimpleCCObject.

Definition at line 1627 of file attr.cpp.

01628 {
01629     // Default to non-dotted lines
01630     EndArrowAttribute *pAttr = new EndArrowAttribute;
01631     if (pAttr == NULL)
01632         return FALSE;
01633 
01634 /*
01635     SA_STRAIGHTARROW,
01636     SA_ANGLEDARROW,
01637     SA_ROUNDEDARROW,
01638     SA_SPOT,
01639     SA_DIAMOND,
01640     SA_ARROWFEATHER,
01641     SA_ARROWFEATHER2,
01642     SA_HOLLOWDIAMOND,
01643 */
01644 
01645 //  pAttr->EndArrow.CreateStockArrow(SA_ANGLEDARROW);
01646 
01647     UINT32 ID = AttributeManager::RegisterDefaultAttribute(CC_RUNTIME_CLASS(NodeRenderableInk), 
01648                                                          pAttr);
01649     if (ID == ATTR_BAD_ID)
01650         return FALSE;
01651     ENSURE(ID == ATTR_ENDARROW, "Incorrect ID for End Arrow attribute!");
01652     return TRUE;
01653 }

BOOL EndArrowAttribute::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 1585 of file attr.cpp.

01586 {
01587     ENSURE(GetRuntimeClass() == pAttr->GetRuntimeClass(), 
01588            "Different attribute types in AttributeValue::IsDifferent()");
01589     return !(((EndArrowAttribute *) pAttr)->EndArrow == EndArrow);
01590 }

NodeAttribute * EndArrowAttribute::MakeNode  )  [virtual]
 

Makes the appropriate NodeAttribute-derivative from an end-arrow 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 1606 of file attr.cpp.

01607 {
01608     AttrEndArrow* pAttr = new AttrEndArrow;
01609     pAttr->Value.SimpleCopy(this);
01610     return pAttr;
01611 }

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

Implements AttributeValue.

Definition at line 1569 of file attr.cpp.

01570 {
01571     pRegion->SetEndArrow(this, Temp);
01572 }

void EndArrowAttribute::Restore RenderRegion ,
BOOL 
[virtual]
 

Implements AttributeValue.

Definition at line 1574 of file attr.cpp.

01575 {
01576     pRegion->RestoreEndArrow(this, Temp);
01577 }

void EndArrowAttribute::SimpleCopy AttributeValue  )  [virtual]
 

Implements AttributeValue.

Definition at line 1579 of file attr.cpp.

01580 {
01581     EndArrow = ((EndArrowAttribute *) pValue)->EndArrow;
01582     EndArrow.m_bExtendPath = ((EndArrowAttribute *) pValue)->EndArrow.m_bExtendPath;
01583 }


Member Data Documentation

ArrowRec EndArrowAttribute::EndArrow
 

Definition at line 278 of file attrval.h.


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