Class: TColorProfile

Declaration: ColorProfile.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

TICCColorProfile

Purpose:

TColorProfile descends from MCollectible and is an abstract base class to represent the color characteristics of a particular type of device. Its main purpose is to provide accurate conversion between colors represented in color spaces found in various types of devices. The color profile helps describe how the color conversions should be made. Conversion to and from Taligent XYZ and RGB color spaces is required.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

A color profile is required for all devices for which color matching is desired. Although a color profile may have custom structure and custom data to characterize a particular device, it may not be necessary to create your own derived color profile class. It may only be necessary to create custom data for an already existing color profile class. As support for existing color standards improves, standard color profile classes will be provided in the system to support additional standards. For very specific devices it may be necessary to derive a color profile class to characterize the color characteristics and color behavior of a given device. Derived classes must override the pure virtual functions for converting between RGB and XYZ color spaces. Conversion to and from XYZ and RGB color spaces is required although conversion between other color spaces is also allowed. RGB and XYZ color conversions should conform to the TRGBColor and TXYZColor definitions.

Concurrency:

Multithread safe.

Resource Use:

No special requirements.

Member Function: TColorProfile::TColorProfile

  1. TColorProfile ()
  2. 2 TColorProfile (const TColorProfile & aColorProfile)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. 2 Copy constructor.

Calling Context:

  1. Called by the stream-in operators.
  2. Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TColorProfile::~TColorProfile

~ TColorProfile ()

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: TColorProfile::GetDefaultColorProfile

static const TColorProfile & GetDefaultColorProfile ()

Interface Category:

API.

Purpose:

Returns the default TColorProfile.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The default color profile.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TColorProfile::ConvertRGBtoXYZ

virtual void ConvertRGBtoXYZ (const TRGBColor & aRGBColor, TXYZColor & aConvertedXYZColor) const

Interface Category:

API.

Purpose:

Converts the specified RGB color to the XYZ color according to this TColorProfile.

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: TColorProfile::ConvertXYZtoRGB

virtual void ConvertXYZtoRGB (const TXYZColor & aXYZColor, TRGBColor & aConvertedRGBColor) const

Interface Category:

API.

Purpose:

Converts the specified XYZ color to the RGB color according to this TColorProfile.

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: TColorProfile::GetColorProfileName

TToken GetColorProfileName () const

Interface Category:

API.

Purpose:

Returns the name of this TColorProfile.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The name of this color profile.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TColorProfile::IsEqual

virtual bool IsEqual (const MCollectible *) const

Interface Category:

API.

Purpose:

Tests two objects for equality. If the MCollectible argument is not a TColorProfile class, the function returns false; otherwise, it compares the profile names for equality.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if the two objects have the same profile name.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TColorProfile::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:

Multithread safe.

Other Considerations:

None.

Member Function: TColorProfile::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:

Multithread safe.

Other Considerations:

None.

Member Function: TColorProfile::operator=

TColorProfile & operator =(const TColorProfile & 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.