當前位置: 首頁>>代碼示例>>C++>>正文


C++ GetBottom函數代碼示例

本文整理匯總了C++中GetBottom函數的典型用法代碼示例。如果您正苦於以下問題:C++ GetBottom函數的具體用法?C++ GetBottom怎麽用?C++ GetBottom使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了GetBottom函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: GetLeft

bool UI::MouseOverable::inside(const ScreenPoint& mouse) const
{
	return mouse[0] >= GetLeft()
		&& mouse[1] >= GetBottom()
		&& mouse[0] < GetLeft() + GetWidth()
		&& mouse[1] < GetBottom() + GetHeight();
}
開發者ID:Yan-Song,項目名稱:burdakovd,代碼行數:7,代碼來源:MouseOverable.cpp

示例2: UpdateRows

bool wxSheetBlock::UpdateRows( size_t row_, int numRows )
{
    int row = row_;
    if ((numRows == 0) || (GetBottom() < row)) return false;
    bool remove = numRows < 0;

    // this starts above the deleted rows
    if (m_row < row)
    {
        // this ends within deleted rows, trim to row
        if (remove && (GetBottom() < row - numRows))
            SetBottom(row-1);
        // this straddles the inserted/deleted rows - resize
        else 
            m_height += numRows;
    }
    // This is fully below it or an insert - shift coord
    else if (!remove || (m_row > row + labs(numRows)))
    {
        m_row += numRows;
    }
    // a remove and this's row is in deleted rows
    else 
    {
        m_height += m_row - (row - numRows);
        m_row = row;
    }

    return true;
}        
開發者ID:NalinG,項目名稱:gambit,代碼行數:30,代碼來源:sheetsel.cpp

示例3: iBlock

int wxSheetBlock::Delete( const wxSheetBlock &block, 
                          wxSheetBlock &top, wxSheetBlock &bottom, 
                          wxSheetBlock &left, wxSheetBlock &right ) const
{
    wxSheetBlock iBlock(Intersect(block));    
    if (iBlock.IsEmpty()) return wxSHEET_BLOCK_NONE; // nothing to delete
    if (block.Contains(*this)) return wxSHEET_BLOCK_ALL; // can delete all of this, no leftover

    int deleted = wxSHEET_BLOCK_NONE;
    
    if ( GetTop() < iBlock.GetTop() )
    {
        top.SetCoords( GetTop(), GetLeft(), iBlock.GetTop()-1, GetRight() );
        deleted |= wxSHEET_BLOCK_TOP;
    }
    if ( GetBottom() > iBlock.GetBottom() )
    {
        bottom.SetCoords( iBlock.GetBottom()+1, GetLeft(), GetBottom(), GetRight() );
        deleted |= wxSHEET_BLOCK_BOTTOM;
    }
    if ( GetLeft() < iBlock.GetLeft() )
    {
        left.SetCoords( iBlock.GetTop(), GetLeft(), iBlock.GetBottom(), iBlock.GetLeft()-1 );
        deleted |= wxSHEET_BLOCK_LEFT;
    }
    if ( GetRight() > iBlock.GetRight() )
    {
        right.SetCoords( iBlock.GetTop(), iBlock.GetRight()+1, iBlock.GetBottom(), GetRight() );
        deleted |= wxSHEET_BLOCK_RIGHT;
    }
    
    return deleted;
}
開發者ID:NalinG,項目名稱:gambit,代碼行數:33,代碼來源:sheetsel.cpp

示例4: POMDOG_ASSERT

//-----------------------------------------------------------------------
bool Rectangle::Intersects(Rectangle const& rect) const
{
    POMDOG_ASSERT(GetLeft() <= GetRight());
    POMDOG_ASSERT(GetTop() <= GetBottom());
    POMDOG_ASSERT(rect.GetLeft() <= rect.GetRight());

    return (GetLeft() < rect.GetRight()
        && GetRight() > rect.GetLeft()
        && GetTop() < rect.GetBottom()
        && GetBottom() > rect.GetTop());
}
開發者ID:Mourtz,項目名稱:pomdog,代碼行數:12,代碼來源:Rectangle.cpp

示例5: GetWidth

