Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
None.
Inherited By:
None.
Purpose:
This is the base class that retrieves painters for frame buffers. Painters are responsible for colors and patterns for graphics and images.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
None.
Concurrency:
Multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
virtual ~ TPainterMaker ()
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: TPainterMaker::UsePaint
- virtual void UsePaint (const TLongRect & bounds, const TPaint * paint, const TTransferMode * transferMode, const TSpanPainter * paintClass, const TGrafState & grafState, int whichPaint =0)
- virtual void UsePaint (const TLongRect & bounds, const TPaint * paint, const TTransferMode * transferMode, const THairlinePainter * paintClass, const TGrafState & grafState, int whichPaint =0)
- virtual void UsePaint (const TLongRect & bounds, const TPaint * paint, const TTransferMode * transferMode, const TBitmapGlyphPainter * paintClass, const TGrafState & grafState, int whichPaint =0)
- virtual void UsePaint (const TLongRect & bounds, const TShader * shader, const T3DSpanPainter * paintClass, const TGrafState & grafState, int whichPaint =0)
Interface Category:
API.
Purpose:
- Specifies a TSpanPainter painter to be used for the frame buffer.
- Specifies a THairlinePainter painter to be used for the frame buffer.
- Specifies a TBitmapGlyphPainter painter to be used for the frame buffer.
- Specifies a T3DSpanPainter painter to be used for the frame buffer.
Calling Context:
- Call this function directly.
- Call this function directly.
- Call this function directly.
- Call this function directly.
Parameters:
- const TLongRect & bounds -The bounds of the rectangle for the display.
- const TPaint * paint -A pointer to the TPaint object for specifying colors and patterns.
- const TTransferMode * transferMode -A pointer to the transfer mode for determining the color of a graphic or image when it is drawn.
- const TSpanPainter * paintClass -A pointer to the TSpanPainter paint class.
- const TGrafState & grafState -A reference to the class that represents the graphic state variables needed to draw a graphic or image.
- int whichPaint =0 -References one of two possible painters to use; set to the default of 0.
- const TLongRect & bounds -The bounds of the rectangle for the display.
- const TPaint * paint -A pointer to the TPaint object for specifying colors and patterns.
- const TTransferMode * transferMode -A pointer to the transfer mode for determining the color of a graphic or image when it is drawn.
- const THairlinePainter * paintClass -A pointer to the THairlinePainter paint class.
- const TGrafState & grafState -A reference to the class that represents the graphic state variables needed to draw a graphic or image.
- int whichPaint =0 -References one of two possible painters to use; set to the default of 0.
- const TLongRect & bounds -The bounds of the rectangle for the display.
- const TPaint * paint -A pointer to the TPaint object for specifying colors and patterns.
- const TTransferMode * transferMode -A pointer to the transfer mode for determining the color of a graphic or image when it is drawn.
- const TBitmapGlyphPainter * paintClass -A pointer to the TBitmapGlyphPainter paint class.
- const TGrafState & grafState -A reference to the class that represents the graphic state variables needed to draw a graphic or image.
- int whichPaint =0 -References one of two possible painters to use; set to the default of 0.
- const TLongRect & bounds -The bounds of the rectangle for the display.
- const TShader * shader -A pointer to the TShader shader class.
- const T3DSpanPainter * paintClass -A pointer to the T3DSpanPainter paint class.
- const TGrafState & grafState -A reference to the class that represents the graphic state variables needed to draw a graphic or image.
- int whichPaint =0 -References one of two possible painters to use; set to the default of 0.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TPainterMaker::DoneWithPaints
virtual void DoneWithPaints ()
Interface Category:
API.
Purpose:
Indicates that this application is done using painters for the frame buffer. This function frees resources that had been allocated for painters.
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: TPainterMaker::StartDrawing
- virtual void StartDrawing (const TLongRect & bounds, unsigned long & boundsBottom, TSpanPainter * & activePainter, int whichPaint =0)
- virtual void StartDrawing (const TLongRect & bounds, unsigned long & boundsBottom, THairlinePainter * & activePainter, int whichPaint =0)
- virtual void StartDrawing (const TLongRect & bounds, unsigned long & boundsBottom, TBitmapGlyphPainter * & activePainter, int whichPaint =0)
- virtual void StartDrawing (const TLongRect & bounds, unsigned long & boundsBottom, T3DSpanPainter * & activePainter, int whichPaint =0)
Interface Category:
API.
Purpose:
- Starts the TSpanPainter painter rendering to the frame buffer.
- Starts the THairlinePainter painter rendering to the frame buffer.
- Starts the TBitmapGlyphPainter painter rendering to the frame buffer.
- Starts the T3DSpanPainter painter rendering to the frame buffer.
Calling Context:
- Call this function directly.
- Call this function directly.
- Call this function directly.
- Call this function directly.
Parameters:
- const TLongRect & bounds -A reference to the bounds of the draw area.
- unsigned long & boundsBottom -A reference to the bottom boundary of the draw area.
- TSpanPainter * & activePainter -A reference to the painter currently active.
- int whichPaint =0 -Indicates the painter which is being used: set to 0.
- const TLongRect & bounds -A reference to the bounds of the draw area.
- unsigned long & boundsBottom -A reference to the bottom boundary of the draw area.
- THairlinePainter * & activePainter -A reference to the painter currently active.
- int whichPaint =0 -Indicates the painter which is being used: set to 0.
- const TLongRect & bounds -A reference to the bounds of the draw area.
- unsigned long & boundsBottom -A reference to the bottom boundary of the draw area.
- TBitmapGlyphPainter * & activePainter -A reference to the painter currently active.
- int whichPaint =0 -Indicates the painter which is being used: set to 0.
- const TLongRect & bounds -A reference to the bounds of the draw area.
- unsigned long & boundsBottom -A reference to the bottom boundary of the draw area.
- T3DSpanPainter * & activePainter -A reference to the painter currently active.
- int whichPaint =0 -Indicates the painter which is being used: set to 0.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TPainterMaker::StopDrawing
virtual void StopDrawing ()
Interface Category:
API.
Purpose:
Stops the current painter drawing to the frame buffer.
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: TPainterMaker::InitializeStreamers
virtual TPixelStreamReader * InitializeStreamers (const TLongRect & bounds, const TTransferMode * transferMode, const TGImage & srcPixels, const TPixelBuffer & dstPixels, EPixelStreamReaderRequest readerRequest, const TGrafState & grafState, TLongRect & minimumEnclosure)
Interface Category:
API.
Purpose:
Initializes the pixel stream reader. This function specifies the source image that is to be read, along with the destination buffer for the output pixels and the type of pixel stream reader.
Calling Context:
Call this function directly.
Parameters:
- const TLongRect & bounds -A reference to the boundaries of the graphic.
- const TTransferMode * transferMode -A pointer to the transfer mode for determining the color of a graphic or image when it is drawn.
- const TGImage & srcPixels -The TGImage object that contains the pixels for the source image.
- const TPixelBuffer & dstPixels -A reference to the destination pixel buffer to which the pixels are copied.
- EPixelStreamReaderRequest readerRequest -The tag specifying the type of pixel reader.
- const TGrafState & grafState -A reference to the class that represents the graphic state variables needed to draw a graphic or image.
- TLongRect & minimumEnclosure -The minimum area for the graphic representation.
Return Value:
Returns a pointer to the pixel stream reader for this graphic.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TPainterMaker::DoneWithStreamers
virtual void DoneWithStreamers ()
Interface Category:
API.
Purpose:
Indicates that this application is finished using the pixel stream reader. Releases the pixel stream reader and frees resources that had been allocated for it.
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: TPainterMaker::StartPixelTransfer
virtual void StartPixelTransfer (const TLongRect & bounds, unsigned long & boundsBottom, TPixelStreamWriter * & writer)
Interface Category:
API.
Purpose:
Starts the pixel transfer process. The pixels are read from the source object and written to the destination buffer.
Calling Context:
Call this function directly.
Parameters:
- const TLongRect & bounds -The bounds of the graphic image.
- unsigned long & boundsBottom -A reference to the bottom boundary of the draw area.
- TPixelStreamWriter * & writer -The pixel stream writer that writes to the destination buffer.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TPainterMaker::StopPixelTransfer
virtual void StopPixelTransfer ()
Interface Category:
API.
Purpose:
Stops the pixel transfer process.
Calling Context:
Call this function directly when you have finished transferring one pixel buffer to another.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
TPainterMaker ()
Interface Category:
API.
Purpose:
Default constructor.
Calling Context:
Called by the stream-in operators. This constructor is for internal use only.
Parameters:
Return Value:
None.
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.