Class: TPixelStreamWriter

Declaration: PixelStreamWriter.h

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.

Member Function: TPixelStreamWriter::~TPixelStreamWriter

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.

Member Function: TPixelStreamWriter::CopyPixelRows

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TPixelStreamWriter::CreatePixelBuffer

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:

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.

Member Function: TPixelStreamWriter::AdviseWillModify

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:

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.

Member Function: TPixelStreamWriter::SetSourceImage

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:

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.

Member Function: TPixelStreamWriter::TPixelStreamWriter

  1. TPixelStreamWriter ()
  2. TPixelStreamWriter (const TPixelStreamWriter & source)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

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

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TPixelStreamWriter::operator=

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.