void DrawBlockStruct::Draw(WinEDA_DrawPanel * panel, wxDC * DC)
/**************************************************************/
{
    int w = GetWidth()/panel->GetZoom();
    int h = GetHeight()/panel->GetZoom();
    if (  w == 0 || h == 0 )
        GRLine(&panel->m_ClipBox, DC, GetX(), GetY(),
               GetRight(), GetBottom(), m_Color);
    else
        GRRect(&panel->m_ClipBox, DC,  GetX(), GetY(),
               GetRight(), GetBottom(), m_Color);
}
開發者ID:BackupTheBerlios,項目名稱:kicad-svn,代碼行數:12,代碼來源:block_commande.cpp

示例6: CollTikei

int CPlayer::CollTikei()
{
	return
		g_pStage->CollTikei(VECT(GetLeft()+PL_OFFSET,GetTop()+PL_OFFSET))||
		g_pStage->CollTikei(VECT(GetLeft()+PL_OFFSET,GetBottom()-PL_OFFSET))||
		g_pStage->CollTikei(VECT(GetRight()-PL_OFFSET,GetTop()+PL_OFFSET))||
		g_pStage->CollTikei(VECT(GetRight()-PL_OFFSET,GetBottom()-PL_OFFSET))||
		g_pStage->CollTikei(VECT(GetLeft()+GetWidth()/2,GetTop()))||
		g_pStage->CollTikei(VECT(GetLeft()+GetWidth()/2,GetBottom()))||
		g_pStage->CollTikei(VECT(GetLeft(),GetTop()+GetHeight()/2))||
		g_pStage->CollTikei(VECT(GetRight(),GetTop()+GetHeight()/2));
}
開發者ID:yohokuno,項目名稱:suzuri,代碼行數:12,代碼來源:Player.cpp

示例7: drawFunctionSpec

// -----------------------------------------------------------------------------
// Draws function text (spec+args) for [context] at [left,top].
// Returns a rect of the bounds of the drawn text
// -----------------------------------------------------------------------------
wxRect SCallTip::drawFunctionContext(
	wxDC&                      dc,
	const TLFunction::Context& context,
	int                        left,
	int                        top,
	wxColour&                  col_faded,
	wxFont&                    bold) const
{
	auto rect_func = drawFunctionSpec(dc, context, left, top);
	auto rect_args = drawArgs(dc, context, rect_func.GetRight() + 1, rect_func.GetTop(), col_faded, bold);

	return wxRect{ rect_func.GetTopLeft(),
				   wxPoint{ std::max(rect_func.GetRight(), rect_args.GetRight()),
							std::max(rect_func.GetBottom(), rect_args.GetBottom()) } };
}
開發者ID:SteelTitanium,項目名稱:SLADE,代碼行數:19,代碼來源:SCallTip.cpp

示例8: Count

PRUint32 nsDisplayList::Count() const {
  PRUint32 count = 0;
  for (nsDisplayItem* i = GetBottom(); i; i = i->GetAbove()) {
    ++count;
  }
  return count;
}
開發者ID:ahadzi,項目名稱:celtx,代碼行數:7,代碼來源:nsDisplayList.cpp

示例9: GetRight

hdMultiPosRect &hdMultiPosRect::Intersect(int posIdx, const hdMultiPosRect &rect)
{
	int x2 = GetRight(posIdx),
	    y2 = GetBottom(posIdx);

	if ( x[posIdx] < rect.x[posIdx] )
		x[posIdx] = rect.x[posIdx];
	if ( y[posIdx] < rect.y[posIdx] )
		y[posIdx] = rect.y[posIdx];
	if ( x2 > rect.GetRight(posIdx) )
		x2 = rect.GetRight(posIdx);
	if ( y2 > rect.GetBottom(posIdx) )
		y2 = rect.GetBottom(posIdx);

	width = x2 - x[posIdx] + 1;
	height = y2 - y[posIdx] + 1;

	if ( width <= 0 || height <= 0 )
	{
		width =
		    height = 0;
	}

	return *this;
}
開發者ID:KrisShannon,項目名稱:pgadmin3,代碼行數:25,代碼來源:hdMultiPosRect.cpp

示例10: GetTop

