StartArrowAttribute Class Reference

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

#include <attrval.h>

Inheritance diagram for StartArrowAttribute:

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 a fill-type 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 StartArrow

Detailed Description

Attribute for start arrow type of paths.

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

Definition at line 237 of file attrval.h.


Member Function Documentation

BOOL StartArrowAttribute::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 2046 of file attr.cpp.

02047 {
02048     // Default to non-dotted lines
02049     StartArrowAttribute *pAttr = new StartArrowAttribute;
02050     if (pAttr == NULL)
02051         return FALSE;
02052 
02053 /*
02054     SA_STRAIGHTARROW,
02055     SA_ANGLEDARROW,
02056     SA_ROUNDEDARROW,
02057     SA_SPOT,
02058     SA_DIAMOND,
02059     SA_ARROWFEATHER,
02060     SA_ARROWFEATHER2,
02061     SA_HOLLOWDIAMOND,
02062 */
02063 
02064 //  pAttr->StartArrow.CreateStockArrow(SA_ARROWFEATHER2);
02065 
02066     UINT32 ID = AttributeManager::RegisterDefaultAttribute(CC_RUNTIME_CLASS(NodeRenderableInk), 
02067                                                          pAttr);
02068     if (ID == ATTR_BAD_ID)
02069         return FALSE;
02070     ENSURE(ID == ATTR_STARTARROW, "Incorrect ID for End Arrow attribute!");
02071     return TRUE;
02072 }

BOOL StartArrowAttribute::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 2003 of file attr.cpp.

02004 {
02005     ENSURE(GetRuntimeClass() == pAttr->GetRuntimeClass(), 
02006            "Different attribute types in AttributeValue::IsDifferent()");
02007     return !(((StartArrowAttribute *) pAttr)->StartArrow == StartArrow);
02008 }

NodeAttribute * StartArrowAttribute::MakeNode  )  [virtual]
 

Makes the appropriate NodeAttribute-derivative from a fill-type 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 2025 of file attr.cpp.

02026 {
02027     AttrStartArrow* pAttr = new AttrStartArrow;
02028     pAttr->Value.SimpleCopy(this);
02029     return pAttr;
02030 }

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

Implements AttributeValue.

Definition at line 1987 of file attr.cpp.

01988 {
01989     pRegion->SetStartArrow(this, Temp);
01990 }

void StartArrowAttribute::Restore RenderRegion ,
BOOL 
[virtual]
 

Implements AttributeValue.

Definition at line 1992 of file attr.cpp.

01993 {
01994     pRegion->RestoreStartArrow(this, Temp);
01995 }

void StartArrowAttribute::SimpleCopy AttributeValue  )  [virtual]
 

Implements AttributeValue.

Definition at line 1997 of file attr.cpp.

01998 {
01999     StartArrow = ((StartArrowAttribute *) pValue)->StartArrow;
02000     StartArrow.m_bExtendPath = ((StartArrowAttribute *) pValue)->StartArrow.m_bExtendPath;
02001 }


Member Data Documentation

ArrowRec StartArrowAttribute::StartArrow
 

Definition at line 248 of file attrval.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 04:01:24 2007 for Camelot by  doxygen 1.4.4