Class: TTransferMode

Declaration: TransferModes.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

TDstActiveTransferMode TGrayAdditiveTransferMode TGrayBlendTransferMode TGrayDstAtopTransferMode TGrayDstInTransferMode TGrayDstOutTransferMode TGrayMaximumTransferMode TGrayMinimumTransferMode TGrayMultiplyTransferMode TGraySrcAroundTransferMode TGraySrcAtopTransferMode TGraySrcInTransferMode TGraySrcOutTransferMode TGraySrcOverTransferMode TGraySubtractiveTransferMode THLSBlendTransferMode THLSReplaceHueTransferMode THLSReplaceLightnessTransferMode THLSReplaceSaturationTransferMode THLSTintTransferMode THSVBlendTransferMode THSVReplaceHueTransferMode THSVReplaceSaturationTransferMode THSVReplaceValueTransferMode THSVTintTransferMode TMinZDepthComposite TPixelXORTransferMode TRGBAdditiveTransferMode TRGBBlendTransferMode TRGBDstAtopTransferMode TRGBDstInTransferMode TRGBDstOutTransferMode TRGBHighlightTransferMode TRGBMaximumTransferMode TRGBMinimumTransferMode TRGBMultiplyTransferMode TRGBSrcAroundTransferMode TRGBSrcAtopTransferMode TRGBSrcInTransferMode TRGBSrcOutTransferMode TRGBSrcOverTransferMode TRGBSubtractiveTransferMode TRGBTransparentTransferMode TSrcActiveTransferMode

Purpose:

TTransferMode is an abstract base class for transfer modes. A transfer mode is an algorithm for determining the color of a graphic or image when it is drawn. The various transfer mode algorithms let you manipulate the source and destination colors to achieve different rendered effects. The source is the graphic or image being drawn; the destination is the location where the graphic is drawn. A TGrafBundle object can own a transfer mode for a fill, a frame, and an image. When no transfer mode is adopted, the source copy transfer mode is used by default. To create your own transfer mode algorithm, derive from TTransferMode and implement the pure virtual functions.

Instantiation:

Abstract class; do not allocate.

Deriving Classes:

Provided classes include: TSrcActiveTransferMode, TDstActiveTransferMode, TMinZDepthComposite, and TPixelXORTransferMode; as well as many others whose names end in TransferMode and begin with TGray, TRGB, THLS, or THSV.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TTransferMode::~TTransferMode

virtual ~ TTransferMode ()

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: TTransferMode::GetResultingColor

virtual void GetResultingColor (const TColor & sourceColor, const TColor & destColor, TColor & resultingColor) const

Interface Category:

API.

Purpose:

Returns the resulting color after applying the particular transfer mode to the source color upon the destination color. Derived classes implement the specific behavior of this function. The default behavior of this function is undefined.

Calling Context:

Do not call this function directly. It is a pure virtual function that is designed to be overridden by derived classes.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTransferMode::operator=

TTransferMode & operator =(const TTransferMode & source)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Call this function by using the operator in an assignment statement.

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.

Member Function: TTransferMode::operator>>=

virtual TStream & operator >>=(TStream & towhere) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself out to.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTransferMode::operator<<=

virtual TStream & operator <<= (TStream & fromwhere)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself in from.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTransferMode::TTransferMode

  1. TTransferMode ()
  2. TTransferMode (const TTransferMode &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators and by the constructors of derived classes. Because this is a protected member function, do not call this function directly.
  2. Called by derived classes to copy an object. Because this is a protected member function, do not call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

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

Member Function: TTransferMode::TemporaryTypeID

virtual ETransferModeClassID TemporaryTypeID () const

Interface Category:

API.

Purpose:

Returns the type of transfer mode that the derived class of TTransferMode represents.

Calling Context:

You can call this function directly. However, because this is an abstract base class, you will most likely be calling the overridden function of a derived class.

Parameters:

Return Value:

Returns an ETransferModeClassID value of kTransferMode. Derived classes return the appropriate ETransferModeClassID for their transfer type.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTransferMode::GetBaseTemporaryTypeID

virtual ETransferModeClassID GetBaseTemporaryTypeID () const

Interface Category:

API.

Purpose:

Returns the type of transfer mode that the parents class of a derived class of TTransferMode represents. This is useful when there are two (or more) levels of derived classes and you want to know what type of transfer mode the parent of this class represents.

Calling Context:

You can call this function directly. However, because this is an abstract base class, you will most likely be calling the overridden function of a derived class.

Parameters:

Return Value:

Returns an ETransferModeClassID value of kTransferMode. Derived classes return the appropriate ETransferModeClassID for their transfer type.

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.