本文整理汇总了C++中Pane::GetSize方法的典型用法代码示例。如果您正苦于以下问题:C++ Pane::GetSize方法的具体用法?C++ Pane::GetSize怎么用?C++ Pane::GetSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pane
的用法示例。
在下文中一共展示了Pane::GetSize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PaintAll
////////////////////////////////////////////////////////////////////////////////////////////////////
// PaintAll()
// Paint this panes surface, then paint any children.
// Note: the function ::Paint(), is overloaded by any class derived from Pane.
// Added: pass the clip rect round, as with the others, pass by copy, as this can then be modified
// and passed to child panes.
////////////////////////////////////////////////////////////////////////////////////////////////////
void Pane::PaintAll( Surface * psurface )
{
// Clipping test - TBD: reinstate.
/* if( ( rectClip.XMax() <= rectClip.XMin() ) ||
( rectClip.YMax() <= rectClip.YMin() ) ||
( rectClip.XMax() < 0 ) ||
( rectClip.YMax() < 0 ) )
{
return;
}*/
if( !m_bHidden )
{
Paint( psurface );
for(Pane* ppane = m_pchild; ppane != NULL; ppane = ppane->m_pnext)
{
WinRect rectClipOld = psurface->GetClipRect();
psurface->Offset(ppane->m_offset);
psurface->SetClipRect(WinRect(WinPoint(0, 0), ppane->GetSize()));
D3DVIEWPORT9 newViewport, oldViewport;
CD3DDevice9::Get()->GetViewport( &oldViewport );
WinRect surfClip = psurface->GetClipRect();
WinPoint surfOffset = psurface->GetOffset();
newViewport.X = surfClip.XMin() + surfOffset.X();
newViewport.Y = surfClip.YMin() + surfOffset.Y();
newViewport.Width = surfClip.XMax() - surfClip.XMin();
newViewport.Height = surfClip.YMax() - surfClip.YMin();
newViewport.MinZ = oldViewport.MinZ;
newViewport.MaxZ = oldViewport.MaxZ;
newViewport.X = (int) newViewport.X < 0 ? 0 : newViewport.X;
newViewport.Y = (int) newViewport.Y < 0 ? 0 : newViewport.Y;
newViewport.Width = (int) newViewport.Width < 0 ? 0 : newViewport.Width;
newViewport.Height = (int) newViewport.Height < 0 ? 0 : newViewport.Height;
if( ( newViewport.Width > 0 ) &&
( newViewport.Height > 0 ) )
{
CD3DDevice9::Get()->SetViewport( &newViewport );
ppane->PaintAll( psurface );
}
psurface->Offset(-ppane->m_offset);
psurface->RestoreClipRect(rectClipOld);
if( ( newViewport.Width > 0 ) &&
( newViewport.Height > 0 ) )
{
CD3DDevice9::Get()->SetViewport( &oldViewport );
}
}
m_bNeedPaint = false;
m_bPaintAll = false;
}
}
示例2: PaintAll
void Pane::PaintAll(Surface* psurface)
{
if (!m_bHidden) {
Paint(psurface);
for(Pane* ppane = m_pchild; ppane != NULL; ppane = ppane->m_pnext) {
WinRect rectClipOld = psurface->GetClipRect();
psurface->Offset(ppane->m_offset);
psurface->SetClipRect(WinRect(WinPoint(0, 0), ppane->GetSize()));
ppane->PaintAll(psurface);
psurface->Offset(-ppane->m_offset);
psurface->RestoreClipRect(rectClipOld);
}
m_bNeedPaint = false;
m_bPaintAll = false;
}
}
示例3: InternalPaint
void Pane::InternalPaint(Surface* psurface)
{
if (m_bPaintAll) {
TunnelPaint(psurface, true);
} else if (m_bNeedPaint) {
if (m_pchild != NULL) {
for(Pane* ppane = m_pchild; ppane != NULL; ppane = ppane->m_pnext) {
WinRect rectClipOld = psurface->GetClipRect();
psurface->Offset(ppane->m_offset);
psurface->SetClipRect(WinRect(WinPoint(0, 0), ppane->GetSize()));
ppane->InternalPaint(psurface);
psurface->Offset(-ppane->m_offset);
psurface->RestoreClipRect(rectClipOld);
}
} else {
TunnelPaint(psurface, false);
}
m_bNeedPaint = false;
}
}