本文整理汇总了C++中TRgb::Internal方法的典型用法代码示例。如果您正苦于以下问题:C++ TRgb::Internal方法的具体用法?C++ TRgb::Internal怎么用?C++ TRgb::Internal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TRgb
的用法示例。
在下文中一共展示了TRgb::Internal方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch
// ---------------------------------------------------------------------------
// Convert device-independent color to device-dependent color.
// ---------------------------------------------------------------------------
//
TInt CPeninputPenTraceDecorator::Rgb2DeviceColor( TDisplayMode aDisplayMode, const TRgb& aColor )
{
switch( aDisplayMode )
{
case EGray2:
{
return aColor.Gray2();
}
case EGray4:
{
return aColor.Gray4();
}
case EGray16:
{
return aColor.Gray16();
}
case EGray256:
{
return aColor.Gray256();
}
case EColor16:
{
return aColor.Color16();
}
case EColor256:
{
return aColor.Color256();
}
case EColor64K:
{
return aColor.Color64K();
}
case EColor16M:
{
return aColor.Color16M();
}
case EColor4K:
{
return aColor.Color4K();
}
case EColor16MU:
{
return aColor.Color16MU();
}
case EColor16MA:
{
return aColor.Color16MA();
}
case EColor16MAP:
{
return aColor.Color16MAP();
}
default:
return aColor.Internal();
}
}
示例2: RgbLighterColor
EXPORT_C TRgb ColorUtils::RgbLighterColor(TRgb aRgb, TDisplayMode aMode)
/** Creates a lighter colour.
@param aRgb The Rgb colour.
@param aMode The display mode, which indicates the screen output of the colour
e.g. 256 colour display mode (8 bpp).
@return The lighter colour. */
{
switch (aMode)
{
case EColor256:
return TRgb::Color256(color256lightlutab[aRgb.Color256()]);
default:
TInt value = aRgb.Internal();
TInt b = Min( 255, ((value & 0x000000ff) ) + KLightRgbAdder );
TInt g = Min( 255, ((value & 0x0000ff00) >> 8) + KLightRgbAdder );
TInt r = Min( 255, ((value & 0x00ff0000) >> 16) + KLightRgbAdder );
return TRgb(r,g,b,aRgb.Alpha());
}
}
示例3: RgbDarkerColor
EXPORT_C TRgb ColorUtils::RgbDarkerColor(TRgb aRgb, TDisplayMode aMode)
/** Creates a darker color.
@param aRgb The RGB color.
@param aMode The display mode, which indicates the screen output of the colour
e.g. 256 colour display mode (8 bpp).
@return The darker colour. */
{
switch (aMode)
{
case EColor256:
return TRgb::Color256(color256darklutab[aRgb.Color256()]);
default:
TInt value = aRgb.Internal();
TInt b = Max( 0, ((value & 0x000000ff) ) - KDarkRgbSubtractor );
TInt g = Max( 0, ((value & 0x0000ff00) >> 8) - KDarkRgbSubtractor );
TInt r = Max( 0, ((value & 0x00ff0000) >> 16) - KDarkRgbSubtractor );
return TRgb(r,g,b,aRgb.Alpha());
}
}
示例4: ChangeBgColor
EXPORT_C void CSDL::ChangeBgColor(TRgb& aColor)
{
const TUint32 oldColor = gEpocEnv->iColor;
gEpocEnv->iColor = aColor.Internal();
aColor = TRgb(oldColor, 0xFF);
}