当前位置: 首页>>代码示例>>C++>>正文


C++ wxRect::GetBottom方法代码示例

本文整理汇总了C++中wxRect::GetBottom方法的典型用法代码示例。如果您正苦于以下问题:C++ wxRect::GetBottom方法的具体用法?C++ wxRect::GetBottom怎么用?C++ wxRect::GetBottom使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在wxRect的用法示例。


在下文中一共展示了wxRect::GetBottom方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: _Draw_Frame

//---------------------------------------------------------
void CVIEW_ScatterPlot::_Draw_Frame(wxDC &dc, wxRect r)
{
	//-----------------------------------------------------
	Draw_Edge(dc, EDGE_STYLE_SIMPLE, r);

	//-------------------------------------------------
	Draw_Scale(dc, wxRect(r.GetLeft(), r.GetBottom(), r.GetWidth(), 20),
		m_Trend.Get_Data_XMin(), m_Trend.Get_Data_XMax(),
		true , true , true
	);

	Draw_Scale(dc, wxRect(r.GetLeft() - 20, r.GetTop(), 20, r.GetHeight()),
		m_Trend.Get_Data_YMin(), m_Trend.Get_Data_YMax(),
		false, false, false
	);

	Draw_Text(dc, TEXTALIGN_BOTTOMCENTER,
		r.GetLeft() - 25, r.GetTop() + r.GetHeight() / 2, 90.0,
		m_sY.c_str()
	);

	Draw_Text(dc, TEXTALIGN_TOPCENTER,
		r.GetLeft() + r.GetWidth() / 2, r.GetBottom() + 20,
		m_sX.c_str()
	);

	//-------------------------------------------------
	if( m_Options("REG_SHOW")->asBool() )
	{
		_Draw_Regression(dc, r);
	}
}
开发者ID:johanvdw,项目名称:SAGA-GIS-git-mirror,代码行数:33,代码来源:view_scatterplot.cpp

示例2: OnDrawSeparator

void MyHtmlListBox::OnDrawSeparator(wxDC& dc, wxRect& rect, size_t) const
{
    if ( ((MyFrame *)GetParent())->
            GetMenuBar()->IsChecked(HtmlLbox_DrawSeparator) )
    {
        dc.SetPen(*wxBLACK_DASHED_PEN);
        dc.DrawLine(rect.x, rect.y, rect.GetRight(), rect.y);
        dc.DrawLine(rect.x, rect.GetBottom(), rect.GetRight(), rect.GetBottom());
    }
}
开发者ID:ExperimentationBox,项目名称:Edenite,代码行数:10,代码来源:htlbox.cpp

示例3: DrawTabCtrlBackground

void wxRibbonAUIArtProvider::DrawTabCtrlBackground(
                        wxDC& dc,
                        wxWindow* WXUNUSED(wnd),
                        const wxRect& rect)
{
    wxRect gradient_rect(rect);
    gradient_rect.height--;
    dc.GradientFillLinear(gradient_rect, m_tab_ctrl_background_colour,
        m_tab_ctrl_background_gradient_colour, wxSOUTH);
    dc.SetPen(m_tab_border_pen);
    dc.DrawLine(rect.x, rect.GetBottom(), rect.GetRight()+1, rect.GetBottom());
}
开发者ID:AaronDP,项目名称:wxWidgets,代码行数:12,代码来源:art_aui.cpp

示例4: DrawPageBackground

void wxRibbonAUIArtProvider::DrawPageBackground(
                        wxDC& dc,
                        wxWindow* WXUNUSED(wnd),
                        const wxRect& rect)
{
    dc.SetPen(*wxTRANSPARENT_PEN);
    dc.SetBrush(m_background_brush);
    dc.DrawRectangle(rect.x + 1, rect.y, rect.width - 2, rect.height - 1);

    dc.SetPen(m_page_border_pen);
    dc.DrawLine(rect.x, rect.y, rect.x, rect.y + rect.height);
    dc.DrawLine(rect.GetRight(), rect.y, rect.GetRight(), rect.y +rect.height);
    dc.DrawLine(rect.x, rect.GetBottom(), rect.GetRight()+1, rect.GetBottom());
}
开发者ID:AaronDP,项目名称:wxWidgets,代码行数:14,代码来源:art_aui.cpp

