Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
None.
Inherited By:
None.
Purpose:
TPixelStreamWriter is the abstract class for pixel stream writers. It defines the basic functions needed for outputting pixel streams to the frame buffer.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
The different pixel writers should derive from this class.
Concurrency:
Multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
virtual ~ TPixelStreamWriter ()
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:
Multithread safe.
Other Considerations:
None.
virtual void CopyPixelRows (long startSrcX, long startSrcY, const TLongRect & destBounds)
Interface Category:
API.
Purpose:
Writes a series of pixel rows from the source, which is located at the coordinates referenced by startSrcX and startSrcY, into the destination image rectangle that is referenced by destBounds.
Calling Context:
Call this function directly.
Parameters:
- long startSrcX -The starting location for the x-coordinates of the source pixels.
- long startSrcY -The starting location for the y-coordinates of the source pixels.
- const TLongRect & destBounds -The bounds of the destination image rectangle.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual TPixelBuffer * CreatePixelBuffer (const TLongRect &) const
Interface Category:
API.
Purpose:
Creates a strip of pixels of the specified size in the format that the client expects. This is accomplished polymorphically.
Calling Context:
Call this function directly.
Parameters:
- const TLongRect & -A reference to the bounds of the rectangle that is to contain the strip of pixels.
Return Value:
Returns a reference to the TPixelBuffer that contains the new pixels.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual void AdviseWillModify (const TLongRect & bounds)
Interface Category:
API.
Purpose:
Warns the pixel stream reader of impending writes to the pixel buffer, in those cases where buffering is required.
Calling Context:
Call this function directly.
Parameters:
- const TLongRect & bounds -A reference to the bounds of the rectangle that contains the pixels being read and possibly written to.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TPixelStreamWriter::RequiresTopToBottomCopies
virtual bool RequiresTopToBottomCopies () const
Interface Category:
API.
Purpose:
Indicates if the pixel write algorithm that is employed for this writer requires the source to be in scan line order.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if the pixel write algorithm requires the source to be in scan line order; otherwise, returns false.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual void SetSourceImage (const TGImage * sourcePixels)
Interface Category:
API.
Purpose:
Sets the TGImage that is the source of the pixels for the pixel stream writer.
Calling Context:
Call this function directly.
Parameters:
- const TGImage * sourcePixels -A pointer to the TGImage that contains the source pixels.
Return Value:
None.
Exceptions:
Throws a kPixelsNotAccessible exception if the source pixels are not accessible for any reason, or a kUnexpectedPixelLayout exception if the layout of the source pixels is incorrect.
Concurrency:
Multithread safe.
Other Considerations:
None.
- TPixelStreamWriter ()
- TPixelStreamWriter (const TPixelStreamWriter & source)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
Calling Context:
- Called by the stream-in operators and derived classes.
- Called to copy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
const TPixelStreamWriter & operator =(const TPixelStreamWriter & 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:
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.