Quality Class Reference

Encapsulates the 'quality' of rendering, which in ArtWorks-speak was the WYSIWYG value. It is really a numeric value, but this fact should be hidden from everyone who should ask specific things of it, not use its value. More...

#include <quality.h>

List of all members.

Public Types

enum  QualityEnums { QualityGuideLayer = (-1), QualityMax = 110, QualityDefault = 100 }
enum  Line { NoLine, BlackLine, ThinLine, FullLine }
enum  Fill { NoFill, Bitmaps, Solid, Graduated }
enum  Blend { NoBlend, StartAndEnd, FullBlend }
enum  Antialias { NoAntialias, FullAntialias }
enum  Transparency { NoTransparency, FullTransparency }

Public Member Functions

 Quality (QualityEnums quality=QualityDefault)
 ~Quality ()
Qualityoperator= (const Quality &Other)
INT32 operator== (const Quality &Other)
INT32 operator!= (const Quality &Other)
Line GetLineQuality () const
 Determines how lines should be rendered based on the quality. Returns Quality::NoLine, ThinLine or FullLine.
Fill GetFillQuality () const
 Determines how fills should be rendered based on the quality. Returns Quality::NoFill, Solid or Graduated.
Blend GetBlendQuality () const
 Determines how Blends should be rendered based on the quality. Returns Quality::NoBlend, StartAndEnd or FullBlend.
Antialias GetAntialiasQuality () const
 Determines how Antialiass should be rendered based on the quality. Returns Quality::NoAntialias, or FullAntialias.
Transparency GetTransparencyQuality () const
 Determines how Transparencys should be rendered based on the quality. Returns Quality::NoTransparency, or FullTransparency. NOTE: ALWAYS NOTRANS currently.
void SetDefault ()
 Resets value to the default value, whatever that might be.
BOOL SetQuality (INT32)
 Sets numeric value for quality. You should be using this, except in very special situations.
INT32 GetQuality () const
 You should use the GetxxxQuality fns. Only in very special situations are you allowed to call this function. It was Protected to stop you from using it, but this has had to change for technical reasons. So, what does this function actually do. It tells you the numical value of the quality.

Static Public Attributes

static Quality DefaultQuality
 The quality level to give to new views.

Private Attributes

INT32 QualityValue

Friends

class OpQuality
class QualitySliderDescriptor


Detailed Description

Encapsulates the 'quality' of rendering, which in ArtWorks-speak was the WYSIWYG value. It is really a numeric value, but this fact should be hidden from everyone who should ask specific things of it, not use its value.

Author:
Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/4/94

Definition at line 114 of file quality.h.


Member Enumeration Documentation

enum Quality::Antialias
 

Enumerator:
NoAntialias 
FullAntialias 

Definition at line 184 of file quality.h.

00185     {
00186         NoAntialias,
00187         FullAntialias
00188     };

enum Quality::Blend
 

Enumerator:
NoBlend 
StartAndEnd 
FullBlend 

Definition at line 177 of file quality.h.

00178     {
00179         NoBlend,
00180         StartAndEnd,
00181         FullBlend
00182     };

enum Quality::Fill
 

Enumerator:
NoFill 
Bitmaps 
Solid 
Graduated 

Definition at line 169 of file quality.h.

00170     {
00171         NoFill,
00172         Bitmaps,
00173         Solid,
00174         Graduated
00175     };

enum Quality::Line
 

Enumerator:
NoLine 
BlackLine 
ThinLine 
FullLine 

Definition at line 161 of file quality.h.

00162     {
00163         NoLine,
00164         BlackLine,
00165         ThinLine,
00166         FullLine
00167     };

enum Quality::QualityEnums
 

Enumerator:
QualityGuideLayer 
QualityMax 
QualityDefault 

Definition at line 134 of file quality.h.

enum Quality::Transparency
 

Enumerator:
NoTransparency 
FullTransparency 

Definition at line 190 of file quality.h.

00191     {
00192         NoTransparency,
00193         FullTransparency
00194     };


Constructor & Destructor Documentation

Quality::Quality QualityEnums  quality = QualityDefault  )  [inline]
 

Definition at line 141 of file quality.h.

00141 { QualityValue=quality; }

Quality::~Quality  )  [inline]
 

Definition at line 142 of file quality.h.

00142 { }


Member Function Documentation

enum Quality::Antialias Quality::GetAntialiasQuality  )  const
 

Determines how Antialiass should be rendered based on the quality. Returns Quality::NoAntialias, or FullAntialias.

Author:
Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/4/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Definition at line 249 of file quality.cpp.

00250 {
00251     if (QualityValue <= 100)
00252         return (enum Quality::Antialias) NoAntialias;
00253     else
00254         return (enum Quality::Antialias) FullAntialias;
00255 }

