PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFXRGBColor
Class which represents a RGBA color.
#include <SFXRGBColor.h.hpp>
class SFXRGBColor;
SFMTYPEDEFCLASS(SFXRGBColor)

Description

The SFXRGBColor class represents the RGBA (Red, Green, Blue, and Alpha)color.

In the functions of the SFXFrameColor class, 255 or 0 will be returned as return value when result value of color operation is over 255 or under 0, respectively.

Reference

SFXFrameColor | SFXBevelColor

Member

Constructor/Destructor
SFXRGBColor( Void )
Constructor of the SFXRGBColor class.
SFXRGBColor( SFXRGBColorConstRef param )
Constructor of the SFXRGBColor class.
SFXRGBColor( UInt08 red , UInt08 green , UInt08 blue , UInt08 alpha )
Constructor of the SFXRGBColor class.
SFXRGBColor( UInt08 mono , UInt08 alpha )
Constructor of the SFXRGBColor class.
SFXRGBColor( RGBVAL rgbval )
Constructor of the SFXRGBColor class.
Public Functions
SFXRGBColorRef Add( SFXRGBColorConstRef param )
Add the specified value to the RGBA value.
SFXRGBColorRef Add( UInt08 red , UInt08 green , UInt08 blue , UInt08 alpha )
Add the specified value to the RGBA value.
SFXRGBColorRef Add( UInt08 mono , UInt08 alpha )
Add the specified value to the RGBA value.
SFXRGBColorRef AddAlpha( UInt08 param )
Add the specified value to the A value.
SFXRGBColorRef AddBlue( UInt08 param )
Add the specified value to the B value.
SFXRGBColorRef AddGreen( UInt08 param )
Add the specified value to the G value.
SFXRGBColorRef AddRGB( UInt08 red , UInt08 green , UInt08 blue )
Add the specified value to the RGB value.
SFXRGBColorRef AddRGB( UInt08 mono )
Add the specified value to the RGB value.
SFXRGBColorRef AddRed( UInt08 param )
Add the specified value to the R value.
RGBVAL AsRGBVAL( Void )
Convert SFXRGBColor into RGBVAL of BREW.
Bool Equals( SFXRGBColorConstRef param )
Check whether the RGBA values of this color equal those of the specified color or not.
Bool Equals( UInt08 red , UInt08 green , UInt08 blue , UInt08 alpha )
Check whether the RGBA values of this color equal those of the specified color or not.
Bool Equals( UInt08 mono , UInt08 alpha )
Check whether the RGBA values of this color equal those of the specified color or not.
Bool EqualsRGB( SFXRGBColorConstRef param )
Check whether the RGB values of this color equal those of the specified color or not.
Bool EqualsRGB( UInt08 red , UInt08 green , UInt08 blue )
Check whether the RGB values of this color equal those of the specified color or not.
Bool EqualsRGB( UInt08 mono )
Check whether the RGB values of this color equal those of the specified color or not.
UInt08 GetAlpha( Void )
Get the A value.
UInt08 GetBlue( Void )
Get the B value.
UInt08 GetBrightness( Void )
Get the brightness of the YCrCb color.
UInt08 GetGreen( Void )
Get the G value.
UInt08 GetRed( Void )
Get the R value.
SFXRGBColorRef Set( SFXRGBColorConstRef param )
Set the RGBA value.
SFXRGBColorRef Set( UInt08 red , UInt08 green , UInt08 blue , UInt08 alpha )
Set the RGBA value.
SFXRGBColorRef Set( UInt08 mono , UInt08 alpha )
Set the RGBA value.
SFXRGBColorRef Set( RGBVAL rgbval )
Set the RGBA value.
SFXRGBColorRef SetAlpha( UInt08 param )
Set the A value.
SFXRGBColorRef SetBlue( UInt08 param )
Set the B value.
SFXRGBColorRef SetGreen( UInt08 param )
Set the G value.
SFXRGBColorRef SetRGB( UInt08 red , UInt08 green , UInt08 blue )
Set the RGB value.
SFXRGBColorRef SetRGB( UInt08 mono )
Set the RGB value.
SFXRGBColorRef SetRed( UInt08 param )
Set the R value.
SFXRGBColorRef Sub( SFXRGBColorConstRef param )
Subtract the specified value from the RGBA value.
SFXRGBColorRef Sub( UInt08 red , UInt08 green , UInt08 blue , UInt08 alpha )
Subtract the specified value from the RGBA value.
SFXRGBColorRef Sub( UInt08 mono , UInt08 alpha )
Subtract the specified value from the RGBA value.
SFXRGBColorRef SubAlpha( UInt08 param )
Subtract the specified value from the A value.
SFXRGBColorRef SubBlue( UInt08 param )
Subtract the specified value from the B value.
SFXRGBColorRef SubGreen( UInt08 param )
Subtract the specified value from the G value.
SFXRGBColorRef SubRGB( UInt08 red , UInt08 green , UInt08 blue )
Subtract the specified value from the RGB value.
SFXRGBColorRef SubRGB( UInt08 mono )
Subtract the specified value from the RGB value.
SFXRGBColorRef SubRed( UInt08 param )
Subtract the specified value from the R value.
static
SFXRGBColorConstRef
ZeroInstance( Void )
Get the instance that represents 0.
SFXRGBColorRef operator+=( SFXRGBColorConstRef param )
Add the specified value to the RGBA value.
SFXRGBColorRef operator-=( SFXRGBColorConstRef param )
Subtract the specified value from the RGBA value
SFXRGBColorRef operator=( SFXRGBColorConstRef param )
Assign a RGBA value.
SFXRGBColor::AtomRec * atomic_cast( SFXRGBColor * param )
Convert SFXRGBColor into SFXRGBColor::AtomRec.
SFXRGBColor::AtomRec const * atomic_cast( SFXRGBColor const * param )
Convert SFXRGBColor into SFXRGBColor::AtomRec.
Bool operator==( SFXRGBColorConstRef left , SFXRGBColorConstRef right )
Check the "==" relation.
SFXRGBColor operator-( SFXRGBColorConstRef left , SFXRGBColorConstRef right )
Subtract the specified value from the RGBA value
Bool operator!=( SFXRGBColorConstRef left , SFXRGBColorConstRef right )
Check the "!=" relation.
SFXRGBColor operator+( SFXRGBColorConstRef left , SFXRGBColorConstRef right )
Add the specified value to the RGBA value.
Types
AtomRec
Structure that represents a RGBA color.
Global Functions
SFXRGBColor::AtomRec * atomic_cast( SFXRGBColor * param )
Convert SFXRGBColor into SFXRGBColor::AtomRec.
SFXRGBColor::AtomRec const * atomic_cast( SFXRGBColor const * param )
Convert SFXRGBColor into SFXRGBColor::AtomRec.
Bool operator==( SFXRGBColorConstRef left , SFXRGBColorConstRef right )
Check the "==" relation.
SFXRGBColor operator-( SFXRGBColorConstRef left , SFXRGBColorConstRef right )
Subtract the specified value from the RGBA value
Bool operator!=( SFXRGBColorConstRef left , SFXRGBColorConstRef right )
Check the "!=" relation.
SFXRGBColor operator+( SFXRGBColorConstRef left , SFXRGBColorConstRef right )
Add the specified value to the RGBA value.

