當前位置: 首頁>>代碼示例>>C++>>正文


C++ DrawFrame函數代碼示例

本文整理匯總了C++中DrawFrame函數的典型用法代碼示例。如果您正苦於以下問題:C++ DrawFrame函數的具體用法?C++ DrawFrame怎麽用?C++ DrawFrame使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了DrawFrame函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: while

HRESULT	CAnimationModel::DrawFrame( LPD3DXFRAME	pFrame )
{
	HRESULT	hr	= S_OK;

	LPD3DXMESHCONTAINER	pMeshContainer	= pFrame->pMeshContainer;

	while( NULL != pMeshContainer )
	{
		hr	= DrawMeshContainer( pFrame, pMeshContainer );
		CHECK_FAILED( hr );

		pMeshContainer	= pMeshContainer->pNextMeshContainer;
	}

	if( pFrame->pFrameSibling )
	{
		hr = DrawFrame( pFrame->pFrameSibling );
		CHECK_FAILED( hr );
	}

	if( pFrame->pFrameFirstChild )
	{
		hr	= DrawFrame( pFrame->pFrameFirstChild );
		CHECK_FAILED( hr );
	}

	return hr;
}
開發者ID:serialkk,項目名稱:sexyspike3,代碼行數:28,代碼來源:_AnimationModel.cpp

示例2: tdDraw3DCrease

/****************************************************************
 *  VOID WINAPI tdDraw3DCrease( HDC hDC, LPRECT lprc, UINT uiFlags )
 *
 *  Description:
 *
 *
 *
 *  Comments:
 *
 ****************************************************************/
VOID WINAPI tdDraw3DCrease( HDC hDC, LPRECT lpRect, UINT uiFlags )
{
   RECT       rc ;
   COLORREF   rgbOld ;

   rc = *lpRect ;

   if (uiFlags & DRAW3D_OUT)
	  OffsetRect( &rc, 1, 1 ) ;

   rgbOld = SetBkColor( hDC, tdGetShadowColor( GetBkColor( hDC ) ) ) ;

   DrawFrame( hDC, &rc ) ;

   if (uiFlags & DRAW3D_OUT)
	  OffsetRect( &rc, -1, -1 ) ;
   else
	  OffsetRect( &rc, 1, 1 ) ;


   SetBkColor( hDC, tdGetHighlightColor( rgbOld ) ) ;

   DrawFrame( hDC, &rc ) ;

   SetBkColor( hDC, rgbOld ) ;

} /* tdDraw3DCrease()  */
開發者ID:Jinjiego,項目名稱:VCSamples,代碼行數:37,代碼來源:shadow.cpp

示例3: ActivateFrame

static void ActivateFrame (int Num, unsigned char Clear)
/* Activate a new frame, deactivate the old one */
{
    unsigned char y;
    register FrameDesc* F;

    if (ActiveFrame != Num) {

        /* Deactivate the old one */
        if (ActiveFrame >= 0) {
            DrawFrame (Frames [ActiveFrame], 0);
        }

        /* Activate the new one */
        if ((ActiveFrame = Num) >= 0) {
            F = Frames [ActiveFrame];
            /* Clear the frame if requested */
            if (Clear) {
                for (y = F->fd_y1+1; y < F->fd_y2; ++y) {
                    cclearxy (F->fd_x1+1, y, F->fd_width);
                }
            }
            DrawFrame (F, 1);
        }

        /* Redraw the current prompt line */
        DisplayPrompt (ActivePrompt);

    }
}
開發者ID:AntiheroSoftware,項目名稱:cc65,代碼行數:30,代碼來源:dbg.c

示例4: while

