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


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

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


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

示例1: Draw

//////////////////////////////////////////////////////////////////////////
//From CControl
//////////////////////////////////////////////////////////////////////////
void CSelectGroup::Draw(CGraphic& gc)const
{
    TInt index=0;
    for(TInt i=0; i<iMaxLinePerPage; i++)
    {
        index=i+iFirstIndex;
        if(index>=iSelectArray.Count())
            break;

        if(index==iSelectedIndex)
        {
            TRect rect(iStartPoint+TPoint(0,i*iLineHeight),iItemSize);
            gc.SetPenColor(KPopMenuRectColor);
            gc.SetPenStyle(CGraphicsContext::ESolidPen);
            gc.SetBrushColor(KNaviPaneSelectedItemColor);
            gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
            gc.DrawRect(rect);

            gc.SetBrushStyle(CGraphicsContext::ENullBrush);
            gc.SetPenColor(KRgbWhite);
        }
        iSelectArray[index]->DrawItem(gc,TRect(iStartPoint+TPoint(0,i*iLineHeight),iItemSize));
    }
    if(iScrollbar)
        iScrollbar->Draw(gc);
}
开发者ID:flaithbheartaigh,项目名称:wapbrowser,代码行数:29,代码来源:SelectGroup.cpp

示例2: Draw

void CCurThreeListBoxItem::Draw(CGraphic& aGraphic,TPoint& aPoint) const
{
	TPoint point = aPoint;

	ASSERT(iSlideText);
	TRect rect;
	if(iActive)
	{
		TSize size = iItemSize;
		size.iHeight *= 3;
		rect = size;
		rect.Move(point);

		aGraphic.SetPenColor(KTextColor);
		aGraphic.SetPenStyle(CGraphicsContext::ESolidPen);
		aGraphic.SetBrushColor(KListSelectedColor);
		aGraphic.SetBrushStyle(CGraphicsContext::ESolidBrush);
		aGraphic.DrawRect(rect);
		aGraphic.SetBrushStyle(CGraphicsContext::ENullBrush);
	}
	if(iIcon)
	{
		ASSERT(iIconMask);
		aGraphic.BitBltMasked(point,iIcon,iIconMask);
	}
	rect = iItemSize;
	if(iIcon)
	{
		rect.iTl.iX += iIcon->SizeInPixels().iWidth;
	}
	rect.Move(point);
	iSlideText->SetClientRect(rect);
	iSlideText->Draw(aGraphic);

	if(iActive)
	{	
		aGraphic.SetPenColor(iTextColor);
		rect.Move(0,iItemSize.iHeight);
		if(iSecondText)
		{
			aGraphic.DrawText(*iSecondText,rect);
		}
		rect.Move(0,iItemSize.iHeight);
		if(iThirdText)
		{
			aGraphic.DrawText(*iThirdText,rect);
		}

		aPoint.iY += iItemSize.iHeight*3;
	}
	else
	{
		aPoint.iY += iItemSize.iHeight;
	}
}
开发者ID:flaithbheartaigh,项目名称:wapbrowser,代码行数:55,代码来源:ListBoxItem.cpp

示例3: 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);	
			}
		}
	}

}
开发者ID:flaithbheartaigh,项目名称:wapbrowser,代码行数:33,代码来源:GradeDialog.cpp

示例4: 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);
}
开发者ID:flaithbheartaigh,项目名称:wapbrowser,代码行数:54,代码来源:ContentInfoDialog.cpp

示例5: 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);
}
开发者ID:flaithbheartaigh,项目名称:wapbrowser,代码行数:20,代码来源:InputDialog.cpp

示例6: 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);
}
开发者ID:flaithbheartaigh,项目名称:wapbrowser,代码行数:36,代码来源:Window.cpp

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


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