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 RgbColor10::asGray (DataModelAttributes::ChannelOrder format) const
{
    Data16 red,green,blue,gray;
    green = (Data16) ((packed >> 10) & 0x03FF);
    if (format == DataModelAttributes::kRedGreenBlueAlpha) {
        red = (Data16) (packed & 0x03FF);
        blue = (Data16) ((packed >> 20) & 0x03FF);
        gray = static_cast<Data16> ( red * RgbColorFactors::kLuminanceRedFactor
            + green * RgbColorFactors::kLuminanceGreenFactor
            + blue  * RgbColorFactors::kLuminanceBlueFactor + 0.5);
    }
    else {
        blue = (Data16) (packed & 0x03FF);
        red = (Data16) ((packed >> 20) & 0x03FF);
        gray = static_cast<Data16> ( red * RgbColorFactors::kLuminanceRedFactor
            + green * RgbColorFactors::kLuminanceGreenFactor
            + blue  * RgbColorFactors::kLuminanceBlueFactor + 0.5);
    }
    return gray;
}
inline Data16 RgbColor10 :: asGray ( DataModelAttributes :: ChannelOrder format ) const { Data16 red , green , blue , gray ; green = ( Data16 ) ( ( packed >> 10 ) & 0x03FF ) ; if ( format == DataModelAttributes :: kRedGreenBlueAlpha ) { red = ( Data16 ) ( packed & 0x03FF ) ; blue = ( Data16 ) ( ( packed >> 20 ) & 0x03FF ) ; gray = static_cast < Data16 > ( red * RgbColorFactors :: kLuminanceRedFactor + green * RgbColorFactors :: kLuminanceGreenFactor + blue * RgbColorFactors :: kLuminanceBlueFactor + 0.5 ) ; } else { blue = ( Data16 ) ( packed & 0x03FF ) ; red = ( Data16 ) ( ( packed >> 20 ) & 0x03FF ) ; gray = static_cast < Data16 > ( red * RgbColorFactors :: kLuminanceRedFactor + green * RgbColorFactors :: kLuminanceGreenFactor + 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 .