Class: TErrorDiffusionDither

Declaration: DitherHints.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TDitherHint

Inherited By:

None.

Purpose:

Adopts a TErrorDiffusionDither object when you want to diffuse an error value. An error value is the difference between the exact pixel value and the approximate pixel value rendered. The error value is divided up and added to adjacent pixels, spreading the error over the adjacent pixels in the rendered graphic. A diffusion matrix is used to specify the percentage of the error to apply to each of the adjacent pixels. The DiffusionMatrix structure implements a flexible diffusion matrix.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

None.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TErrorDiffusionDither::TErrorDiffusionDither

  1. TErrorDiffusionDither (bool Primary =true)
  2. TErrorDiffusionDither (const TErrorDiffusionDither &)

Interface Category:

API.

Purpose:

  1. Creates a primary or secondary error diffusion dither hint.
  2. Copy constructor.

Calling Context:

  1. Call to create a primary or secondary error diffusion dither hint.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TErrorDiffusionDither::~TErrorDiffusionDither

virtual ~ TErrorDiffusionDither ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TErrorDiffusionDither::CreateDiffusionMatrix

virtual DiffusionMatrix * CreateDiffusionMatrix () const

Interface Category:

API.

Purpose:

Creates the default diffusion matrix. Override this function and use your own version of DiffusionMatrix to alter the default error diffusion matrix.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a reference to the diffusion matrix.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TErrorDiffusionDither::operator=

TErrorDiffusionDither & operator =(const TErrorDiffusionDither & source)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called when an object is assigned to another compatible object.

Parameters:

Return Value:

A non-const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TErrorDiffusionDither::operator>>=

virtual TStream & operator >>=(TStream & towhere) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself out to.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TErrorDiffusionDither::operator<<=

virtual TStream & operator <<= (TStream & fromwhere)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself in from.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TErrorDiffusionDither::TemporaryTypeID

virtual EDitherHintClassID TemporaryTypeID () const

Interface Category:

API.

Purpose:

Returns the type identifier for the specific dither hint class. The return value is one of the values from the enum EDitherHintClassID, defined by this class. This is a temporary replacement for the C++ language typeid operator. This function will go away in the future.

Calling Context:

Call this function instead of the C++ language typeid operator.

Parameters:

Return Value:

Returns kErrorDiffusionDither.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TErrorDiffusionDither::GetBaseTemporaryTypeID

virtual EDitherHintClassID GetBaseTemporaryTypeID () const

Interface Category:

API.

Purpose:

Returns the type identifier for the specific dither hint class. The return value is one of the values from the enum EDitherHintClassID, defined by this class. This is a temporary replacement for the C++ language typeid operator. This function will go away in the future.

Calling Context:

Call this function instead of the C++ language typeid operator.

Parameters:

Return Value:

Returns kErrorDiffusionDither.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.