本文整理汇总了C++中Rect::Bounds方法的典型用法代码示例。如果您正苦于以下问题:C++ Rect::Bounds方法的具体用法?C++ Rect::Bounds怎么用?C++ Rect::Bounds使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Rect
的用法示例。
在下文中一共展示了Rect::Bounds方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddChild
void Canvas::AddChild(Canvas *child, const Rect &childRect, window_flags flags)
{
if (fWindow == 0)
return;
fWindow->fConnection->WriteInt8(OP_CREATE_WINDOW);
fWindow->fConnection->WriteConnectionPort();
fWindow->fConnection->WriteInt32(fID); // My child
fWindow->fConnection->WriteInt32(childRect.left);
fWindow->fConnection->WriteInt32(childRect.top);
fWindow->fConnection->WriteInt32(childRect.right);
fWindow->fConnection->WriteInt32(childRect.bottom);
fWindow->fConnection->WriteInt32(fWindow->fEventPort);
fWindow->fConnection->WriteInt32(flags);
fWindow->fConnection->Flush();
child->fID = fWindow->fConnection->ReadInt32();
child->fWindow = fWindow;
child->fBounds = childRect.Bounds();
// Stick window in the window's canvas list
child->fWinListNext = fWindow->fCanvasList;
child->fWinListPrev = &fWindow->fCanvasList;
if (fWindow->fCanvasList)
fWindow->fCanvasList->fWinListPrev = &child->fWinListNext;
fWindow->fCanvasList = child;
child->Show();
}
示例2: FrameSized
void BlueDecorator::FrameSized( const Rect& cFrame )
{
Layer* pcView = GetLayer();
Point cDelta( cFrame.Width() - m_cBounds.Width(), cFrame.Height() - m_cBounds.Height() );
m_cBounds = cFrame.Bounds();
Layout();
if ( cDelta.x != 0.0f )
{
Rect cDamage = m_cBounds;
cDamage.left = m_cMinimizeRect.left - fabs(cDelta.x) - 50.0f;
pcView->Invalidate( cDamage );
}
if ( cDelta.y != 0.0f )
{
Rect cDamage = m_cBounds;
cDamage.top = cDamage.bottom - std::max( m_vBottomBorder, m_vBottomBorder + cDelta.y ) - 1.0f;
pcView->Invalidate( cDamage );
}
pcView->Invalidate( m_cBounds );
}
示例3: FrameSized
void DefaultDecorator::FrameSized( const Rect & cFrame )
{
Layer *pcView = GetLayer();
Point cDelta( cFrame.Width() - m_cBounds.Width( ), cFrame.Height( ) - m_cBounds.Height( ) );
m_cBounds = cFrame.Bounds();
Layout();
if( cDelta.x != 0.0f )
{
Rect cDamage = m_cBounds;
cDamage.left = m_cObjectFrame[HIT_MINIMIZE].left - fabs( cDelta.x ) - 2.0f;
pcView->Invalidate( cDamage );
}
if( cDelta.y != 0.0f )
{
Rect cDamage = m_cBounds;
cDamage.top = cDamage.bottom - std::max( m_vBottomBorder, m_vBottomBorder + cDelta.y ) - 1.0f;
pcView->Invalidate( cDamage );
}
}