2014/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 RgbColor RgbColor5b::asBgrColor (DataModelAttributes::BitFields fields
    , DataModelAttributes::ChannelOrder fmt) const
{
    Data8 red, green, blue, alpha;
    if (fields == DataModelAttributes::k5551) {
        green = (Data8) ((packed >> 5) & RgbModelAttributes::kLowMask);
        alpha = (Data8) ((packed & RgbModelAttributes::kAlphaMask) >> 15);
        if (fmt == DataModelAttributes::kRedGreenBlueAlpha) {
            red = (Data8) (packed & RgbModelAttributes::kLowMask);
            blue = (Data8) ((packed >> 10) & RgbModelAttributes::kLowMask);
        }
        else  {
            blue = (Data8) (packed & RgbModelAttributes::kLowMask);
            red = (Data8) ((packed >> 10) & RgbModelAttributes::kLowMask);
        }
        red = (Data8) (red * 255 / 31);
        green = (Data8) (green * 255 / 31);
        blue = (Data8) (blue * 255 / 31);
        alpha = (Data8) (alpha * 255);  
    }
    else if (fields == DataModelAttributes::k565) {
        green = (Data8) ((packed & RgbModelAttributes::kMidMask565) >> 5);
        if (fmt == DataModelAttributes::kRedGreenBlueAlpha) {
            red = (Data8) (packed & RgbModelAttributes::kLowMask);
            blue = (Data8) ((packed >> 11) & RgbModelAttributes::kLowMask);
        }
        else  {
            blue = (Data8) (packed & RgbModelAttributes::kLowMask);
            red = (Data8) ((packed >> 11) & RgbModelAttributes::kLowMask);
        }
        red = (Data8) (red * 255 / 31);
        green = (Data8) (green * 255 / 63);
        blue = (Data8) (blue * 255 / 31);
        alpha = 255;
    }
    RgbColor colorRgb(blue,green,red,alpha);
    return colorRgb;
}
inline RgbColor RgbColor5b :: asBgrColor ( DataModelAttributes :: BitFields fields , DataModelAttributes :: ChannelOrder fmt ) const { Data8 red , green , blue , alpha ; if ( fields == DataModelAttributes :: k5551 ) { green = ( Data8 ) ( ( packed >> 5 ) & RgbModelAttributes :: kLowMask ) ; alpha = ( Data8 ) ( ( packed & RgbModelAttributes :: kAlphaMask ) >> 15 ) ; if ( fmt == DataModelAttributes :: kRedGreenBlueAlpha ) { red = ( Data8 ) ( packed & RgbModelAttributes :: kLowMask ) ; blue = ( Data8 ) ( ( packed >> 10 ) & RgbModelAttributes :: kLowMask ) ; } else { blue = ( Data8 ) ( packed & RgbModelAttributes :: kLowMask ) ; red = ( Data8 ) ( ( packed >> 10 ) & RgbModelAttributes :: kLowMask ) ; } red = ( Data8 ) ( red * 255 / 31 ) ; green = ( Data8 ) ( green * 255 / 31 ) ; blue = ( Data8 ) ( blue * 255 / 31 ) ; alpha = ( Data8 ) ( alpha * 255 ) ; } else if ( fields == DataModelAttributes :: k565 ) { green = ( Data8 ) ( ( packed & RgbModelAttributes :: kMidMask565 ) >> 5 ) ; if ( fmt == DataModelAttributes :: kRedGreenBlueAlpha ) { red = ( Data8 ) ( packed & RgbModelAttributes :: kLowMask ) ; blue = ( Data8 ) ( ( packed >> 11 ) & RgbModelAttributes :: kLowMask ) ; } else { blue = ( Data8 ) ( packed & RgbModelAttributes :: kLowMask ) ; red = ( Data8 ) ( ( packed >> 11 ) & RgbModelAttributes :: kLowMask ) ; } red = ( Data8 ) ( red * 255 / 31 ) ; green = ( Data8 ) ( green * 255 / 63 ) ; blue = ( Data8 ) ( blue * 255 / 31 ) ; alpha = 255 ; } RgbColor colorRgb ( blue , green , red , alpha ) ; return colorRgb ; }
<summary>
This inlined method is defined in RgbColor.h.
<summary > This inlined method is defined in RgbColor . h .
// Just one bit