void SkinnedMesh::DrawFrame()
{
	LPD3DXMESHCONTAINER pMeshContainer;

	// 조심해!
	// 적당한 위치 찾을 것
	DDRenderer::GetInstance()->GetDevice()->SetTransform( D3DTS_WORLD, &m_Matrix );

	pMeshContainer = m_pFrameRoot->pMeshContainer;
	while ( pMeshContainer != NULL )
	{
		DrawMeshContainer( pMeshContainer, m_pFrameRoot );

		pMeshContainer = pMeshContainer->pNextMeshContainer;
	}

	if ( m_pFrameRoot->pFrameSibling != NULL )
	{
		DrawFrame( m_pFrameRoot->pFrameSibling );
	}

	if ( m_pFrameRoot->pFrameFirstChild != NULL )
	{
		DrawFrame( m_pFrameRoot->pFrameFirstChild );
	}
}
開發者ID:NHNNEXT,項目名稱:2014-01-HUDIGAME-skyLab,代碼行數:26,代碼來源:SkinnedMesh.cpp

示例5: FillRect

void EditView::Paint( const Rect& cUpdateRect )
{
  FillRect( cUpdateRect, get_default_color( COL_NORMAL ) );

  Rect cLargeRect = m_cLargeRect;
  Rect cSmallRect = m_cSmallRect;

  cLargeRect.left   -= 2.0f;
  cLargeRect.top    -= 2.0f;
  cLargeRect.right  += 2.0f;
  cLargeRect.bottom += 2.0f;

  cSmallRect.left   -= 2.0f;
  cSmallRect.top    -= 2.0f;
  cSmallRect.right  += 2.0f;
  cSmallRect.bottom += 2.0f;

  if ( m_bLargeSelected ) {
    DrawFrame( cLargeRect, FRAME_RECESSED | FRAME_TRANSPARENT );
    DrawFrame( cSmallRect, FRAME_RAISED | FRAME_TRANSPARENT );
  } else {
    DrawFrame( cLargeRect, FRAME_RAISED | FRAME_TRANSPARENT );
    DrawFrame( cSmallRect, FRAME_RECESSED | FRAME_TRANSPARENT );
  }
  SetDrawingMode( DM_BLEND );
  if ( m_pcLargeBitmap != NULL ) {
    DrawBitmap( m_pcLargeBitmap, m_pcLargeBitmap->GetBounds(), m_cLargeRect );
  }
  if ( m_pcSmallBitmap != NULL ) {
    DrawBitmap( m_pcSmallBitmap, m_pcSmallBitmap->GetBounds(), m_cSmallRect );
  }
  SetDrawingMode( DM_COPY );
}
開發者ID:rickcaudill,項目名稱:Pyro,代碼行數:33,代碼來源:editview.cpp

示例6: gtk_window_motion_notify_callback

static gint gtk_window_motion_notify_callback( GtkWidget *widget, GdkEventMotion *gdk_event, wxMiniFrame *win )
{
    if (g_isIdle) wxapp_install_idle_handler();

    if (!win->m_hasVMT) return FALSE;
    if (g_blockEventsOnDrag) return TRUE;
    if (g_blockEventsOnScroll) return TRUE;

    if (!win->m_isDragging) return TRUE;

    if (gdk_event->is_hint)
    {
       int x = 0;
       int y = 0;
       GdkModifierType state;
       gdk_window_get_pointer(gdk_event->window, &x, &y, &state);
       gdk_event->x = x;
       gdk_event->y = y;
       gdk_event->state = state;
    }

    DrawFrame( widget, win->m_oldX, win->m_oldY, win->m_width, win->m_height );
    win->m_oldX = (int)gdk_event->x - win->m_diffX;
    win->m_oldY = (int)gdk_event->y - win->m_diffY;
    DrawFrame( widget, win->m_oldX, win->m_oldY, win->m_width, win->m_height );

    return TRUE;
}
開發者ID:vdm113,項目名稱:wxWidgets-ICC-patch,代碼行數:28,代碼來源:minifram.cpp

示例7: plotRhoEtaSlices