bool Rectangle::Intersects(const Circle& circle) const {

    double radius = circle.GetRadius();

    auto cp = circle.GetPosition();

    auto t = GetTop();
    double distTop = Math::GetDistance(cp, t.GetPointOne(), t.GetPointTwo());

    auto l = GetLeft();
    double distLeft = Math::GetDistance(cp, l.GetPointOne(), l.GetPointTwo());

    auto r = GetRight();
    double distRight = Math::GetDistance(cp, r.GetPointOne(), r.GetPointTwo());

    auto b = GetBottom();
    double distBottom = Math::GetDistance(cp, b.GetPointOne(), b.GetPointTwo());

    bool resultTop = distTop <= radius;
    bool resultLeft = distLeft <= radius;
    bool resultRight = distRight <= radius;
    bool resultBottom = distBottom <= radius;
    bool isInside = Intersects(Point(circle.GetPosition()));
    return (isInside || resultTop || resultLeft || resultRight || resultBottom);
}
開發者ID:cugone,項目名稱:Abrams2015,代碼行數:25,代碼來源:CRectangle.cpp

示例11: return

//-----------------------------------------------------------------------
bool Rectangle::Contains(Rectangle const& rect) const
{
    return (rect.GetLeft() >= GetLeft()
        && rect.GetRight() <= GetRight()
        && rect.GetTop() >= GetTop()
        && rect.GetBottom() <= GetBottom());
}
開發者ID:Mourtz,項目名稱:pomdog,代碼行數:8,代碼來源:Rectangle.cpp

示例12: JvRect

JvRect JvCamera::getCameraRect()
{
	//printf("%d\n",_fllowObjP);
	if (_fllowObjP == NULL)
	{
		return JvRect(x,y,width,height);
	}

	if (_shakeTimer!=0)
	{
		return JvRect(x,y,width,height);
	}

	if (x<_fllowBound.x)
	{
		x=_fllowBound.x;
	}

	if (y<_fllowBound.y)
	{
		y=_fllowBound.y;
	}

	if (GetRight()>_fllowBound.GetRight())
	{
		x=_fllowBound.GetRight() - width;
	}

	if (GetBottom()>_fllowBound.GetBottom())
	{
		y=_fllowBound.GetBottom()- height;
	}

	return JvRect(x,y,width,height);
}
開發者ID:cjv123,項目名稱:supercario,代碼行數:35,代碼來源:JvCamera.cpp

示例13: GetRight

wxRect& wxRect::Intersect(const wxRect& rect)
{
    int x2 = GetRight(),
        y2 = GetBottom();

    if ( x < rect.x )
        x = rect.x;
    if ( y < rect.y )
        y = rect.y;
    if ( x2 > rect.GetRight() )
        x2 = rect.GetRight();
    if ( y2 > rect.GetBottom() )
        y2 = rect.GetBottom();

    width = x2 - x + 1;
    height = y2 - y + 1;

    if ( width <= 0 || height <= 0 )
    {
        width =
        height = 0;
    }

    return *this;
}
開發者ID:CodeSmithyIDE,項目名稱:wxWidgets,代碼行數:25,代碼來源:gdicmn.cpp

示例14: return

bool VRect::HitTest (const VPoint& inPoint) const
{
	return ((inPoint.GetX() - fX) > -kREAL_PIXEL_PRECISION
			&& (inPoint.GetX() - GetRight()) < kREAL_PIXEL_PRECISION
			&& (inPoint.GetY() - fY) > -kREAL_PIXEL_PRECISION
			&& (inPoint.GetY() - GetBottom()) < kREAL_PIXEL_PRECISION);
}
開發者ID:sanyaade-webdev,項目名稱:core-XToolbox,代碼行數:7,代碼來源:VRect.cpp

示例15: GetRight

wxSheetBlock wxSheetBlock::ExpandUnion( const wxSheetBlock &other ) const
{
    if (IsEmpty()) return other;        // preserve other block
    if (other.IsEmpty()) return *this;  // preserve this

    // ugly code, but fastest in gcc
    int l = other.GetRight();
    int r = GetRight();
    r = wxMax(r, l);
    l = wxMin(m_col, other.m_col);
    int t = other.GetBottom();
    int b = GetBottom();
    b = wxMax(b, t);
    t = wxMin(m_row, other.m_row);
    return wxSheetBlock(t, l, b-t+1, r-l+1);
    
/*        
    // simplier code, but slower        
    //int l = wxMin(m_col,       other.m_col);
    //int r = wxMax(GetRight(),  other.GetRight());
    //int t = wxMin(m_row,       other.m_row);
    //int b = wxMax(GetBottom(), other.GetBottom());
    //return wxSheetBlock(t, l, b-t+1, r-l+1);
*/        
}
開發者ID:NalinG,項目名稱:gambit,代碼行數:25,代碼來源:sheetsel.cpp


注:本文中的GetBottom函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。