The IDeviceColor class works with device-independent color indexes.
The color white is used for IDeviceColor::background. The color black is used for IDeviceColor::neutral and IDeviceColor::defaultColor.
You can construct and destruct objects of this class.
![]() |
public:
virtual ~IDeviceColor()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IDeviceColor(DeviceColor color)
You can only construct objects of this class from a DeviceColor enumerator.
IInvalidRequest | color is not a valid DeviceColor enumerator value, or the presentation system was unable to return the device color. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to identify the device-independent color represented by an IDeviceColor object.
![]() |
public:
DeviceColor deviceColor() const
Returns the DeviceColor enumerator value used to create this object.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
enum DeviceColor { defaultColor, background, neutral }
Use these enumerators to specify the device-independent color of the object you are constructing:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The color values in Motif are hard coded. The background color is white, the neutral color is black, and the defaultColor is black.
virtual ~IBaseColor()
IBaseColor(EPredefinedColor commonlyUsedColor)
IBaseColor()
IBaseColor(CharIntensity gray, CharIntensity opacity = 255)
IBaseColor(const IBaseColor&)
IBaseColor( CharIntensity red, CharIntensity green, CharIntensity blue, CharIntensity opacity = 255 )
bool operator !=(const IBaseColor&) const
IBaseColor& operator =(const IBaseColor& source)
virtual bool operator ==(const IBaseColor&) const
virtual ~IColor()
long asRGBLong() const
virtual CharIntensity blueMix() const
virtual void blueMix(GIntensity& blue) const
virtual void elementsInXYZColorSpace( GIntensity& x, GIntensity& y, GIntensity& z ) const
virtual CharIntensity gray() const
virtual void greenMix(GIntensity& green) const
virtual CharIntensity greenMix() const
IColor( unsigned long index, const IColorMap* referencedColorMap = NULL )
IColor(const IColor& color)
IColor(ESystemColor value)
IColor(EPredefinedColor color)
IColor( CharIntensity red, CharIntensity green, CharIntensity blue, CharIntensity opacity = 255 )
virtual long index() const
virtual void opacity(GIntensity& opacity) const
virtual CharIntensity opacity() const
IColor& operator =(const IColor& color)
virtual bool operator ==(const IBaseColor& color) const
IBaseColor::EPredefinedColor predefinedColor() const
virtual void redMix(GIntensity& red) const
virtual CharIntensity redMix() const
ESystemColor runtimeGuiColor() const
virtual IBaseColor& setBlue(CharIntensity blue)
virtual void setElementsInXYZColorSpace( GIntensity x, GIntensity y, GIntensity z )
virtual IBaseColor& setGreen(CharIntensity green)
virtual IBaseColor& setOpacity(CharIntensity opacity)
virtual IBaseColor& setRed(CharIntensity red)
virtual ~IMStreamable()
void externalizeToStream(IDataStream& towhere) const
void internalizeFromStream(IDataStream& fromwhere)
virtual const ITypeRepresentation& typeRepresentation() const = 0
const IColorProfile* colorProfile() const
IBaseColor& copyRGBA(const IBaseColor& source)
long createIndex( CharIntensity r, CharIntensity g, CharIntensity b )
void rgbFromIndex(unsigned long index)
void setRGB( CharIntensity r, CharIntensity g, CharIntensity b, CharIntensity o = 255 )
IMStreamable(const IMStreamable& other)
IMStreamable()
virtual void readFromStream(IDataStream& fromwhere) = 0
virtual void writeToStream(IDataStream& towhere) const = 0
virtual void readFromStream(IDataStream& fromWhere)
virtual void writeToStream(IDataStream& toWhere) const
CharIntensity fBlue
static const IColorProfile* fgColorProfile
CharIntensity fGreen
CharIntensity fOpacity
CharIntensity fRed