void plotRhoEtaSlices(TString str = "RandomConesPF.root", TString tag = "HYDJETMB") {

    gStyle->SetOptStat(0000);
  gStyle->SetOptTitle(0);


  TFile *f = new TFile(str.Data());

  TH3F *fh3RhoCentEtaBin   = dynamic_cast<TH3F*>(f->Get("fh3RhoCentEtaBin"));
  TH3F *fh3RhoMCentEtaBin  = dynamic_cast<TH3F*>(f->Get("fh3RhoMCentEtaBin"));
  
  const int netabins = 7;
  double etaMin[netabins] = {-5.,-3.,-2.1,-1.3,1.3,2.1,3.};
  double etaMax[netabins] = {-3.,-2.1,-1.3,1.3,2.1,3.,5.};

  TH2D *h2RhoCent[netabins];
  TH2D *h2RhoMCent[netabins];
  TH2D *h2RhoJetCent[netabins];
  for(int i = 1; i<=netabins; ++i) {
    fh3RhoCentEtaBin->GetZaxis()->SetRange(i,i);
    h2RhoCent[i-1] = dynamic_cast<TH2D*>(fh3RhoCentEtaBin->Project3D("yx"));
    h2RhoCent[i-1]->SetName(Form("hRhoCentEta%d",i));
    h2RhoCent[i-1]->SetTitle(Form("hRhoCentEta%d",i));

    fh3RhoMCentEtaBin->GetZaxis()->SetRange(i,i);
    h2RhoMCent[i-1] = dynamic_cast<TH2D*>(fh3RhoMCentEtaBin->Project3D("yx"));
    h2RhoMCent[i-1]->SetName(Form("hRhoMCentEta%d",i));
    h2RhoMCent[i-1]->SetTitle(Form("hRhoMCentEta%d",i));
  }

  TCanvas *c1 = new TCanvas("c1","c1: rho",900,840);
  c1->Divide(3,3);
  for(int i = 1; i<=netabins; ++i) {
    c1->cd(i);
    TH1F *fr1 = DrawFrame(0.,100.,0.,500.,"centrality (%)","#rho GeV/c");
    gPad->SetLogz();
    h2RhoCent[i-1]->Draw("colz same");

    DrawLatex(0.5,0.77,Form("%.1f<#eta<%.1f",etaMin[i-1],etaMax[i-1]));
  }

  c1->SaveAs("RhoCentEtaBins.png");
  
  TCanvas *c2 = new TCanvas("c2","c2: rho_m",900,840);
  c2->Divide(3,3);
  for(int i = 1; i<=netabins; ++i) {
    c2->cd(i);
    TH1F *fr2 = DrawFrame(0.,100.,0.,2.,"centrality (%)","#rho_{m} GeV/c");
    gPad->SetLogz();
    h2RhoMCent[i-1]->Draw("colz same");

    DrawLatex(0.5,0.77,Form("%.1f<#eta<%.1f",etaMin[i-1],etaMax[i-1]));
  }

  c2->SaveAs("RhoMCentEtaBins.png");
  
}
開發者ID:pawannetrakanti,項目名稱:HIJetTools,代碼行數:57,代碼來源:plotRhoEtaSlices.C

示例8: DrawFrame

void RightTabs::FramePaint(Draw& w, const Rect& rr)
{
	Rect r = rr;
	r.right -= cx;
	DrawFrame(w, r, FieldFrameColor());
	DrawFrame(w, r.Deflated(1), SColorPaper);
	if(cursor >= 0) {
		Tab& t = tab[cursor];
		w.DrawRect(r.right - 1, t.y + 1, 1, t.GetHeight() + 1, SColorFace);
	}
}
開發者ID:dreamsxin,項目名稱:ultimatepp,代碼行數:11,代碼來源:Bottom.cpp

示例9: assert

