本文整理汇总了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;
}
示例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() */
示例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);
}
}
示例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 );
}
}
示例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 );
}
示例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;
}
示例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");
}
示例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);
}
}
示例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 );
}
}
示例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;
}
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}
示例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
}