QualityAttribute Class Reference

Attribute for quality of display/rendering. More...

#include <qualattr.h>

Inheritance diagram for QualityAttribute:

AttributeValue CCObject SimpleCCObject List of all members.

Public Member Functions

 QualityAttribute ()
 QualityAttribute (Quality NewQuality)
virtual void Render (RenderRegion *pRegion, BOOL Temp=FALSE)
 Sets the quality attribute for the given render region.
virtual void Restore (RenderRegion *, BOOL)
 Restores the quality attribute for the given render region.
virtual void SimpleCopy (AttributeValue *)
 See AttributeValue::SimpleCopy.
virtual NodeAttributeMakeNode ()
 Make a AttrQuality node from this line width attribute.
virtual BOOL IsDifferent (AttributeValue *)
 See base class version.

Static Public Member Functions

static BOOL Init ()
 Registers quality attribute, and provides a default attribute.

Public Attributes

Quality QualityValue

Detailed Description

Attribute for quality of display/rendering.

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

Definition at line 121 of file qualattr.h.


Constructor & Destructor Documentation

QualityAttribute::QualityAttribute  )  [inline]
 

Definition at line 125 of file qualattr.h.

00125 {}

QualityAttribute::QualityAttribute Quality  NewQuality  )  [inline]
 

Definition at line 126 of file qualattr.h.

00126 { QualityValue = NewQuality; }


Member Function Documentation

BOOL QualityAttribute::Init void   )  [static]
 

Registers quality attribute, and provides a default attribute.

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

Errors: Out of memory.

See also:
AttributeManager

Reimplemented from SimpleCCObject.

Definition at line 407 of file quality.cpp.

00408 {
00409     // Defaults to QUALITY_DEFAULT (not surprisingly)
00410     QualityAttribute *pAttr = new QualityAttribute;
00411     if (pAttr == NULL)
00412         return FALSE;
00413 
00414     UINT32 ID = AttributeManager::RegisterDefaultAttribute(CC_RUNTIME_CLASS(NodeRenderableInk), 
00415                                                          pAttr);
00416     if (ID == ATTR_BAD_ID)
00417         return FALSE;
00418     ENSURE(ID == ATTR_QUALITY, "Incorrect ID for attribute!");
00419     return TRUE;
00420 }

BOOL QualityAttribute::IsDifferent AttributeValue pAttr  )  [virtual]
 

See base class version.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/04/94
Returns:
Errors: The two attributes are not of the same type.
See also:
AttributeValue::IsDifferent

Reimplemented from AttributeValue.

Definition at line 459 of file quality.cpp.

00460 {
00461     ENSURE(GetRuntimeClass() == pAttr->GetRuntimeClass(), 
00462            "Different attribute types in AttributeValue::IsDifferent()");
00463     return ((QualityAttribute *) pAttr)->QualityValue != QualityValue;
00464 }

NodeAttribute * QualityAttribute::MakeNode  )  [virtual]
 

Make a AttrQuality node from this line width attribute.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/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 435 of file quality.cpp.

00436 {
00437     // Create new attribute node
00438     AttrQuality *pAttr = new AttrQuality();
00439 
00440     // Copy attribute value into the new node.
00441     pAttr->Value.SimpleCopy(this);
00442 
00443     // Return the new node
00444     return pAttr;
00445 }

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

Sets the quality attribute for the given render region.

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

Implements AttributeValue.

Definition at line 349 of file quality.cpp.

00350 {
00351     pRegion->SetQuality(this, Temp);
00352 }

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

Restores the quality attribute for the given render region.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/04/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:
QualityAttribute; RenderStack; AttributeValue; NodeAttribute; QualityAttribute::Render; QualityAttribute::SimpleCopy; AttributeValue::Render; AttributeValue::Restore; AttributeValue::SimpleCopy

Implements AttributeValue.

Definition at line 370 of file quality.cpp.

00371 {
00372     pRegion->RestoreQuality(this, Temp);
00373 }

void QualityAttribute::SimpleCopy AttributeValue pValue  )  [virtual]
 

See AttributeValue::SimpleCopy.

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

Implements AttributeValue.

Definition at line 389 of file quality.cpp.

00390 {
00391     QualityValue = ((QualityAttribute *) pValue)->QualityValue;
00392 }


Member Data Documentation

Quality QualityAttribute::QualityValue
 

Definition at line 134 of file qualattr.h.


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