Class: TPixelStreamReader

Declaration: PixelStreamReader.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

None.

Purpose:

TPixelStreamReader is an abstract base class that allows you to read from one image into another. Classes deriving from TPixelStreamReader implement pixel stream readers for specific image formats, such as 8-bit alpha RGB.

Instantiation:

Abstract base class; do not allocate.

Deriving Classes:

Classes deriving from TPixelStreamReader must override all of the CopyPixel functions and SetDestinationImage. Classes deriving from TPixelStreamReader should override AdviseWillRead if they need to preprocess any information before the pixel stream is read.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TPixelStreamReader::~TPixelStreamReader

virtual ~ TPixelStreamReader ()

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: TPixelStreamReader::AdviseWillRead

virtual void AdviseWillRead (const TLongRect & bounds)

Interface Category:

API.

Purpose:

AdviceWillRead is called prior to any CopyPixel member function so that preprocessing can take place.

Calling Context:

This function is called automatically by the system.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Classes deriving from TPixelStreamReader should override this function if they need to preprocess any information before the pixel stream is read.

Member Function: TPixelStreamReader::CopyPixelsAlongAffineDDA

virtual void CopyPixelsAlongAffineDDA (const ImageDDA & sourceDDA, long destinationX, long destinationY)

Interface Category:

API.

Purpose:

Reads a series of pixels from the source at the locations indicated by the specified ImageDDA structure, into the current destination image buffer starting at the coordinate specified. The ImageDDA specifies a linear interpolation.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This function is a pure virtual function and must be overridden by classes deriving from TPixelStreamReader.

Member Function: TPixelStreamReader::CopyPixelsAlongPerspectiveDDA

virtual void CopyPixelsAlongPerspectiveDDA (const ImageDDA & sourceDDA, long destinationX, long destinationY)

Interface Category:

API.

Purpose:

Reads a series of pixels from the source at the locations indicated by the specified ImageDDA structure, into the current destination image buffer starting at the coordinate specified. The ImageDDA specifies a linear interpolation followed by a divide by the fW element.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This function is a pure virtual function and must be overridden by classes deriving from TPixelStreamReader.

Member Function: TPixelStreamReader::CopyPixelRows

virtual void CopyPixelRows (long startSourceX, long startSourceY, bool readLeftToRight, const TLongRect & destinationBounds)

Interface Category:

API.

Purpose:

Reads a series of pixel rows from the source at the location specified, into the current destination image buffer at the location specified. The readLeftToRight variable states whether the columns from the source should be reversed.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This function is a pure virtual function and must be overridden by classes deriving from TPixelStreamReader.

Member Function: TPixelStreamReader::CopyPixelColumnsIntoRows

virtual void CopyPixelColumnsIntoRows (long startSourceX, long startSourceY, bool readTopToBottom, const TLongRect & destinationBounds)

Interface Category:

API.

Purpose:

Reads a series of pixel columns from the source at the location specified, into rows in the current destination image buffer at the location specified. The readTopToBottom variable states whether the rows from the source should be reversed.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This function is a pure virtual function and must be overridden by classes deriving from TPixelStreamReader.

Member Function: TPixelStreamReader::SetDestinationImage

virtual void SetDestinationImage (TGModifiableImage * destinationPixels)

Interface Category:

API.

Purpose:

Sets the destination image (the image into which the source image is read).

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This function is a pure virtual function and must be overridden by classes deriving from TPixelStreamReader.

Member Function: TPixelStreamReader::TPixelStreamReader

  1. TPixelStreamReader ()
  2. TPixelStreamReader (const TPixelStreamReader &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

TPixelStreamReader is an abstract base class--all the constructors are protected. Do not instantiate this class.

Member Function: TPixelStreamReader::operator=

const TPixelStreamReader & operator =(const TPixelStreamReader & 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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.