SFXRGBColor::SFXRGBColor
Constructor of the SFXRGBColor class.
[ public, explicit ]
SFXRGBColor(Void);
[ public ]
SFXRGBColor(
    SFXRGBColorConstRef param   // source color
);
[ public, explicit ]
SFXRGBColor(
    UInt08 red     // R value
    UInt08 green   // G value
    UInt08 blue    // B value
    UInt08 alpha   // A value
);
[ public, explicit ]
SFXRGBColor(
    UInt08 mono    // RGB value
    UInt08 alpha   // A value
);
[ public, explicit ]
SFXRGBColor(
    RGBVAL rgbval   // color of RGBVAL type
);

SFXRGBColor::Add
Add the specified value to the RGBA value.
[ public ]
SFXRGBColorRef Add(
    SFXRGBColorConstRef param   // value to add to color
);
[ public ]
SFXRGBColorRef Add(
    UInt08 red     // value to add to the R value 
    UInt08 green   // value to add to the G value 
    UInt08 blue    // value to add to the B value 
    UInt08 alpha   // value to add to the A value 
);
[ public ]
SFXRGBColorRef Add(
    UInt08 mono    // value to add to the RGB value 
    UInt08 alpha   // value to add to the A value 
);

Reference

SFXRGBColor::AddAlpha | SFXRGBColor::AddBlue | SFXRGBColor::AddGreen | SFXRGBColor::AddRed | SFXRGBColor::AddRGB


