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


C++ CWindowGc::BitBlt方法代码示例

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


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

示例1: DrawAliens

void CSpaceInvadersAppView::DrawAliens(CWindowGc& aGc) const
{
    for ( TInt i = 0 ; i < iTotalAliens ; i++ )
    {
        if ( iAlienArray[i] )
        {

            TPoint shipPoint(iAlienArray[i]->X(), iAlienArray[i]->Y());
            CFbsBitmap* iBitmapShip;

            if ( i < 6 )
            {
                iBitmapShip = iBitmapAlien1;
            }
            else if ( i < 12 )
            {
                iBitmapShip = iBitmapAlien2;
            }
            else
            {
                iBitmapShip = iBitmapAlien3;
            }
            aGc.BitBlt( shipPoint, iBitmapShip );

            if ( iAlienArray[i]->HasFired() )
            {
                TPoint shotPoint(iAlienArray[i]->Shot()->X(),
                                 iAlienArray[i]->Shot()->Y());
                aGc.BitBlt( shotPoint, iBitmapShot );
            }

        }
    }
}
开发者ID:Watkinsong,项目名称:s6ace_invaders,代码行数:34,代码来源:SpaceInvadersAppView.cpp

示例2: DrawShip

void CSpaceInvadersAppView::DrawShip(CWindowGc& aGc) const
{
    // Draw the image in the desired position
    TPoint shipPoint(iShip->X(), iShip->Y());
    aGc.BitBlt( shipPoint, iBitmapShip);

    if ( iShip->HasFired() )
    {
        TPoint shotPoint(iShip->Shot()->X(), iShip->Shot()->Y());
        aGc.BitBlt( shotPoint, iBitmapShot );
    }
}
开发者ID:Watkinsong,项目名称:s6ace_invaders,代码行数:12,代码来源:SpaceInvadersAppView.cpp

示例3: DrawIconL

static void DrawIconL(CWindowGc& aGc, CGulIcon& aIcon, const TJuikLayoutItem& aL, TBool aDoCenter=ETrue) 
{
	CALLSTACKITEMSTATIC_N(_CL(""), _CL("DrawIconL"));
	CFbsBitmap* bmp = aIcon.Bitmap();
	CFbsBitmap* mask = aIcon.Mask();
	
	aGc.SetBrushStyle(CGraphicsContext::ENullBrush);
	// center 
	TInt bmpW = bmp->SizeInPixels().iWidth;
	TInt areaW = aL.Size().iWidth;
	
	TInt dx = 0;
	TInt dy = 0;
	if ( aDoCenter && bmpW < areaW )
		{
			dx = (areaW - bmpW) / 2;
		}


	TPoint tl = aL.TopLeft();
	tl += TPoint(dx,dy);
	TRect r(TPoint(0,0), bmp->SizeInPixels());
 	if ( mask )
 		{
 			aGc.BitBltMasked( tl, bmp, r, mask, ETrue);
 		}
 	else
 		{
			aGc.BitBlt( tl, bmp, r);
  		}
}
开发者ID:flaithbheartaigh,项目名称:jaikuengine-mobile-client,代码行数:31,代码来源:cwu_welcomeviews.cpp

示例4: DrawIcon

/**
 * Draws the icon for the item to the graphics context aGc, in the middle of the rectangle aRect
 */