示例5: _Draw_Get_rDiagram

//---------------------------------------------------------
wxRect CVIEW_ScatterPlot::_Draw_Get_rDiagram(wxRect r)
{
	return(	wxRect(
		wxPoint(r.GetLeft () + 45, r.GetTop   () + 20),
		wxPoint(r.GetRight() - 20, r.GetBottom() - 40)
	));
}
开发者ID:johanvdw,项目名称:SAGA-GIS-git-mirror,代码行数:8,代码来源:view_scatterplot.cpp

示例6: DoRefreshRect

void wxWindowDFB::DoRefreshRect(const wxRect& rect)
{
    wxWindow *parent = GetParent();
    wxCHECK_RET( parent, "no parent" );

    // don't overlap outside of the window (NB: 'rect' is in window coords):
    wxRect r(rect);
    r.Intersect(wxRect(GetSize()));
    if ( r.IsEmpty() )
        return;

    wxLogTrace(TRACE_PAINT,
               "%p ('%s'): refresh rect [%i,%i,%i,%i]",
               this, GetName().c_str(),
               rect.x, rect.y, rect.GetRight(), rect.GetBottom());

    // convert the refresh rectangle to parent's coordinates and
    // recursively refresh the parent:
    r.Offset(GetPosition());
    r.Offset(parent->GetClientAreaOrigin());

    // normal windows cannot extend out of its parent's client area, so don't
    // refresh any hidden parts:
    if ( !CanBeOutsideClientArea() )
        r.Intersect(parent->GetClientRect());

    parent->DoRefreshRect(r);
}
开发者ID:beanhome,项目名称:dev,代码行数:28,代码来源:window.cpp

示例7: InvalidateRect

void Stage::InvalidateRect(const wxRect &inRect) {
    wxLogTrace(TRACE_STAGE_DRAWING, wxT("Invalidating: %d %d %d %d"),
               inRect.x, inRect.y, inRect.GetRight(), inRect.GetBottom());

    // We want to make sure that we never try to do any drawing off
    // the edges of the screen. Certain platforms, (like wxMac) get
    // very upset when you try to draw from or to rects that lie off
    // the screen. Since this is how all of the dirty regions enter
    // the system, we clip our dirty rect to the screen and make sure
    // we have something left before continuing.
    wxRect r(inRect.Intersect(wxRect(wxPoint(0, 0), GetSize())));
    if (r.IsEmpty())
        return;

    // It's a little bit inelegant to maintain two different dirty lists,
    // but they get cleared by different actions.
    mRectsToComposite.MergeRect(r);

    // Trigger screen repaint events--and update our manual refresh
    // list--but only if Quake 2 is not being displayed.  (Quake 2 covers
    // the entire stage, and if we repaint the screen, it will flicker.)
    // The entire screen will automatically be refreshed when Quake 2
    // is hidden.
    if (!GameEngineIsDisplayed()) {
        mRectsToRefresh.MergeRect(r);
        Refresh(FALSE, &r);
    }
}
开发者ID:colonelqubit,项目名称:halyard,代码行数:28,代码来源:Stage.cpp

示例8: DrawFocus

//
// Draws a focus rectangle (Taken directly from wxWidgets source)
//
void AColor::DrawFocus(wxDC & dc, wxRect & rect)
{
   // draw the pixels manually: note that to behave in the same manner as
   // DrawRect(), we must exclude the bottom and right borders from the
   // rectangle
   wxCoord x1 = rect.GetLeft(),
         y1 = rect.GetTop(),
         x2 = rect.GetRight(),
         y2 = rect.GetBottom();

   dc.SetPen(wxPen(wxT("MEDIUM GREY"), 0, wxSOLID));

   // this seems to be closer than what Windows does than wxINVERT although
   // I'm still not sure if it's correct
   dc.SetLogicalFunction(wxAND_REVERSE);

   wxCoord z;
   for ( z = x1 + 1; z < x2; z += 2 )
      dc.DrawPoint(z, y1);

   wxCoord shift = z == x2 ? 0 : 1;
   for ( z = y1 + shift; z < y2; z += 2 )
      dc.DrawPoint(x2, z);

   shift = z == y2 ? 0 : 1;
   for ( z = x2 - shift; z > x1; z -= 2 )
      dc.DrawPoint(z, y2);

   shift = z == x1 ? 0 : 1;
   for ( z = y2 - shift; z > y1; z -= 2 )
      dc.DrawPoint(x1, z);

   dc.SetLogicalFunction(wxCOPY);
}
开发者ID:Avi2011class,项目名称:audacity,代码行数:37,代码来源:AColor.cpp