SFXRGBColor::AddAlpha
Add the specified value to the A value.
[ public ]
SFXRGBColorRef AddAlpha(
    UInt08 param   // value to add to the A value 
);

Reference

SFXRGBColor::Add | SFXRGBColor::AddBlue | SFXRGBColor::AddGreen | SFXRGBColor::AddRed | SFXRGBColor::AddRGB


SFXRGBColor::AddBlue
Add the specified value to the B value.
[ public ]
SFXRGBColorRef AddBlue(
    UInt08 param   // value to add to the B value 
);

Reference

SFXRGBColor::Add | SFXRGBColor::AddAlpha | SFXRGBColor::AddGreen | SFXRGBColor::AddRed | SFXRGBColor::AddRGB | SFXRGBColor::SubBlue


SFXRGBColor::AddGreen
Add the specified value to the G value.
[ public ]
SFXRGBColorRef AddGreen(
    UInt08 param   // value to add to the G value 
);

Reference

SFXRGBColor::Add | SFXRGBColor::AddAlpha | SFXRGBColor::AddBlue | SFXRGBColor::AddRed | SFXRGBColor::AddRGB | SFXRGBColor::SubRed


SFXRGBColor::AddRGB
Add the specified value to the RGB value.
[ public ]
SFXRGBColorRef AddRGB(
    UInt08 red     // value to add to the R value 
    UInt08 green   // value to add to the G value 
    UInt08 blue    // value to add to the B value 
);
[ public ]
SFXRGBColorRef AddRGB(
    UInt08 mono   // value to add to the RGB value 
);

Reference

SFXRGBColor::Add | SFXRGBColor::AddAlpha | SFXRGBColor::AddBlue | SFXRGBColor::AddGreen | SFXRGBColor::AddRed


SFXRGBColor::AddRed
Add the specified value to the R value.
[ public ]
SFXRGBColorRef AddRed(
    UInt08 param   // value to add to the R value 
);

Reference

SFXRGBColor::Add | SFXRGBColor::AddAlpha | SFXRGBColor::AddBlue | SFXRGBColor::AddGreen | SFXRGBColor::AddRGB | SFXRGBColor::SubGreen


SFXRGBColor::AsRGBVAL
Convert SFXRGBColor into RGBVAL of BREW.
[ public, const ]
RGBVAL AsRGBVAL(Void);

SFXRGBColor::Equals
Check whether the RGBA values of this color equal those of the specified color or not.
[ public, const ]
Bool Equals(
    SFXRGBColorConstRef param   // color to compare
);
[ public, const ]
Bool Equals(
    UInt08 red     // R value to compare
    UInt08 green   // G value to compare
    UInt08 blue    // B value to compare
    UInt08 alpha   // A value to compare
);
[ public, const ]
Bool Equals(
    UInt08 mono    // RGB value to compare
    UInt08 alpha   // A value to compare
);

