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.
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.
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:
- const TLongRect & bounds -The bounding rectangle to be read.
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:
- const ImageDDA & sourceDDA -Indicates the locations to be read.
- long destinationX -Indicates the x-coordinate within the destination image to place the new pixels.
- long destinationY -Indicates the y-coordinate within the destination image to place the new pixels.
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:
- const ImageDDA & sourceDDA -Indicates the locations to be read.
- long destinationX -Indicates the x-coordinate within the destination image to place the new pixels.
- long destinationY -Indicates the y-coordinate within the destination image to place the new pixels.
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.
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:
- long startSourceX -The x-coordinate within the source image to begin reading.
- long startSourceY -The y-coordinate within the source image to begin reading.
- bool readLeftToRight -Indicates whether the columns from the source image should be reversed.
- const TLongRect & destinationBounds -The bounding rectangle within the destination image to place the new pixels.
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:
- long startSourceX -The x-coordinate within the source image to begin reading.
- long startSourceY -The y-coordinate within the source image to begin reading.
- bool readTopToBottom -Indicates whether the rows from the source image should be reversed.
- const TLongRect & destinationBounds -The bounding rectangle within the destination image to place the new pixels.
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.
- TPixelStreamReader ()
- TPixelStreamReader (const TPixelStreamReader &)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
Calling Context:
- Called by the stream-in operators.
- 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.
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.