void SkinnedMesh::DrawFrame( LPD3DXFRAME pFrame )
{
	DDCamera* camera = GPlayerManager->GetCamera();
	if ( !camera )
		return;

	D3DXMATRIXA16 matProj = camera->GetMatProj();

	// Set the projection matrix for the vertex shader based skinning method
	if ( FAILED( m_pEffect->SetMatrix( "mViewProj", &matProj ) ) )
	{
		assert( false );
		return;
	}

	// Set Light for vertex shader
	// 조심해!! 
	// 전역 라이트 속성 가져올 것
	D3DXVECTOR4 vLightDir( 0.0f, 1.0f, -1.0f, 0.0f );
	D3DXVec4Normalize( &vLightDir, &vLightDir );
	if ( FAILED( DDRenderer::GetInstance()->GetDevice()->SetVertexShaderConstantF( 1, (float*)&vLightDir, 1 ) ) )
	{
		assert( false );
		return;
	}

	if ( FAILED( m_pEffect->SetVector( "lhtDir", &vLightDir ) ) )
	{
		assert( false );
		return;
	}

	LPD3DXMESHCONTAINER pMeshContainer;

	pMeshContainer = pFrame->pMeshContainer;
	while ( pMeshContainer != NULL )
	{
		DrawMeshContainer( pMeshContainer, pFrame );

		pMeshContainer = pMeshContainer->pNextMeshContainer;
	}

	if ( pFrame->pFrameSibling != NULL )
	{
		DrawFrame( pFrame->pFrameSibling );
	}

	if ( pFrame->pFrameFirstChild != NULL )
	{
		DrawFrame( pFrame->pFrameFirstChild );
	}
}
開發者ID:NHNNEXT,項目名稱:2014-01-HUDIGAME-skyLab,代碼行數:52,代碼來源:SkinnedMesh.cpp

示例10: CX_ASSERT

void cxAndroid::cxAndroidMain()
{
    vm = activity->vm;
    vm->AttachCurrentThread(&env, nullptr);
    CX_ASSERT(env != nullptr, "attach current thread java env error");
    //startup engine
    cxEngine::Startup(false);
    while(!destroyReq){
        if(ProcessInput()){
            break;
        }
        if(animating) {
            DrawFrame();
        }
    }
    //destroy engine
    cxEngine::Destroy();
    //clear core cache
    cxCore::Instance()->Clear();
    DestroyDisplay();
    if(env != nullptr){
        vm->DetachCurrentThread();
        env = NULL;
    }
}
開發者ID:cxuhua,項目名稱:cxengine,代碼行數:25,代碼來源:cxAndroid.cpp

示例11: dc

void CCoolTabCtrl::OnPaint() 
{
	CPaintDC	dc(this);
	CPen	*pOldPen = dc.GetCurrentPen();
	CFont	*pOldFont = dc.SelectObject(&m_font);
	int		nOldBkMode = dc.SetBkMode(TRANSPARENT);
	CPageItem	*pItem;
	POSITION	pos;
	int		nItemIndex = 0;
	
	DrawFrame(&dc);

	for(pos=m_PageList.GetHeadPosition();pos!=NULL;nItemIndex++)
	{
		pItem=(CPageItem*)m_PageList.GetNext(pos);
		if(pItem)
		{
			pItem->Draw(&dc,m_nStyle,(m_nActivePage==nItemIndex)?TRUE:FALSE);
		}

	}
	dc.SetBkMode(nOldBkMode);
	dc.SelectObject(pOldFont);
	dc.SelectObject(pOldPen);
}
開發者ID:JetC,項目名稱:DigitalMap,代碼行數:25,代碼來源:CoolTabCtrl.cpp

示例12: rectInter