Return value

  • If yes: true
  • Otherwise: false

Reference

SFXRGBColor::EqualsRGB | operator== | operator!=


SFXRGBColor::EqualsRGB
Check whether the RGB values of this color equal those of the specified color or not.
[ public, const ]
Bool EqualsRGB(
    SFXRGBColorConstRef param   // color to compare
);
[ public, const ]
Bool EqualsRGB(
    UInt08 red     // R value to compare
    UInt08 green   // G value to compare
    UInt08 blue    // B value to compare
);
[ public, const ]
Bool EqualsRGB(
    UInt08 mono   // RGB value to compare
);

Return value

  • If yes: true
  • Otherwise: false

Reference

SFXRGBColor::Equals


SFXRGBColor::GetAlpha
Get the A value.
[ public, const ]
UInt08 GetAlpha(Void);

Reference

SFXRGBColor::GetBlue | SFXRGBColor::GetGreen | SFXRGBColor::GetRed | SFXRGBColor::SetAlpha


SFXRGBColor::GetBlue
Get the B value.
[ public, const ]
UInt08 GetBlue(Void);

Reference

SFXRGBColor::GetAlpha | SFXRGBColor::GetGreen | SFXRGBColor::GetRed | SFXRGBColor::SetBlue


SFXRGBColor::GetBrightness
Get the brightness of the YCrCb color.
[ public, const ]
UInt08 GetBrightness(Void);

Return value

Return the brightness value between 0x00 and 0xFF. (The brightness value of white color is "0xFF" and the brightness value of black color is "0x00".)

Description

This function returns the Y value (brightness) after converting the RGB color into the YCrCb color.

The mutual color conversion equatiions between the RGB color and the YCrCb color are as follows: (Internally this equations are implemented with integer operations not to deteriorate the performance.)

If the Y value is less than or equals "0x00", return "0x00". If the Y value is more than or equals "0xFF", return "0xFF".

// conversion equation from RGB color into YCrCb color
Y  =  0.29900×R + 0.58700×G + 0.11400×B
Cr =  0.50000×R - 0.41869×G - 0.08131×B
Cb = -0.16874×R - 0.33126×G + 0.50000×B

// conversion equation from YCrCb color into RGB color
R  = Y                 + 1.40200×Cr
G  = Y - 0.34414×Cb - 0.71414×Cr
B  = Y + 1.77200×Cb

SFXRGBColor::GetGreen
Get the G value.
[ public, const ]
UInt08 GetGreen(Void);

Reference

SFXRGBColor::GetAlpha | SFXRGBColor::GetBlue | SFXRGBColor::GetRed | SFXRGBColor::SetGreen


SFXRGBColor::GetRed
Get the R value.
[ public, const ]
UInt08 GetRed(Void);

Reference

SFXRGBColor::GetAlpha | SFXRGBColor::GetBlue | SFXRGBColor::GetGreen | SFXRGBColor::SetRed


SFXRGBColor::Set
Set the RGBA value.
[ public ]
SFXRGBColorRef Set(
    SFXRGBColorConstRef param   // color to set
);
[ public ]
SFXRGBColorRef Set(
    UInt08 red     // R value
    UInt08 green   // G value
    UInt08 blue    // B value
    UInt08 alpha   // A value
);
[ public ]
SFXRGBColorRef Set(
    UInt08 mono    // RGB value
    UInt08 alpha   // A value
);
[ public ]
SFXRGBColorRef Set(
    RGBVAL rgbval   // color of RGBVAL type to set
);

Reference

SFXRGBColor::SFXRGBColor | SFXRGBColor::GetAlpha | SFXRGBColor::GetBlue | SFXRGBColor::GetGreen | SFXRGBColor::GetRed | SFXRGBColor::SetAlpha | SFXRGBColor::SetBlue | SFXRGBColor::SetGreen | SFXRGBColor::SetRed | SFXRGBColor::SetRGB | SFXRGBColor::operator=