示例9: GetSubImageWithAlpha

/// Gets a rectangle from within another image, INCLUDING the alpha channel
/// \bug in wxWidgets, wxImage::GetSubImage should do this itself.
wxImage GetSubImageWithAlpha( const wxImage & Src,  const wxRect &rect )
{
   //First part of this code is lifted from wxImage::GetSubImage() source code.
   wxImage image;

   wxCHECK_MSG( Src.Ok(), image, wxT("invalid image") );

   wxCHECK_MSG( (rect.GetLeft()>=0) && (rect.GetTop()>=0) && (
      rect.GetRight()<=Src.GetWidth()) && (rect.GetBottom()<=Src.GetHeight()),
      image, wxT("invalid subimage size") );

   int subwidth=rect.GetWidth();
   const int subheight=rect.GetHeight();

   image.Create( subwidth, subheight, false );

   unsigned char *subdata = image.GetData(), *data=Src.GetData();

   wxCHECK_MSG( subdata, image, wxT("unable to create image") );

   // JKC: Quick hack - don't deal with masks - need to understand macro M_IMGDATA first.
//   if (Src.M_IMGDATA->m_hasMask)
//      image.SetMaskColour( Src.M_IMGDATA->m_maskRed, Src.M_IMGDATA->m_maskGreen, Src.M_IMGDATA->m_maskBlue );

   int subleft=3*rect.GetLeft();
   int width=3*Src.GetWidth();
   subwidth*=3;

   data+=rect.GetTop()*width+subleft;

   for (long j = 0; j < subheight; ++j)
   {
      memcpy( subdata, data, subwidth);
      subdata+=subwidth;
      data+=width;
   }

   // OK, so we've copied the RGB data.
   // Now do the Alpha channel.
   wxASSERT( Src.HasAlpha() );
   image.InitAlpha();

   subleft/=3;
   width/=3;
   subwidth/=3;

   data =Src.GetAlpha();
   subdata =image.GetAlpha();

   data+=rect.GetTop()*width+subleft;

   for (long j = 0; j < subheight; ++j)
   {
      memcpy( subdata, data, subwidth);
      subdata+=subwidth;
      data+=width;
   }
   return image;
}
开发者ID:Cactuslegs,项目名称:audacity-of-nope,代码行数:61,代码来源:ImageManipulation.cpp

示例10: InUpdateRegion

bool MathCell::InUpdateRegion(wxRect rect)
{
  return
    (rect.GetRight()  >= m_updateRegion.GetLeft()  ) &&
    (rect.GetLeft()   <= m_updateRegion.GetRight() ) &&
    (rect.GetBottom() >= m_updateRegion.GetTop()   ) &&
    (rect.GetTop()    <= m_updateRegion.GetBottom());
}
开发者ID:belkacem77,项目名称:wxmaxima,代码行数:8,代码来源:MathCell.cpp

示例11: DrawFrameWithoutLabel

