Class: TNoiseDither

Declaration: DitherHints.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TDitherHint

Inherited By:

None.

Purpose:

Adopt a TNoiseDither object when you want to add a random amount of noise to the rendered graphic. The noise dither changes the pixel value by a random value. When constructing a TNoiseDither object, specify the maximum value by which any pixel can be changed. This maximum value is known as the amplitude. Use this class to get a noisy or mezzotint-looking dither.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

None.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TNoiseDither::TNoiseDither

  1. TNoiseDither (bool primary =true)
  2. TNoiseDither (GCoordinate ditherAmplitude, bool primary =true)
  3. TNoiseDither (const TNoiseDither &)

Interface Category:

API.

Purpose:

  1. Creates a primary or secondary noise dither hint.
  2. Creates a noise dither with the given amplitude.
  3. Copy constructor.

Calling Context:

  1. Call to create a primary or secondary noise dither hint.
  2. Call to create a noise dither given an amplitude.
  3. 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: TNoiseDither::~TNoiseDither

virtual ~ TNoiseDither ()

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: TNoiseDither::GetDitherAmplitude

GCoordinate GetDitherAmplitude () const

Interface Category:

API.

Purpose:

Returns the amplitude of the noise dither.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The amplitude of the noise dither.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNoiseDither::operator=

TNoiseDither & operator =(const TNoiseDither & 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: TNoiseDither::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: TNoiseDither::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: TNoiseDither::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 kNoiseDither.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNoiseDither::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 kNoiseDither.

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.