SFXRGBColor::SetAlpha
Set the A value.
[ public ]
SFXRGBColorRef SetAlpha(
    UInt08 param   // A value
);

Reference

SFXRGBColor::GetAlpha | SFXRGBColor::Set | SFXRGBColor::SetBlue | SFXRGBColor::SetGreen | SFXRGBColor::SetRed | SFXRGBColor::SetRGB


SFXRGBColor::SetBlue
Set the B value.
[ public ]
SFXRGBColorRef SetBlue(
    UInt08 param   // B value
);

Reference

SFXRGBColor::GetBlue | SFXRGBColor::Set | SFXRGBColor::SetAlpha | SFXRGBColor::SetGreen | SFXRGBColor::SetRed | SFXRGBColor::SetRGB


SFXRGBColor::SetGreen
Set the G value.
[ public ]
SFXRGBColorRef SetGreen(
    UInt08 param   // G value
);

Reference

SFXRGBColor::GetGreen | SFXRGBColor::Set | SFXRGBColor::SetAlpha | SFXRGBColor::SetBlue | SFXRGBColor::SetRed | SFXRGBColor::SetRGB


SFXRGBColor::SetRGB
Set the RGB value.
[ public ]
SFXRGBColorRef SetRGB(
    UInt08 red     // R value
    UInt08 green   // G value
    UInt08 blue    // B value
);
[ public ]
SFXRGBColorRef SetRGB(
    UInt08 mono   // RGB value
);

Reference

SFXRGBColor::SFXRGBColor | SFXRGBColor::GetBlue | SFXRGBColor::GetGreen | SFXRGBColor::GetRed | SFXRGBColor::Set | SFXRGBColor::SetAlpha


SFXRGBColor::SetRed
Set the R value.
[ public ]
SFXRGBColorRef SetRed(
    UInt08 param   // R value
);

Reference

SFXRGBColor::GetRed | SFXRGBColor::Set | SFXRGBColor::SetAlpha | SFXRGBColor::SetBlue | SFXRGBColor::SetGreen | SFXRGBColor::SetRGB


SFXRGBColor::Sub
Subtract the specified value from the RGBA value.
[ public ]
SFXRGBColorRef Sub(
    SFXRGBColorConstRef param   // value to subtract from the color
);
[ public ]
SFXRGBColorRef Sub(
    UInt08 red     // value to subtract from the R value
    UInt08 green   // value to subtract from the G value
    UInt08 blue    // value to subtract from the B value
    UInt08 alpha   // A value to subtract
);
[ public ]
SFXRGBColorRef Sub(
    UInt08 mono    // value to subtract from the RGB value
    UInt08 alpha   // A value to subtract
);

Reference

SFXRGBColor::SubAlpha | SFXRGBColor::SubRGB | operator-


SFXRGBColor::SubAlpha
Subtract the specified value from the A value.
[ public ]
SFXRGBColorRef SubAlpha(
    UInt08 param   // A value to subtract
);

Reference

SFXRGBColor::Sub | SFXRGBColor::SubBlue | SFXRGBColor::SubGreen | SFXRGBColor::SubRed | SFXRGBColor::SubRGB


SFXRGBColor::SubBlue
Subtract the specified value from the B value.
[ public ]
SFXRGBColorRef SubBlue(
    UInt08 param   // value to subtract from the B value
);

Reference

SFXRGBColor::AddBlue | SFXRGBColor::Sub | SFXRGBColor::SubAlpha | SFXRGBColor::SubGreen | SFXRGBColor::SubRed | SFXRGBColor::SubRGB


SFXRGBColor::SubGreen
Subtract the specified value from the G value.
[ public ]
SFXRGBColorRef SubGreen(
    UInt08 param   // value to subtract from the G value
);

Reference

SFXRGBColor::AddGreen | SFXRGBColor::Sub | SFXRGBColor::SubAlpha | SFXRGBColor::SubBlue | SFXRGBColor::SubRed | SFXRGBColor::SubRGB


