2011/utils/Atil/Inc/RgbColor.inl
/// <summary>
/// This inlined method is defined in RgbColor.h. <see cref="RgbColor">
/// </summary>
///


This inlined method is defined in RgbColor.h.
This inlined method is defined in RgbColor . h .
inline Data16 RgbColor16i::asGray (DataModelAttributes::ChannelOrder format) const
{
    Data16 gray;
    if (format == DataModelAttributes::kRedGreenBlueAlpha) {
        gray = static_cast<Data16> ( rgba.red * RgbColorFactors::kLuminanceRedFactor
            + rgba.green * RgbColorFactors::kLuminanceGreenFactor
            + rgba.blue  * RgbColorFactors::kLuminanceBlueFactor + 0.5);
    }
    else {
        gray = static_cast<Data16> ( bgra.red * RgbColorFactors::kLuminanceRedFactor
            + bgra.green * RgbColorFactors::kLuminanceGreenFactor
            + bgra.blue  * RgbColorFactors::kLuminanceBlueFactor + 0.5);
    }
    return gray;
}
inline Data16 RgbColor16i :: asGray ( DataModelAttributes :: ChannelOrder format ) const { Data16 gray ; if ( format == DataModelAttributes :: kRedGreenBlueAlpha ) { gray = static_cast < Data16 > ( rgba . red * RgbColorFactors :: kLuminanceRedFactor + rgba . green * RgbColorFactors :: kLuminanceGreenFactor + rgba . blue * RgbColorFactors :: kLuminanceBlueFactor + 0.5 ) ; } else { gray = static_cast < Data16 > ( bgra . red * RgbColorFactors :: kLuminanceRedFactor + bgra . green * RgbColorFactors :: kLuminanceGreenFactor + bgra . blue * RgbColorFactors :: kLuminanceBlueFactor + 0.5 ) ; } return gray ; }
<summary>
This inlined method is defined in RgbColor.h.
<summary > This inlined method is defined in RgbColor . h .