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.
- TErrorDiffusionDither (bool Primary =true)
- TErrorDiffusionDither (const TErrorDiffusionDither &)
Interface Category:
API.
Purpose:
- Creates a primary or secondary error diffusion dither hint.
- Copy constructor.
Calling Context:
- Call to create a primary or secondary error diffusion dither hint.
- Called to copy an object.
Parameters:
- bool primary =true -The flag indicating whether the new dither hint is primary or secondary. The default value is true.
- const TErrorDiffusionDither & -The error diffusion dither to be copied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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.
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.
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.
virtual TStream & operator >>=(TStream & towhere) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & towhere -The stream to which the object streams itself out.
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.
virtual TStream & operator <<= (TStream & fromwhere)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & fromwhere -The stream from which the object streams itself in.
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.
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.
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.