本文整理汇总了C++中CGraphic::BitBlt方法的典型用法代码示例。如果您正苦于以下问题:C++ CGraphic::BitBlt方法的具体用法?C++ CGraphic::BitBlt怎么用?C++ CGraphic::BitBlt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGraphic
的用法示例。
在下文中一共展示了CGraphic::BitBlt方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Draw
//////////////////////////////////////////////////////////////////////////
//From CControl
//////////////////////////////////////////////////////////////////////////
void CGradeDialog::Draw(CGraphic& gc)const
{
gc.SetPenColor(TRgb(0,0,0));
gc.SetPenStyle(CBitmapContext::ESolidPen);
gc.SetBrushStyle(CBitmapContext::ENullBrush);
gc.BitBlt(iStartPoint,iDialogBmp);
gc.DrawText(iStartPoint+TPoint(iIconPoint.iX,iScreenLayout.FontHeight()/3),iTitle);
for(TInt i=0;i<5;i++)
{
if(i<iGradeNum/2)
{
iBitmapFactory.DrawGradeBmpByID(gc,iStartPoint+iIconPoint+TPoint((iIconSize.iWidth+iIconPoint.iX)*i,0),0);
}
else
{
if((iGradeNum-i*2)==1)
{
iBitmapFactory.DrawGradeBmpByID(gc,iStartPoint+iIconPoint+TPoint((iIconSize.iWidth+iIconPoint.iX)*i,0),1);
}
else
{
iBitmapFactory.DrawGradeBmpByID(gc,iStartPoint+iIconPoint+TPoint((iIconSize.iWidth+iIconPoint.iX)*i,0),2);
}
}
}
}
示例2: Draw
//////////////////////////////////////////////////////////////////////////
//From CControl
//////////////////////////////////////////////////////////////////////////
void CContentInfoDialog::Draw(CGraphic& gc)const
{
gc.SetPenColor(TRgb(255,255,255));
gc.SetBrushColor(TRgb(64,61,90));
gc.SetPenStyle(CBitmapContext::ESolidPen);
gc.SetBrushStyle(CBitmapContext::ESolidBrush);
gc.DrawRoundRect(iBackRect);
TPoint point=iStartPoint;
if(iBool&&iShowBmp==NULL)
{
gc.DrawRoundRect(TRect(iStartPoint-TPoint(2,2),TSize(iIconSize.iWidth+4,iIconSize.iHeight+4)));
gc.DrawText(iMainEngine.GetDesById(ECoCoTextRes_GetImage),TRect(point,iIconSize),CGraphicsContext::ELeft);
point.iY=point.iY+iIconSize.iHeight;
}
if(iShowBmp)
{
/*TPoint iconPoint(0,0);
TSize iconSize=iIconSize;
if(iSelectIndex<iAllLine)
{
iconPoint.iY=iconPoint.iY+iTextSize.iHeight*iSelectIndex;
iconSize.iHeight=iIconSize.iHeight-iTextSize.iHeight*iSelectIndex;
if(iconPoint.iY>=0&&iconSize.iHeight>0)
gc.BitBlt(point,iShowBmp,TRect(iconPoint,iconSize));
}*/
gc.BitBlt(point,iShowBmp);
point.iY=point.iY+iIconSize.iHeight;
}
TInt index=0;
for(TInt i=0;i<iMaxLine;i++)
{
index=i+iFirstIndex;
if(index>=iDesArray->Count())
break;
gc.DrawText((*iDesArray)[index],TRect(point+TPoint(0,i*iTextSize.iHeight),iTextSize),CGraphicsContext::ELeft);
}
gc.SetBrushStyle(CGraphicsContext::ENullBrush);
if(iScrollbar)
iScrollbar->Draw(gc);
}
示例3: Draw
//////////////////////////////////////////////////////////////////////////
//From CControl
//////////////////////////////////////////////////////////////////////////
void CInputDialog::Draw(CGraphic& gc)const
{
gc.SetPenColor(TRgb(0,0,0));
gc.SetPenStyle(CBitmapContext::ESolidPen);
gc.SetBrushStyle(CBitmapContext::ENullBrush);
gc.BitBlt(iStartPoint,iDialogBmp);
//画标题
gc.DrawText(iStartPoint+TPoint(iMargin,iScreenLayout.FontHeight()/3),*iTitle);
iBitmapFactory.DrawInputIconBmpByID(gc,iStartPoint+iIconPoint,iMainEngine.GetInputType()-1);
//gc.BitBltMasked(iStartPoint+iIconPoint,iInputTypeIcon,iInputTypeIconMask);
//画提示信息
gc.DrawTextWithBlueUnderline(iStartPoint+TPoint(iMargin,(iScreenLayout.FontHeight()+iScreenLayout.FontHeight()/2)*2+iScreenLayout.FontHeight()/3),*iInfo);
}
示例4: DrawButton
void CWindow::DrawButton(CGraphic& aGraphic)const
{
ASSERT(NULL != iControlPaneBmp);
TSize screenSize = UtilityTools::ScreenSize(); //temp code
TSize size = iControlPaneBmp->SizeInPixels();
TPoint point(0,0);
point.iY += screenSize.iHeight;
point.iY -= size.iHeight;
aGraphic.BitBlt(point,iControlPaneBmp);
aGraphic.SetPenColor(KTextColor);
TRect controlPaneRect = iMainEngine.ScreenLayout().GetControlPaneRect();
TInt margin = iMainEngine.ScreenLayout().InnerMargin();
TPtrC leftButtonPtr;
TPtrC rightButtonPtr;
leftButtonPtr.Set(iLeftButtonText);
rightButtonPtr.Set(iRightButtonText);
if(iControlArray.Count() > 0)
{
for(TInt controlIndex = iControlArray.Count() - 1 ; controlIndex >= 0 ; controlIndex--)
{
CControl* lastControl = iControlArray[controlIndex];
if(lastControl->HasButton())
{
leftButtonPtr.Set(lastControl->LeftButton());
rightButtonPtr.Set(lastControl->RightButton());
break;
}
}
}
aGraphic.DrawText(leftButtonPtr,controlPaneRect,CGraphicsContext::ELeft,margin);
aGraphic.DrawText(rightButtonPtr,controlPaneRect,CGraphicsContext::ERight,margin);
}
示例5: DrawBackground
//////////////////////////////////////////////////////////////////////////
//private
//////////////////////////////////////////////////////////////////////////
void CWindow::DrawBackground(CGraphic& aGraphic)const
{
ASSERT(NULL != iBackgroundBmp);
aGraphic.BitBlt(TPoint(0,0),iBackgroundBmp);
}
示例6: Draw
void CTitleBar::Draw(CGraphic& gc)const
{
UtilityTools::WriteLogsL(_L("CTitleBar::Draw"));
//ASSERT(iTitleText);
ASSERT(iTitleBitmap);
ASSERT(iSlideText);
gc.BitBlt(TPoint(),iTitleBitmap);
iSlideText->Draw(gc);
/*
gc.SetPenColor(KNaviPaneBackgroundColor);
gc.SetBrushColor(KNaviPaneBackgroundColor);
gc.SetPenStyle(CBitmapContext::ENullPen);
gc.SetBrushStyle(CBitmapContext::ESolidBrush);
//gc.DrawRect(iRect);
gc.DrawRoundRect(iRect);
gc.SetBrushStyle(CBitmapContext::ENullBrush);
gc.SetPenColor(KBlackRgb);
gc.SetPenStyle(CBitmapContext::ESolidPen);
*/
// if(iTitleText)
{
/*
WriteLogsL(_L("CTitleBar::Draw iFont = %d"),iFont);
TInt fontHeight = iFont->HeightInPixels();
WriteLogsL(_L("CTitleBar::Draw fontHeight = %d"),fontHeight);
WriteLogsL(_L("CTitleBar::Draw iTitleText = %d"),iTitleText);
const TDesC& testDes = *iTitleText;
WriteLogsL(_L("CTitleBar::Draw iTitleText len = %d"),iTitleText->Length());
WriteLogsL(testDes);
WriteLogsL(*iTitleText);
*/
/*
TPoint point = iRect.iTl;
point.iY += iFont->HeightInPixels();
point.iY += (iRect.Height() - iFont->HeightInPixels())/2;
//gc.DrawText(*iTitleText,point);
*/
//gc.DrawText(iRect.iTl,iTitleText);
//WriteLogsL(_L("CTitleBar::Draw End"));
// gc.SetPenColor(KRgbWhite);
// gc.DrawText(iTitleText,iRect,CGraphicsContext::ELeft,iLeftBitmap->SizeInPixels().iWidth);
}
if(iLeftBitmap)
{
TPoint point = iRect.iTl;
point.iY += ((iRect.Height() - iRightBitmap->SizeInPixels().iHeight)>>1);
if(NULL == iRightBitmapMask)
{
gc.BitBlt(point,iRightBitmap);
}
else
{
gc.BitBltMasked(point,iRightBitmap,iRightBitmapMask);
}
}
if(iRightBitmap)
{
TPoint point = iRect.iTl;
TSize size = iRightBitmap->SizeInPixels();
point.iX += iRect.Width();
point.iX -= size.iWidth;
point.iY += ((iRect.Height() - size.iHeight)>>1);
if(NULL == iRightBitmapMask)
{
gc.BitBlt(point,iRightBitmap);
}
else
{
gc.BitBltMasked(point,iRightBitmap,iRightBitmapMask);
}
}
else if(iRightInfoText)
示例7: InitMusicInterface
void CBrowserMusicWindow::InitMusicInterface(CGraphic& aGraphic) const
{
//播放界面
//播放界面主框
TPoint nX;
nX.iX=(iMainEngine.ScreenSize().iWidth-iMusicMainImage->SizeInPixels().iWidth)/2;
nX.iY=iMainEngine.ScreenLayout().GetControlPaneRect().iTl.iY-iMusicMainImage->SizeInPixels().iHeight-2;
aGraphic.BitBlt(nX,iMusicMainImage);
//播放进度条
nX.iY=nX.iY+iMainEngine.ScreenLayout().FontHeight()+iMainEngine.ScreenLayout().FontHeight()/3;
nX.iX=(iMusicMainImage->SizeInPixels().iWidth-iMainEngine.GetBitmapFactory().GetMusicTimeIconBmpSize().iWidth)/2;
iMainEngine.GetBitmapFactory().DrawMusicTimeIconBmpByID(aGraphic,nX,1);
TRect nPlayPercent;
const CFbsBitmap* nMusicPlayPercent = NULL;
const CFbsBitmap* nMusicPlayPercentMask = NULL;
nMusicPlayPercent=iMainEngine.GetBitmapFactory().GetMusicTimeIcon(0);
nMusicPlayPercentMask=iMainEngine.GetBitmapFactory().GetMusicTimeIconMask(0);
nPlayPercent.iTl=TPoint(0,0);
nPlayPercent.iBr.iY=nMusicPlayPercent->SizeInPixels().iHeight;
nPlayPercent.iBr.iX=nMusicPlayPercent->SizeInPixels().iWidth*iPercent/100;
aGraphic.BitBltMasked(nX,nMusicPlayPercent,nMusicPlayPercentMask,nPlayPercent);
/*aGraphic.BitBlt(nX,nMusicPlayPercent,nPlayPercent);*/
//显示播放时间
TPoint nTime;
nTime=nX;
nTime.iX=nTime.iX+iMainEngine.ScreenLayout().FontHeight()/2;
nTime.iY=nTime.iY-iMainEngine.ScreenLayout().FontHeight()*5/4;
aGraphic.SetPenColor(TRgb(255,255,255));
aGraphic.SetPenStyle(CFbsBitGc::ESolidPen);
aGraphic.DrawText(nTime,iCurrentTime);
nTime.iX=nX.iX+iMainEngine.GetBitmapFactory().GetMusicTimeIconBmpSize(0).iWidth-iMainEngine.ScreenLayout().Font()->TextWidthInPixels(iTotalTime)-iMainEngine.ScreenLayout().FontHeight()/2;
aGraphic.DrawText(nTime,iTotalTime);
//播放、上一首、下一首按钮
TPoint nNum;
nX.iY=nX.iY+iMainEngine.ScreenLayout().FontHeight();
iMainEngine.GetBitmapFactory().DrawMusicSelectIconBmpByID(aGraphic,nX,0);
nNum=nX;
nNum.iX=nNum.iX+iMainEngine.GetBitmapFactory().GetMusicSelectIconBmpSize(0).iWidth;
nNum.iY=nNum.iY+iMainEngine.GetBitmapFactory().GetMusicSelectIconBmpSize(0).iHeight/2-2;
aGraphic.DrawText(nNum,_L("4"));
nX.iY=nX.iY-iMainEngine.ScreenLayout().FontHeight()/4;
nX.iX=nX.iX+iMainEngine.GetBitmapFactory().GetMusicSelectIconBmpSize(0).iWidth+iMainEngine.ScreenLayout().FontHeight();
if (iMainEngine.MusicPlayManageEngine().GetIsPlay()==1)
{
iMainEngine.GetBitmapFactory().DrawMusicPlayIconBmpByID(aGraphic,nX,2);
}
else
{
iMainEngine.GetBitmapFactory().DrawMusicPlayIconBmpByID(aGraphic,nX,0);
}
nNum.iX=nX.iX+iMainEngine.GetBitmapFactory().GetMusicPlayIconBmpSize(0).iWidth;
aGraphic.DrawText(nNum,_L("0"));
nX.iY=nX.iY+iMainEngine.ScreenLayout().FontHeight()/4;
nX.iX=nX.iX+iMainEngine.GetBitmapFactory().GetMusicPlayIconBmpSize(0).iWidth+iMainEngine.ScreenLayout().FontHeight();
iMainEngine.GetBitmapFactory().DrawMusicSelectIconBmpByID(aGraphic,nX,2);
nNum.iX=nX.iX+iMainEngine.GetBitmapFactory().GetMusicSelectIconBmpSize(2).iWidth;
aGraphic.DrawText(nNum,_L("6"));
//静音提示
nX.iX=nX.iX+iMainEngine.GetBitmapFactory().GetMusicSelectIconBmpSize(2).iWidth+iMainEngine.ScreenLayout().FontHeight()*2;
nX.iY=nX.iY+iMainEngine.ScreenLayout().FontHeight()/4;
if(iMainEngine.MusicPlayManageEngine().GetIsSlice())
{
iMainEngine.GetBitmapFactory().DrawMusicBugleIconBmpByID(aGraphic,nX,1);
}
else
{
iMainEngine.GetBitmapFactory().DrawMusicBugleIconBmpByID(aGraphic,nX,0);
}
//音量大小
nX.iX=nX.iX+iMainEngine.GetBitmapFactory().GetMusicBugleIconBmpSize(0).iWidth+iMainEngine.ScreenLayout().FontHeight()/2;
nX.iY=nX.iY-iMainEngine.ScreenLayout().FontHeight()/4;
//.........这里部分代码省略.........