enum Quality::Blend Quality::GetBlendQuality  )  const
 

Determines how Blends should be rendered based on the quality. Returns Quality::NoBlend, StartAndEnd or FullBlend.

Author:
Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/4/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Definition at line 207 of file quality.cpp.

00208 {
00209     if (QualityValue <= 20)
00210         return (enum Quality::Blend) StartAndEnd;
00211     else
00212         return (enum Quality::Blend) FullBlend;
00213 }

enum Quality::Fill Quality::GetFillQuality  )  const
 

Determines how fills should be rendered based on the quality. Returns Quality::NoFill, Solid or Graduated.

Author:
Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/4/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Definition at line 181 of file quality.cpp.

00182 {
00183     if (QualityValue >= 60)
00184         return (enum Quality::Fill) Graduated;
00185     else if (QualityValue > 30)
00186         return (enum Quality::Fill) Solid;
00187     else if (QualityValue > 10)
00188         return (enum Quality::Fill) Bitmaps;
00189     else
00190         return (enum Quality::Fill) NoFill;
00191 }

enum Quality::Line Quality::GetLineQuality  )  const
 

Determines how lines should be rendered based on the quality. Returns Quality::NoLine, ThinLine or FullLine.

Author:
Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/4/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Definition at line 157 of file quality.cpp.

00158 {
00159     if (QualityValue > 50 || QualityValue == QualityGuideLayer)
00160         return ((enum Quality::Line) FullLine);
00161     else if (QualityValue > 30)
00162         return (enum Quality::Line) ThinLine;
00163     else
00164         return (enum Quality::Line) BlackLine;
00165 }

INT32 Quality::GetQuality  )  const
 

You should use the GetxxxQuality fns. Only in very special situations are you allowed to call this function. It was Protected to stop you from using it, but this has had to change for technical reasons. So, what does this function actually do. It tells you the numical value of the quality.

Author:
Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/4/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
Numeric value for quality.
See also:
Quality::SetQuality

Definition at line 329 of file quality.cpp.

00330 {
00331     return QualityValue;
00332 }

enum Quality::Transparency Quality::GetTransparencyQuality  )  const
 

Determines how Transparencys should be rendered based on the quality. Returns Quality::NoTransparency, or FullTransparency. NOTE: ALWAYS NOTRANS currently.

Author:
Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/4/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Definition at line 229 of file quality.cpp.

00230 {
00231     // don't know how this is going to work yet
00232     return (enum Quality::Transparency) NoTransparency;
00233 }

INT32 Quality::operator!= const Quality Other  )  [inline]
 

Definition at line 155 of file quality.h.

00156     {
00157         return QualityValue != Other.QualityValue;
00158     }

Quality& Quality::operator= const Quality Other  )  [inline]
 

Definition at line 144 of file quality.h.

00145     {
00146         QualityValue = Other.QualityValue;
00147         return *this;
00148     }

INT32 Quality::operator== const Quality Other  )  [inline]
 

Definition at line 150 of file quality.h.

00151     {
00152         return QualityValue == Other.QualityValue;
00153     }

void Quality::SetDefault  ) 
 

Resets value to the default value, whatever that might be.

Author:
Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/4/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: ENSUREs if out of range. Scope: Public

Definition at line 272 of file quality.cpp.

00273 {
00274     QualityValue = QUALITY_DEFAULT;
00275 }

BOOL Quality::SetQuality INT32  NewQuality  ) 
 

Sets numeric value for quality. You should be using this, except in very special situations.

Author:
Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/4/94
Parameters:
NewQuality should be from 0 to MAX_QUALITY. [INPUTS]
Returns:
TRUE if changed, FALSE if out of range OR STAYED SAME.

Errors: ENSUREs if out of range.

See also:
Quality::GetQuality

Definition at line 292 of file quality.cpp.

00293 {
00294     if ( (NewQuality < 0 || NewQuality > QUALITY_MAX) && NewQuality != QUALITY_GUIDELAYER)
00295     {
00296         ENSURE(FALSE, "Bad quality in SetQuality");
00297         return FALSE;
00298     }
00299     else
00300     {
00301         if (QualityValue != NewQuality)
00302         {
00303             QualityValue = NewQuality;
00304             return TRUE;
00305         }
00306         else
00307             return FALSE;                               // not an error, just 'no-change'
00308     }
00309 }


Friends And Related Function Documentation

friend class OpQuality [friend]
 

Definition at line 128 of file quality.h.

friend class QualitySliderDescriptor [friend]
 

Definition at line 131 of file quality.h.


Member Data Documentation

Quality Quality::DefaultQuality [static]
 

The quality level to give to new views.

Preference: DefaultQuality Section: Rendering Range: 10 to 110.

Definition at line 214 of file quality.h.

INT32 Quality::QualityValue [private]
 

Definition at line 210 of file quality.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