本文整理汇总了C++中CElement::Draw方法的典型用法代码示例。如果您正苦于以下问题:C++ CElement::Draw方法的具体用法?C++ CElement::Draw怎么用?C++ CElement::Draw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CElement
的用法示例。
在下文中一共展示了CElement::Draw方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
/*****************************************************************
*
* method :void DrawCurrentPage(CDC *inDC)
*
* parameters : inCDC a device context
*
* returns : nothing
*
* description: Draw the current page
*
*
****************************************************************/
void CEasyReport::DrawCurrentPage(CDC *inDC)
{
int i,aStart, aMax;
CElement *aElem;
if( m_CurPage != 0 )
aStart = m_PageItems[m_CurPage-1];
else
aStart = 0;
aMax = m_PageItems[m_CurPage];
for( i =aStart;i< aMax;i++)
{
aElem = (CElement *)m_ReportItems[i];
aElem->Draw(inDC);
}
/*
CRect aRect(m_LeftMargin, -m_TopMargin,
m_PageWidth - m_RightMargin, -(m_PageHeight-m_BottomMargin));
inDC->MoveTo(aRect.left, aRect.top);
inDC->LineTo(aRect.right,aRect.top);
inDC->LineTo(aRect.right, aRect.bottom);
inDC->LineTo(aRect.left, aRect.bottom);
inDC->LineTo(aRect.left, aRect.top);
*/
}
示例2: Draw
void CCell::Draw(CDC *pDC)
{
POSITION pos;
CElement *pElement;
for(pos=m_Elements.GetHeadPosition();pos!=NULL;){
pElement=(CElement *)(m_Elements.GetNext(pos));
pElement->Draw(pDC);
}
}
示例3: OnDraw
void CSkViewView::OnDraw(CDC* pDC)
{
CSkViewDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
if (!pDoc)
return;
POSITION aPos = pDoc->GetListHeadPosition();
CElement* pElement = 0;
while(aPos)
{
pElement = pDoc->GetNext(aPos);
if(pDC->RectVisible(pElement->GetBoundRect()))
pElement->Draw(pDC);
}
}
示例4: OnDraw
void CSketcherView::OnDraw(CDC* pDC)
{
CSketcherDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
if(!pDoc)
return;
POSITION aPos = pDoc->GetListHeadPosition();
CElement* pElement = 0; // Store for an element pointer
while(aPos) // Loop while aPos is not null
{
pElement = pDoc->GetNext(aPos); // Get the current element pointer
// If the element is visible...
if(pDC->RectVisible(pElement->GetBoundRect()))
pElement->Draw(pDC, m_pSelected);// ...draw it
}
}
示例5: GameMain
void CGame::GameMain()
{
int i;
CShanaProt* player1;
CShanaProt* player2;
m_Mode = m_NextMode ;
switch( m_Mode ){
case 0:
// タイトルのスタート
m_ModeTitle = new(m_CommonMode) CModeTitle( this );
SetMode( 2 );
break;
case 1:
// バトルモードスタート
new(m_CommonMode) CModeBattle( this, m_ModeCharaSel->GetDecideChara( 0 ), m_ModeCharaSel->GetDecideChara( 1 ));
SetMode( 2 );
break;
case 3:
// タイトルモードの削除
if( m_ModeTitle != NULL ){
delete m_ModeTitle;
m_ModeTitle = NULL;
}
if( m_ModeCharaSel != NULL ){
delete m_ModeCharaSel;
m_ModeCharaSel = NULL;
}
SetMode( 2 );
break;
case 4:
//
new(m_CommonMode) CModeBattle( this );
SetMode( 2 );
break;
case 5:
// キャラセレクトのスタート
m_ModeCharaSel = new(m_CommonMode) CModeCharaSelect( this );
if( m_ModeTitle != NULL ){
delete m_ModeTitle;
m_ModeTitle = NULL;
}
SetMode( 2 );
break;
}
m_Input->UpDateState();
CElement* cEle;
CElement* cEleNext;
// MOVE Main
cEle = m_CommonMode->m_ActiveTask->m_Next;
while( cEle->m_Next != m_CommonMode->m_ActiveTask->m_Next ){
cEleNext = cEle->m_Next ;
if( cEle->Move() == FALSE ){
delete cEle;
}
else{
cEle->Action();
cEle->ActionFinalize();
cEle->Interfere();
cEle->InterfereFinalize();
}
cEle = cEleNext ;
}
// Begin the scene.
LPDIRECT3DDEVICE9 d3ddevice;
d3ddevice = m_D3DDraw.GetDevice();
d3ddevice->BeginScene();
// 画面クリア
d3ddevice->Clear(0,NULL,D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER,D3DCOLOR_XRGB(0,0,0),1.0f,0);
/* for( i=0 ; i<4 ; i++ ){
if( m_DispObjGroup->m_CDisp[i].m_Visible == TRUE ){
m_D3DDraw.Draw( &m_DispObjGroup->m_CDisp[i] );
}
}
*/
cEle = m_CommonMode->m_ActiveTask->m_Next;
while( cEle->m_Next != m_CommonMode->m_ActiveTask->m_Next ){
cEleNext = cEle->m_Next ;
cEle->Draw( &m_D3DDraw );
cEle->DrawFinalize();
cEle = cEleNext ;
}
d3ddevice->EndScene();
// CFps::GetCFps()->WaitNextUpdate();
// 画面に表示(バッファスワップ)
//.........这里部分代码省略.........