SFXRGBColor::SubRGB
Subtract the specified value from the RGB value.
[ public ]
SFXRGBColorRef SubRGB(
    UInt08 red     // value to subtract from the R value
    UInt08 green   // value to subtract from the G value
    UInt08 blue    // value to subtract from the B value
);
[ public ]
SFXRGBColorRef SubRGB(
    UInt08 mono   // value to subtract from the RGB value
);

Reference

SFXRGBColor::Sub | SFXRGBColor::SubAlpha | SFXRGBColor::SubBlue | SFXRGBColor::SubGreen | SFXRGBColor::SubRed


SFXRGBColor::SubRed
Subtract the specified value from the R value.
[ public ]
SFXRGBColorRef SubRed(
    UInt08 param   // value to subtract from the R value
);

Reference

SFXRGBColor::AddRed | SFXRGBColor::Sub | SFXRGBColor::SubAlpha | SFXRGBColor::SubBlue | SFXRGBColor::SubGreen | SFXRGBColor::SubRGB


SFXRGBColor::ZeroInstance
Get the instance that represents 0.
[ public, static ]
SFXRGBColorConstRef ZeroInstance(Void);

Description

This function returns the 0 instance, which means that 0 or null is set to all the member variables of its corresponding AtomRec struct.

Reference

SFXRGBColor::AtomRec


atomic_cast
Convert SFXRGBColor into SFXRGBColor::AtomRec.
[ public, friend ]
SFXRGBColor::AtomRec * atomic_cast(
    SFXRGBColor * param   // RGB color to cast
);
[ public, friend ]
SFXRGBColor::AtomRec const * atomic_cast(
    SFXRGBColor const * param   // RGB color to cast
);

Reference

SFXRGBColor::AtomRec


SFXRGBColor::operator=
Assign a RGBA value.
[ public ]
SFXRGBColorRef operator=(
    SFXRGBColorConstRef param   // color to set
);

Reference

SFXRGBColor::Set


operator==
Check the "==" relation.
[ public, friend ]
Bool operator==(
    SFXRGBColorConstRef left    // color to compare
    SFXRGBColorConstRef right   // color to compare
);

Return value

  • If yes: true
  • Otherwise: false

Reference

SFXRGBColor::Equals | operator!=


SFXRGBColor::operator-=
Subtract the specified value from the RGBA value
[ public ]
SFXRGBColorRef operator-=(
    SFXRGBColorConstRef param   // value to subtract from the color
);

Reference

SFXRGBColor::Sub


operator-
Subtract the specified value from the RGBA value
[ public, friend ]
SFXRGBColor operator-(
    SFXRGBColorConstRef left    // color to be subtracted from
    SFXRGBColorConstRef right   // value to subtract from the color
);

Reference

SFXRGBColor::Sub


operator!=
Check the "!=" relation.
[ public, friend ]
Bool operator!=(
    SFXRGBColorConstRef left    // color to compare
    SFXRGBColorConstRef right   // color to compare
);

Return value

  • Not identical: true
  • Identical: false

Reference

SFXRGBColor::Equals | operator==


SFXRGBColor::operator+=
Add the specified value to the RGBA value.
[ public, inline to add ]
SFXRGBColorRef operator+=(
    SFXRGBColorConstRef param   // color to add
);

Reference

SFXRGBColor::Add


operator+
Add the specified value to the RGBA value.
[ public, friend to add ]
SFXRGBColor operator+(
    SFXRGBColorConstRef left    // color to be added
    SFXRGBColorConstRef right   // value to add to the color
);

Reference

SFXRGBColor::Add


SFXRGBColor::AtomRec
Structure that represents a RGBA color.
struct AtomRec {
    UInt08                      alpha;  // A value
    UInt08                      red;    // R value
    UInt08                      green;  // G value
    UInt08                      blue;   // B value
};