本文整理汇总了C++中CFbsBitGc::SetUnderlineStyle方法的典型用法代码示例。如果您正苦于以下问题:C++ CFbsBitGc::SetUnderlineStyle方法的具体用法?C++ CFbsBitGc::SetUnderlineStyle怎么用?C++ CFbsBitGc::SetUnderlineStyle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFbsBitGc
的用法示例。
在下文中一共展示了CFbsBitGc::SetUnderlineStyle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreatePopupBitmapL
// ---------------------------------------------------------------------------
// CAknDiscreetPopupDrawer::CreatePopupBitmap
// ---------------------------------------------------------------------------
//
void CAknDiscreetPopupDrawer::CreatePopupBitmapL( const TRect& aRect )
{
delete iPopupBitmap;
iPopupBitmap = NULL;
// create a bitmap to draw to
CFbsBitmap* bitmap = new ( ELeave ) CFbsBitmap;
CleanupStack::PushL( bitmap );
bitmap->Create(
aRect.Size(), CCoeEnv::Static()->ScreenDevice()->DisplayMode() );
CFbsBitGc* fbsBitGc = CFbsBitGc::NewL();
CleanupStack::PushL( fbsBitGc );
CFbsBitmapDevice* bmpDevice = CFbsBitmapDevice::NewL( bitmap );
CleanupStack::PushL( bmpDevice );
fbsBitGc->Activate( bmpDevice );
// draw background of the popup
MAknsSkinInstance* skin = AknsUtils::SkinInstance();
AknsDrawUtils::DrawFrame( skin, *fbsBitGc, aRect, aRect,
KAknsIIDQsnFrPopupPreview, KAknsIIDDefault, KAknsDrawParamDefault );
// Draw the texts
TRgb textColor( EikonEnv()->ControlColor( EColorControlText, *iControl ) );
if ( iAction )
{
fbsBitGc->SetUnderlineStyle( EUnderlineOn );
AknsUtils::GetCachedColor( skin,
textColor,
KAknsIIDQsnHighlightColors,
EAknsCIQsnHighlightColorsCG3 );
}
else
{
AknsUtils::GetCachedColor( skin,
textColor,
KAknsIIDQsnTextColors,
EAknsCIQsnTextColorsCG55 );
}
fbsBitGc->SetPenColor( textColor );
DrawTexts( fbsBitGc );
fbsBitGc->SetUnderlineStyle( EUnderlineOff );
// draw the icon
if ( iIcon && iIcon->Bitmap() && iIcon->Mask() )
{
fbsBitGc->BitBltMasked( iIconRect.iTl,
iIcon->Bitmap(),
iIcon->Bitmap()->SizeInPixels(),
iIcon->Mask(),
EFalse );
}
else if( iIcon && iIcon->Bitmap() )
{
fbsBitGc->BitBlt( iIconRect.iTl, iIcon->Bitmap() );
}
CleanupStack::PopAndDestroy( bmpDevice );
CleanupStack::PopAndDestroy( fbsBitGc );
CleanupStack::Pop( bitmap );
iPopupBitmap = bitmap;
}