DrawingModeAttribute Class Reference

Attribute for drawing mode - EOR, COPY etc. More...

#include <attrval.h>

Inheritance diagram for DrawingModeAttribute:

AttributeValue CCObject SimpleCCObject List of all members.

Public Member Functions

 DrawingModeAttribute ()
 DrawingModeAttribute (DrawModeType NewDrawingMode)
virtual void Restore (RenderRegion *, BOOL)
 Restores the drawing mode attribute for the given render region. i.e. all objects drawn will now be drawn using this drawing mode.
virtual void Render (RenderRegion *, BOOL Temp=FALSE)
 Sets the drawing mode attribute for the given render region. i.e. all objects drawn will now be drawn using this drawing mode.
virtual void SimpleCopy (AttributeValue *)
 See AttributeValue::SimpleCopy.
virtual NodeAttributeMakeNode ()
 Used when restoring attributes from the render region's context stack.Used when a render region needs to change a particular rendering attribute.This function provides a way of copying the contents of an AttributeValue derived class to another. It is assumed that the source object is the same class as the destination object. The data from the object pointed to by pAttr is copied into this object. This is primarily used when cloning render regions - the context stack must be copied, and if it points to any temporary objects, then they must be copied too, to avoid multiple deletion errors. Given an AttributeValue object, construct the appropriate NodeAttribute object which can be put into a document tree. This should be over-ridden for all derived AttributeValue classes, except those that cannot be put into the document tree (e.g. DrawingModeAttribute). The base class version (i.e. this one) will always ENSURE because it should not be called.
BOOL IsDifferent (AttributeValue *pAttr)
 Compare two AttributeValue objects. The base class version always returns TRUE - derived classes should override this function to provide functionality.

Public Attributes

DrawModeType DrawingMode

Static Public Attributes

static UINT32 ID = ATTR_BAD_ID

Detailed Description

Attribute for drawing mode - EOR, COPY etc.

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

Definition at line 460 of file attrval.h.


Constructor & Destructor Documentation

DrawingModeAttribute::DrawingModeAttribute  )  [inline]
 

Definition at line 464 of file attrval.h.

00464 {}

DrawingModeAttribute::DrawingModeAttribute DrawModeType  NewDrawingMode  )  [inline]
 

Definition at line 465 of file attrval.h.

00465 { DrawingMode = NewDrawingMode; }


Member Function Documentation

BOOL DrawingModeAttribute::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 1718 of file attr.cpp.

01719 {
01720     ENSURE(GetRuntimeClass() == pAttr->GetRuntimeClass(), 
01721            "Different attribute types in AttributeValue::IsDifferent()");
01722     return TRUE;
01723 }

NodeAttribute * DrawingModeAttribute::MakeNode  )  [virtual]
 

Used when restoring attributes from the render region's context stack.Used when a render region needs to change a particular rendering attribute.This function provides a way of copying the contents of an AttributeValue derived class to another. It is assumed that the source object is the same class as the destination object. The data from the object pointed to by pAttr is copied into this object. This is primarily used when cloning render regions - the context stack must be copied, and if it points to any temporary objects, then they must be copied too, to avoid multiple deletion errors. Given an AttributeValue object, construct the appropriate NodeAttribute object which can be put into a document tree. This should be over-ridden for all derived AttributeValue classes, except those that cannot be put into the document tree (e.g. DrawingModeAttribute). The base class version (i.e. this one) will always ENSURE because it should not be called.

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

Errors: Out of memory.

See also:
NodeAttribute

Reimplemented from AttributeValue.

Definition at line 1725 of file attr.cpp.

01726 {
01727     return NULL;
01728 }

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

Sets the drawing mode attribute for the given render region. i.e. all objects drawn will now be drawn using this drawing mode.

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

Implements AttributeValue.

Definition at line 1672 of file attr.cpp.

01673 {
01674     pRegion->SetDrawingMode(this, Temp);
01675 }

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

Restores the drawing mode attribute for the given render region. i.e. all objects drawn will now be drawn using this drawing mode.

Author:
Tim_Browse (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:
DrawingModeAttribute; RenderStack; AttributeValue; NodeAttribute; DrawingModeAttribute::Render; DrawingModeAttribute::SimpleCopy; AttributeValue::Render; AttributeValue::Restore; AttributeValue::SimpleCopy

Implements AttributeValue.

Definition at line 1694 of file attr.cpp.

01695 {
01696     pRegion->RestoreDrawingMode(this, Temp);
01697 }

void DrawingModeAttribute::SimpleCopy AttributeValue pValue  )  [virtual]
 

See AttributeValue::SimpleCopy.

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

Implements AttributeValue.

Definition at line 1713 of file attr.cpp.

01714 {
01715     DrawingMode = ((DrawingModeAttribute *) pValue)->DrawingMode;
01716 }


Member Data Documentation

DrawModeType DrawingModeAttribute::DrawingMode
 

Definition at line 474 of file attrval.h.

UINT32 DrawingModeAttribute::ID = ATTR_BAD_ID [static]
 

Definition at line 475 of file attrval.h.


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