本文整理汇总了C++中CFbsBitGc::SetClippingRect方法的典型用法代码示例。如果您正苦于以下问题:C++ CFbsBitGc::SetClippingRect方法的具体用法?C++ CFbsBitGc::SetClippingRect怎么用?C++ CFbsBitGc::SetClippingRect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFbsBitGc
的用法示例。
在下文中一共展示了CFbsBitGc::SetClippingRect方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DrawViewFinderErrorL
// ---------------------------------------------------------------------------
// CMMACameraWindow::DrawViewFinderError()
// Draws the error message to specified area.
// Used in cases when viewfinder is unable to start.
// ---------------------------------------------------------------------------
//
void CMMACameraWindow::DrawViewFinderErrorL(
const TInt /*aError*/,
const TRect& aDrawRect)
{
ASSERT(iDirectAccess);
TInt dcError = KErrNone;
if (!iDirectAccess->IsActive())
{
TRAP(dcError, iDirectAccess->StartL());
}
TRect drawRect(aDrawRect);
if (dcError == KErrNone)
{
drawRect.Intersection(iClientRect);
drawRect.Move(-iWindow->AbsPosition());
CFbsBitGc* directGc = iDirectAccess->Gc();
directGc->SetClippingRect(drawRect);
directGc->SetBrushColor(TRgb(128,128,128));
directGc->SetPenColor(TRgb(128,0,0));
directGc->SetBrushStyle(CGraphicsContext::ESolidBrush);
directGc->SetPenStyle(CGraphicsContext::ESolidPen);
directGc->SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha);
directGc->DrawRect(drawRect);
if (!iErrorIconBitmap || !iErrorIconMaskBitmap)
{
if (iErrorIconBitmap)
{
delete iErrorIconBitmap;
iErrorIconBitmap = NULL;
}
if (iErrorIconMaskBitmap)
{
delete iErrorIconMaskBitmap;
iErrorIconMaskBitmap = NULL;
}
/*
AknsUtils::CreateIconL(
AknsUtils::SkinInstance(),
KAknsIIDQgnIndiCam4Camera,
iErrorIconBitmap,
iErrorIconMaskBitmap,
KCameraAppBitmapFile,
EMbmCameraappQgn_indi_cam4_camera,
EMbmCameraappQgn_indi_cam4_camera_mask
);
*/
}
//TRect iconRect
drawRect.iTl.iX += KErrorIconMargin;
drawRect.iTl.iY += KErrorIconMargin;
drawRect.iBr.iX -= KErrorIconMargin;
drawRect.iBr.iY -= KErrorIconMargin;
if (iErrorIconBitmap->SizeInPixels() != drawRect.Size())
{
AknIconUtils::SetSize(iErrorIconBitmap, drawRect.Size());
AknIconUtils::SetSize(iErrorIconMaskBitmap, drawRect.Size());
}
directGc->BitBltMasked(
drawRect.iTl, iErrorIconBitmap,
TRect(iErrorIconBitmap->SizeInPixels()),
iErrorIconMaskBitmap, EFalse);
iDirectAccess->ScreenDevice()->Update();
}
}