EXPORT_C void LafMenuPaneItem::DrawIcon(const MLafEnv& /*aLafEnv*/, const CCoeControl& /*aMenuPane*/, CWindowGc& aGc, const TRect& aRect, const CGulIcon* aIcon, SLafMenuPane::THighlightType aHighlightType)
	{
	if (aIcon)
		{
		if (aHighlightType == SLafMenuPane::EDrawHighlight)
			aGc.SetBrushStyle(CGraphicsContext::ENullBrush);

		// Determine the rect available for the bitmap
		TRect rect = aRect;
		// put the image in the middle of available rect
		const CFbsBitmap* bitmap = aIcon->Bitmap();
		const TSize bmpSize(bitmap->SizeInPixels());
		const TSize rectSize(aRect.Size());
		const TPoint offset(((rectSize.iWidth - bmpSize.iWidth) / 2), ((rectSize.iHeight - bmpSize.iHeight) / 2));
		const CFbsBitmap* mask = aIcon->Mask();
		if (mask)
			{
			const TRect bmpRect(0, 0, bmpSize.iWidth, bmpSize.iHeight);
			aGc.BitBltMasked(rect.iTl+offset, bitmap, bmpRect, mask, ETrue);
			}
		else
			aGc.BitBlt(rect.iTl+offset, bitmap);
		if (aHighlightType == SLafMenuPane::EDrawHighlight)
			aGc.SetBrushStyle(CGraphicsContext::ESolidBrush);
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:29,代码来源:LAFMENUP.CPP

示例5: Draw

//Background drawing function
void CTestRectGc::Draw(CWindowGc& aGc, const CCoeControl& aControl, const TRect& aRect) const
	{		
		if (iBmpBackground) 
		{
						
			TPoint a = PositionRelativeToScreen();
			TPoint b = aControl.PositionRelativeToScreen();

			//The source rect of the background is the relationship between this control and the control being drawn (child)
			//plus the subrect (aRect) to be drawn.
			TRect SourceRect(b-a+aRect.iTl, aRect.Size());

			aGc.SetDrawMode(CGraphicsContext::EDrawModePEN);
			aGc.BitBlt(aRect.iTl, iBmpBackground, SourceRect);			
			aGc.SetDrawMode(CGraphicsContext::EDrawModePEN);
		}
		else
		{
			TRect rc;
			aGc.SetClippingRect(aRect);
			aGc.SetBrushStyle(CGraphicsContext::ESolidBrush);
    		aGc.SetBrushColor(iBrushColor);
    		aGc.SetBrushStyle(iBrushStyle);
			aGc.DrawRect(rc);
			aGc.CancelClippingRect();

		}		
	}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:29,代码来源:TConeInvalidate.cpp

示例6: Draw

void CCustomControlScroll::Draw(CWindowGc& gc)
	{
	TInt x, y;
	//上图标
	x = iDisplayPoint.iX;
	y = iDisplayPoint.iY;
	if (iBitmapDirection[0])
		gc.BitBlt(TPoint(x, y), iBitmapDirection[0]);
	//下图标
	y += iDisplaySize.iHeight-iBitmapHeight;
	if (iBitmapDirection[1])
		gc.BitBlt(TPoint(x, y), iBitmapDirection[1]);
	//滚动条
	y = iDisplayPoint.iY+iScrollerPosY;
	if (iBitmapScroller)
		gc.BitBlt(TPoint(x, y), iBitmapScroller);
	}
开发者ID:flaithbheartaigh,项目名称:lemonplayer,代码行数:17,代码来源:CustomControlScroll.cpp

示例7: DrawImage

void CRhodesAppView::DrawImage(CWindowGc& aGc,   
    const TRect& aRect) const   
    {   
    TSize bmpSizeInPixels( iBitmap->SizeInPixels() );   
    TInt xDelta = (aRect.Width() - bmpSizeInPixels.iWidth) / 2;   
    TInt yDelta = (aRect.Height() - bmpSizeInPixels.iHeight) / 2;   
    TPoint pos( xDelta, yDelta ); // displacement vector   
    pos += aRect.iTl; // bitmap top left corner position   
   
    // Drawing viewfinder image to bitmap   
    iFbsBitGc->BitBlt( pos, iBitmap, TRect( TPoint( 0, 0 ), bmpSizeInPixels ));   
   
    // Draws bitmap with indicators on the screen   
    TSize size( iOffScreenBitmap->SizeInPixels() );   
    aGc.BitBlt( TPoint(0,0), iOffScreenBitmap, TRect( TPoint(0,0), size ) );   
    }
开发者ID:3runo5ouza,项目名称:rhodes,代码行数:16,代码来源:rhodesAppView.cpp

示例8: BlitTo

void CSurface::BlitTo(CWindowGc& aDest, TInt aX, TInt aY)
{
   aDest.BitBlt(TPoint(aX,aY), iBitmap);
   return;
}
开发者ID:FlavioFalcao,项目名称:Wayfinder-CppCore-v2,代码行数:5,代码来源:Surface.cpp


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