本文整理汇总了C++中Layer::GetBounds方法的典型用法代码示例。如果您正苦于以下问题:C++ Layer::GetBounds方法的具体用法?C++ Layer::GetBounds怎么用?C++ Layer::GetBounds使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Layer
的用法示例。
在下文中一共展示了Layer::GetBounds方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DrawFrameBorders
void BlueDecorator::DrawFrameBorders (void)
{
Layer* pcView = GetLayer();
Rect cOBounds = pcView->GetBounds();
// outside
pcView->SetFgColor( 15, 32, 50, 255 );
pcView->DrawLine (Point (cOBounds.left,cOBounds.top),Point (cOBounds.right,cOBounds.top));
pcView->DrawLine (Point (cOBounds.right,cOBounds.bottom));
pcView->DrawLine (Point (cOBounds.left,cOBounds.bottom));
pcView->DrawLine (Point (cOBounds.left,cOBounds.top));
// outside light
Color32_s sLightColor = m_bHasFocus ? Color32_s(100,144,223,255):Color32_s(244,244,244,255) ;
pcView->SetFgColor(sLightColor);
pcView->DrawLine (Point (cOBounds.left+1,cOBounds.top+1),Point (cOBounds.right-1,cOBounds.top+1));
pcView->DrawLine (Point (cOBounds.left+1,cOBounds.top+1),Point (cOBounds.left+1,cOBounds.bottom-1));
// outside dark
Color32_s sDarkColor = m_bHasFocus ? Color32_s(25,62,80,255):Color32_s(184,184,184,255) ;
pcView->SetFgColor( sDarkColor );
pcView->DrawLine (Point (cOBounds.left+1,cOBounds.bottom-1),Point (cOBounds.right-1,cOBounds.bottom-1));
pcView->DrawLine (Point (cOBounds.right-1,cOBounds.bottom-1),Point (cOBounds.right-1,cOBounds.top+2));
// inside
pcView->SetFgColor( 29, 64, 98, 255 );
pcView->DrawLine (Point (cOBounds.left+m_vLeftBorder, cOBounds.top+(m_vTopBorder-1)),
Point (cOBounds.right-(m_vRightBorder-1),cOBounds.top+m_vTopBorder-1));
pcView->DrawLine (Point (cOBounds.right-(m_vRightBorder-1),cOBounds.bottom-(m_vBottomBorder-1)));
pcView->DrawLine (Point (cOBounds.left+(m_vLeftBorder-1), cOBounds.bottom-(m_vBottomBorder-1)));
pcView->DrawLine (Point (cOBounds.left+(m_vLeftBorder-1), cOBounds.top+(m_vTopBorder-1)));
}
示例2: GetObjectPointer
AABB
LayerManager::GetBounds( IN HLayer hLayer )
{
AABB rval;
Layer* pLayer = GetObjectPointer(hLayer);
if (!pLayer)
{
RETAILMSG(ZONE_ERROR, "ERROR: LayerManager::GetBounds( 0x%x ): invalid Layer", (UINT32)hLayer);
return rval;
}
return pLayer->GetBounds();
}
示例3: Render
void DefaultDecorator::Render( const Rect & cUpdateRect )
{
if( m_nFlags & WND_NO_BORDER )
{
return;
}
Color32_s sFillColor = m_bHasFocus ? get_default_color( COL_SEL_WND_BORDER ) : get_default_color( COL_NORMAL_WND_BORDER );
Layer *pcView = GetLayer();
Rect cOBounds = pcView->GetBounds();
Rect cIBounds = cOBounds;
cIBounds.left += m_vLeftBorder - 1;
cIBounds.right -= m_vRightBorder - 1;
cIBounds.top += m_vTopBorder - 1;
cIBounds.bottom -= m_vBottomBorder - 1;
pcView->DrawFrame( cOBounds, FRAME_RAISED | FRAME_THIN | FRAME_TRANSPARENT );
pcView->DrawFrame( cIBounds, FRAME_RECESSED | FRAME_THIN | FRAME_TRANSPARENT );
// Bottom
pcView->FillRect( Rect( cOBounds.left + 1, cIBounds.bottom + 1, cOBounds.right - 1, cOBounds.bottom - 1 ), sFillColor );
// Left
pcView->FillRect( Rect( cOBounds.left + 1, cOBounds.top + m_vTopBorder, cIBounds.left - 1, cIBounds.bottom ), sFillColor );
// Right
pcView->FillRect( Rect( cIBounds.right + 1, cOBounds.top + m_vTopBorder, cOBounds.right - 1, cIBounds.bottom ), sFillColor );
if( ( m_nFlags & WND_NO_TITLE ) == 0 )
{
DrawButton( HIT_DRAG, sFillColor );
}
else
{
pcView->FillRect( Rect( cOBounds.left + 1, cOBounds.top - 1, cOBounds.right - 1, cIBounds.top + 1 ), sFillColor );
}
DrawButton( HIT_ZOOM, sFillColor );
DrawButton( HIT_MINIMIZE, sFillColor );
DrawButton( HIT_DEPTH, sFillColor );
DrawButton( HIT_CLOSE, sFillColor );
}
示例4: FillBackGround
void BlueDecorator::FillBackGround(void )
{
Layer* pcView = GetLayer();
Rect cOBounds = pcView->GetBounds();
Color32_s sFillColor = m_bHasFocus ? Color32_s(62,101,172,255):Color32_s(191,191,191,255) ;
Color32_s col_Light = m_bHasFocus ? Color32_s (32,71,142,255):Color32_s(191,191,191,255) ;
Color32_s col_Dark = m_bHasFocus ? Color32_s (62,101,172,255):Color32_s(221,221,221,255);
Point Left = Point(cOBounds.left+1, cOBounds.top+1);
Point Right = Point(cOBounds.right-1, cOBounds.top+1);
Color32_s col_Grad = col_Light;
Color32_s col_Step = Color32_s( (col_Light.red-col_Dark.red)/15,
(col_Light.green-col_Dark.green)/15,
(col_Light.blue-col_Dark.blue)/15, 0 );
for (int i=0; i<25; i++)
{
pcView->SetFgColor( col_Grad );
pcView->DrawLine( Left, Right );
Left.y += 1;
Right.y += 1;
col_Grad.red -= col_Step.red;
col_Grad.green -= col_Step.green;
col_Grad.blue -= col_Step.blue;
}
// left
pcView->FillRect( Rect(cOBounds.left,cOBounds.top+m_vTopBorder,
cOBounds.left+m_vLeftBorder,cOBounds.bottom+m_vLeftBorder),sFillColor);
// right
pcView->FillRect( Rect(cOBounds.right-m_vRightBorder,cOBounds.top+m_vTopBorder,
cOBounds.right,cOBounds.bottom),sFillColor);
// bottom
pcView->FillRect( Rect(cOBounds.left,cOBounds.bottom-m_vBottomBorder,
cOBounds.right,cOBounds.bottom),sFillColor);
}