void wxStdRenderer::DrawFrameWithoutLabel(wxDC& dc,
                                          const wxRect& rectFrame,
                                          const wxRect& rectLabel)
{
    // draw left, bottom and right lines entirely
    DrawVerticalLine(dc, rectFrame.GetLeft(),
                     rectFrame.GetTop(), rectFrame.GetBottom() - 2);
    DrawHorizontalLine(dc, rectFrame.GetBottom() - 1,
                       rectFrame.GetLeft(), rectFrame.GetRight());
    DrawVerticalLine(dc, rectFrame.GetRight() - 1,
                     rectFrame.GetTop(), rectFrame.GetBottom() - 1);

    // and 2 parts of the top line
    DrawHorizontalLine(dc, rectFrame.GetTop(),
                       rectFrame.GetLeft() + 1, rectLabel.GetLeft());
    DrawHorizontalLine(dc, rectFrame.GetTop(),
                       rectLabel.GetRight(), rectFrame.GetRight() - 2);
}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:18,代码来源:stdrend.cpp

示例12: GetRealCoord

int TGraphScale::GetRealCoord ( float f , wxRect &inner )
	{
	float m2 = horizontal ? inner.width : inner.height ; // The pixel "width"
	float f2 = top - bottom ; // The internal "width"
	float ret = m2 * ( f - bottom ) / f2 ;
	if ( horizontal ) ret += (float ) inner.x ;
	else ret = (float) ( inner.GetBottom() ) - ret ;
 	return (int) ret ;
	}    
开发者ID:magnusmanske,项目名称:gentle-m,代码行数:9,代码来源:TGraphScale.cpp

示例13: set_bbox

 void configuration_visitor::set_bbox(const wxRect& r) {
     boost::shared_ptr<vector_layer_ghost> ghost = m_panel->vectorlayerghost();
     if(!ghost) return;
     ghost->reset<vector_layer_ghost::Rectangle>();
     ghost->add_point(wxRealPoint(r.GetLeft (),r.GetTop   ()));
     ghost->add_point(wxRealPoint(r.GetRight(),r.GetBottom()));
     ghost->m_penRectangle = wxPen(*wxRED, 2, wxDOT);
     ghost->m_brushRectangle = wxBrush(*wxRED, wxTRANSPARENT);
 }
开发者ID:hthth0801,项目名称:librjmcmc,代码行数:9,代码来源:configuration_visitor.cpp

示例14: CombineRectangles

// Calculate the area that contains both rectangles
static wxRect CombineRectangles(const wxRect& rect1, const wxRect& rect2)
{
    wxRect rect;
    
    int right1 = rect1.GetRight();
    int bottom1 = rect1.GetBottom();
    int right2 = rect2.GetRight();
    int bottom2 = rect2.GetBottom();
    
    wxPoint topLeft = wxPoint(wxMin(rect1.x, rect2.x), wxMin(rect1.y, rect2.y));
    wxPoint bottomRight = wxPoint(wxMax(right1, right2), wxMax(bottom1, bottom2));
    
    rect.x = topLeft.x; rect.y = topLeft.y;
    rect.SetRight(bottomRight.x);
    rect.SetBottom(bottomRight.y);
    
    return rect;
}
开发者ID:Undrizzle,项目名称:yolanda,代码行数:19,代码来源:splittree.cpp

示例15: _Draw_Legend

//---------------------------------------------------------
void CVIEW_ScatterPlot::_Draw_Legend(wxDC &dc, wxRect r)
{
	CSG_Colors	Colors(*m_Options("DENSITY_PAL")->asColors());

	Colors.Set_Count(r.GetHeight());

	for(int i=0, y=r.GetBottom(); i<Colors.Get_Count(); i++, y--)
	{
		Draw_FillRect(dc, Get_Color_asWX(Colors.Get_Color(i)), r.GetLeft(), y, r.GetRight(), y + 1);
	}

//	r.Offset(0, -r.GetHeight());

	Draw_Edge(dc, EDGE_STYLE_SIMPLE, r);

	Draw_Text(dc, TEXTALIGN_BOTTOMLEFT, 2 + r.GetRight(), r.GetBottom(), "0");
	Draw_Text(dc, TEXTALIGN_TOPLEFT   , 2 + r.GetRight(), r.GetTop   (), wxString::Format("%d", (int)m_Count.Get_Max()));
}
开发者ID:johanvdw,项目名称:SAGA-GIS-git-mirror,代码行数:19,代码来源:view_scatterplot.cpp


注:本文中的wxRect::GetBottom方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。