Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TTransferMode
Inherited By:
None.
Purpose:
TRGBBlendTransferMode is a concrete class, derived from TTransferMode, that interpolates between two colors using the RGB color space. (The source and destination colors need not be TRGBColors, and the resulting color is converted from RGB to the specified color space.) A weighting factor determines the contribution of the source color to the mix. If the weight is 1.0, the resultant color is determined only by the source. Similarly, if the weight is 0.0, only the destination is used. Other weights perform a linear interpolation, so a weight of 0.5 mixes both colors equally. The interpolation applies to each of the RGB components as well as to the transparency.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
None.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
- TRGBBlendTransferMode (GIntensity blendWeight)
- TRGBBlendTransferMode ()
- TRGBBlendTransferMode (const TRGBBlendTransferMode &)
Interface Category:
API.
Purpose:
- Constructor used to set the blend weight value.
- Default constructor. Sets the blend weight to 1.0, which causes the resultant color to be based only on the source color.
- Copy constructor.
Calling Context:
- Call this constructor directly.
- Called by the stream-in operators. You can also call this constructor directly.
- Called to copy an object.
Parameters:
- GIntensity blendWeight -The value of the blend weight (0.0 -1.0). A value of 0.5 gives equal weighting to both the source and destination colors.
- Takes no parameters.
- const TRGBBlendTransferMode & -The object to be copied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TRGBBlendTransferMode ()
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 GetResultingColor (const TColor & sourceColor, const TColor & destColor, TColor & resultingColor) const
Interface Category:
API.
Purpose:
Performs an interpolation between the source and destination colors in RGB color space and returns the blended color (both the color and transparency values are interpolated). A weighting factor (0.0 -1.0) is set in the constructor. When the weighting factor is set to 0.5, the resulting color is determined by equal parts of the source and destination. The resulting RGB color is returned in a TColor object.
Calling Context:
Call this function directly.
Parameters:
- const TColor & sourceColor -The source color to blend.
- const TColor & destColor -The destination color to blend.
- TColor & resultingColor -The resulting, blended RGB color.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
GIntensity GetToBlendWeight () const
Interface Category:
API.
Purpose:
Returns the blend weight factor (0.0 -1.0) as a GIntensity object.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns a GIntensity object representing the blend weight given to the source and destination colors (0.0 -1.0).
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
static void GetBlendResult (const TRGBColor & sourceColor, GIntensity blendWeight, const TRGBColor & destColor, TRGBColor & resultingColor)
Interface Category:
API.
Purpose:
Performs an interpolation between the source and destination colors in RGB color space and returns the blended color (both the color and transparency values are interpolated). A weighting factor (0.0 -1.0) is set in the constructor. When the weighting factor is set to 0.5, the resulting color is determined by equal parts of the source and destination. The resulting RGB color is returned in a TRGBColor object.
Calling Context:
Call this function directly.
Parameters:
- const TRGBColor & sourceColor -The source color to blend.
- GIntensity blendWeight -The blend weight used.
- const TRGBColor & destColor -The destination color to blend.
- TRGBColor & resultingColor -The resulting, blended RGB color.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
TRGBBlendTransferMode & operator =(const TRGBBlendTransferMode & 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.
virtual TStream & operator >>=(TStream & towhere) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & towhere -The stream that the object streams itself out to.
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.
virtual TStream & operator <<= (TStream & fromwhere)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & fromwhere -The stream that the object streams itself in from.
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.
virtual ETransferModeClassID TemporaryTypeID () const
Interface Category:
API.
Purpose:
Returns the type of transfer mode this class represents.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns an ETransferModeClassID with value kRGBBlendTransferMode.
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.