当前位置: 首页>>代码示例>>C++>>正文


C++ CGraphic::BitBltMasked方法代码示例

本文整理汇总了C++中CGraphic::BitBltMasked方法的典型用法代码示例。如果您正苦于以下问题:C++ CGraphic::BitBltMasked方法的具体用法?C++ CGraphic::BitBltMasked怎么用?C++ CGraphic::BitBltMasked使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CGraphic的用法示例。


在下文中一共展示了CGraphic::BitBltMasked方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Draw

void CNormalListBoxItem::Draw(CGraphic& aGraphic,TPoint& aPoint) const
{
	UtilityTools::WriteLogsL(_L("CNormalListBoxItem::Draw"));
	ASSERT(iSlideText);
	TRect rect(iItemSize);
	rect.Move(aPoint);
	if(iActive)
	{
		aGraphic.SetPenColor(KTextColor);
		aGraphic.SetPenStyle(CGraphicsContext::ESolidPen);
		aGraphic.SetBrushColor(KListSelectedColor);
		aGraphic.SetBrushStyle(CGraphicsContext::ESolidBrush);
		aGraphic.DrawRect(rect);
		aGraphic.SetBrushStyle(CGraphicsContext::ENullBrush);
	}
	if(iIcon)
	{
		rect.iTl.iX += iIcon->SizeInPixels().iWidth;
	}
	if(iIcon)
	{
		ASSERT(iIconMask);
		aGraphic.BitBltMasked(aPoint,iIcon,iIconMask);
	}
	iSlideText->SetClientRect(rect);
	iSlideText->Draw(aGraphic);

	aPoint.iY += iItemSize.iHeight;
	UtilityTools::WriteLogsL(_L("CNormalListBoxItem::Draw End"));
}
开发者ID:flaithbheartaigh,项目名称:wapbrowser,代码行数:30,代码来源:ListBoxItem.cpp

示例2: 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)
开发者ID:flaithbheartaigh,项目名称:wapbrowser,代码行数:85,代码来源:TitleBar.cpp

示例3: 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;
//.........这里部分代码省略.........
开发者ID:flaithbheartaigh,项目名称:wapbrowser,代码行数:101,代码来源:BrowserMusicWindow.cpp


注:本文中的CGraphic::BitBltMasked方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。