//*********************************************************************************
void CBCGPShadowRenderer::Draw (CDC* pDC, CRect rect, UINT index/* = 0*/, BYTE alphaSrc/* = 255*/)
{
    if (128 <= alphaSrc)
    {
        CRect rectInter (rect);

        if (CBCGPToolBarImages::IsRTL ())
        {
            rectInter.left   += m_Params.m_rectSides.left;
            rectInter.right   = rectInter.left + m_Params.m_rectSides.left;
        }
        else
        {
            rectInter.right  -= m_Params.m_rectSides.right;
            rectInter.left    = rectInter.right - m_Params.m_rectSides.right;
        }

        rectInter.bottom -= m_Params.m_rectSides.bottom;
        rectInter.top     = rectInter.bottom - m_Params.m_rectSides.bottom;

        FillInterior (pDC, rectInter, index, alphaSrc);
    }

    DrawFrame (pDC, rect, index, alphaSrc);
}
開發者ID:cugxiangzhenwei,項目名稱:WorkPlatForm,代碼行數:26,代碼來源:BCGPControlRenderer.cpp

示例13: gtk_window_button_release_callback

static gint gtk_window_button_release_callback( GtkWidget *widget, GdkEventButton *gdk_event, wxMiniFrame *win )
{
    if (g_isIdle) wxapp_install_idle_handler();

    if (!win->m_hasVMT) return FALSE;
    if (g_blockEventsOnDrag) return TRUE;
    if (g_blockEventsOnScroll) return TRUE;

    if (!win->m_isDragging) return TRUE;

    win->m_isDragging = false;

    int x = (int)gdk_event->x;
    int y = (int)gdk_event->y;

    DrawFrame( widget, win->m_oldX, win->m_oldY, win->m_width, win->m_height );
    gdk_pointer_ungrab ( (guint32)GDK_CURRENT_TIME );
    int org_x = 0;
    int org_y = 0;
    gdk_window_get_origin( widget->window, &org_x, &org_y );
    x += org_x - win->m_diffX;
    y += org_y - win->m_diffY;
    win->m_x = x;
    win->m_y = y;
    gtk_widget_set_uposition( win->m_widget, x, y );

    return TRUE;
}
開發者ID:vdm113,項目名稱:wxWidgets-ICC-patch,代碼行數:28,代碼來源:minifram.cpp

示例14: TRACE

bool ListPage::Draw()
{
	TRACE("Drawing page\n");
	if (!m_bWidthsCalculated)
		CalcRealColumnWidths();

	TRACE("Got column widths\n");
	DrawFrame(PageRect());
	TRACE("Drawn Frames\n");

	if (m_dwFlags & LF_SHOW_HEADER)
		DrawHeader();
	TRACE("Drawn Header\n");

	DrawVisibleItems();
	TRACE("Drawn Items\n");

	DrawFooterAndScrollBar();
	TRACE("Drawn footer/scroll bar\n");

	TAP_Osd_Copy(m_osdRegionIndex, GetTAPScreenRegion(), 0, 0, m_rcList.w, m_rcList.h, m_rcList.x, m_rcList.y, false);
	TRACE("Copied memory image to screen\n");

	return true;
}
開發者ID:BackupTheBerlios,項目名稱:tap-svn,代碼行數:25,代碼來源:ListPage.cpp

示例15: DrawFrame

void CSkinDialog::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized)
{
	m_bActive = (nState ? TRUE : FALSE);

	if( GetWindowLong(GetSafeHwnd(), GWL_STYLE) & WS_CAPTION )
	{
		if( m_bActive )
		{
			m_hIcon = Global.GetIcon(IDX_ICON_SKIN,ICON24);
			m_cfText = Global.GetRGB(IDX_RGB_FONT_CAPTION);
		}
		else
		{
			m_hIcon = Global.GetIcon(IDX_ICON_SKIN_INACTIVE,ICON24);
			m_cfText = Global.GetRGB(IDX_RGB_FONT_CAPTION_INACTIVE);
		}

		DrawFrame();
	}
	else
	{
		CDialog::OnActivate(nState, pWndOther, bMinimized);
	}

	// TODO: Add your message handler code here
	
}
開發者ID:asdlei00,項目名稱:project-jb,代碼行數:27,代碼來源:SkinDialog.cpp


注:本文中的DrawFrame函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。