本文整理汇总了C++中GetBottom函数的典型用法代码示例。如果您正苦于以下问题:C++ GetBottom函数的具体用法?C++ GetBottom怎么用?C++ GetBottom使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetBottom函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: PrintAllocations
void PrintAllocations( )
{
GetLock( ).lock( );
#ifdef DEBUG_MEMORY
Header* header = GetBottom( )->Next;
std::string str = "\n";
while ( header )
{
if ( !header->Free )
str += "\tMEMORY LEAK\t\t" + std::string( header->File ) + ":" + std::to_string( header->Line ) + "\t\t" + std::to_string( header->Size ) + "\n";
header = header->Next;
}
header = GetTop( )->Next;
while ( header )
{
if ( !header->Free )
str += "\tMEMORY LEAK\t\t" + std::string( header->File ) + ":" + std::to_string( header->Line ) + "\t\t" + std::to_string( header->Size ) + "\n";
header = header->Next;
}
str += "\n";
#if PLATFORM == PLATFORM_WINDOWS
OutputDebugStringA( str.c_str( ) );
#else
printf( "%s", str.c_str( ) );
#endif
#endif
GetLock( ).unlock( );
}
开发者ID:Robograde,项目名称:Robograde,代码行数:31,代码来源:Allocator.cpp
示例17: Paint
void nsDisplayList::Paint(nsDisplayListBuilder* aBuilder, nsIRenderingContext* aCtx,
const nsRect& aDirtyRect) const {
for (nsDisplayItem* i = GetBottom(); i != nsnull; i = i->GetAbove()) {
i->Paint(aBuilder, aCtx, aDirtyRect);
}
nsCSSRendering::DidPaint();
}
开发者ID:ahadzi,项目名称:celtx,代码行数:7,代码来源:nsDisplayList.cpp
示例18: data
BOOL CReportEntityPicture::FromString( const CString& str )
/* ============================================================
Function : CReportEntityPicture::FromString
Description : Sets the data of the object from "str".
Access : Public
Return : BOOL - "TRUE" if the string
represents an object
of this type.
Parameters : const CString& str - String to parse
Usage : Call to load objects from a file.
============================================================*/
{
BOOL result = FALSE;
CString data( str );
if( LoadFromString( data ) )
{
CTokenizer tok( data );
double borderthickness;
unsigned int borderstyle;
unsigned int bordercolor;
CString filename;
int count = 0;
tok.GetAt( count++, borderthickness );
int aaa;
tok.GetAt( count++, aaa );
borderstyle=aaa;
tok.GetAt( count++, aaa );
bordercolor=aaa;
tok.GetAt( count++, filename );
int bt = CUnitConversion::InchesToPixels( borderthickness );
SetBorderThickness( bt );
SetBorderStyle( borderstyle );
SetBorderColor( bordercolor );
UnmakeSaveString( filename );
SetFilename( filename );
int left = CUnitConversion::InchesToPixels( GetLeft() );
int right = CUnitConversion::InchesToPixels( GetRight() );
int top = CUnitConversion::InchesToPixels( GetTop() );
int bottom = CUnitConversion::InchesToPixels( GetBottom() );
CRect rect( left, top, right, bottom );
SetRect( rect );
result = TRUE;
}
return result;
}
开发者ID:AnthonyNystrom,项目名称:GenXSource,代码行数:60,代码来源:ReportEntityPicture.cpp
示例19: HitTest
nsIFrame* nsDisplayList::HitTest(nsDisplayListBuilder* aBuilder, nsPoint aPt,
nsDisplayItem::HitTestState* aState) const {
PRInt32 itemBufferStart = aState->mItemBuffer.Length();
nsDisplayItem* item;
for (item = GetBottom(); item; item = item->GetAbove()) {
aState->mItemBuffer.AppendElement(item);
}
for (PRInt32 i = aState->mItemBuffer.Length() - 1; i >= itemBufferStart; --i) {
// Pop element off the end of the buffer. We want to shorten the buffer
// so that recursive calls to HitTest have more buffer space.
item = aState->mItemBuffer[i];
aState->mItemBuffer.SetLength(i);
if (item->GetBounds(aBuilder).Contains(aPt)) {
nsIFrame* f = item->HitTest(aBuilder, aPt, aState);
// Handle the XUL 'mousethrough' feature.
if (f) {
if (!f->GetMouseThrough()) {
aState->mItemBuffer.SetLength(itemBufferStart);
return f;
}
}
}
}
NS_ASSERTION(aState->mItemBuffer.Length() == itemBufferStart,
"How did we forget to pop some elements?");
return nsnull;
}
开发者ID:ahadzi,项目名称:celtx,代码行数:28,代码来源:nsDisplayList.cpp
示例20: ExplodeAnonymousChildLists
void nsDisplayList::ExplodeAnonymousChildLists(nsDisplayListBuilder* aBuilder) {
// See if there's anything to do
PRBool anyAnonymousItems = PR_FALSE;
nsDisplayItem* i;
for (i = GetBottom(); i != nsnull; i = i->GetAbove()) {
if (!i->GetUnderlyingFrame()) {
anyAnonymousItems = PR_TRUE;
break;
}
}
if (!anyAnonymousItems)
return;
nsDisplayList tmp;
while ((i = RemoveBottom()) != nsnull) {
if (i->GetUnderlyingFrame()) {
tmp.AppendToTop(i);
} else {
nsDisplayList* list = i->GetList();
NS_ASSERTION(list, "leaf items can't be anonymous");
list->ExplodeAnonymousChildLists(aBuilder);
nsDisplayItem* j;
while ((j = list->RemoveBottom()) != nsnull) {
tmp.AppendToTop(static_cast<nsDisplayWrapList*>(i)->
WrapWithClone(aBuilder, j));
}
i->~nsDisplayItem();
}
}
AppendToTop(&tmp);
}
开发者ID:ahadzi,项目名称:celtx,代码行数:32,代码来源:nsDisplayList.cpp
注:本文中的GetBottom函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论