本文整理汇总了C++中wxRect::GetTopRight方法的典型用法代码示例。如果您正苦于以下问题:C++ wxRect::GetTopRight方法的具体用法?C++ wxRect::GetTopRight怎么用?C++ wxRect::GetTopRight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxRect
的用法示例。
在下文中一共展示了wxRect::GetTopRight方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoDrawInactiveTabSeparator
void clAuiGlossyTabArt::DoDrawInactiveTabSeparator(wxGCDC& gdc, const wxRect& tabRect)
{
wxRect rr = tabRect;
rr.SetWidth(1);
rr.SetHeight(tabRect.GetHeight()+2);
rr.x = tabRect.GetTopRight().x - 1;
rr.y = tabRect.GetTopRight().y - 2;
wxColour sideColour;
if ( DrawingUtils::IsThemeDark() ) {
sideColour = m_bgColour.ChangeLightness(110);
} else {
sideColour = *wxWHITE;
}
// Draw 2 lines on the sides of the "main" line
wxRect rectLeft, rectRight, rectCenter;
wxPoint topPt = rr.GetTopLeft();
topPt.x -= 1;
rectLeft = wxRect(topPt, wxSize(1, rr.GetHeight()) );
gdc.GradientFillLinear(rectLeft, sideColour, m_bgColour, wxNORTH);
topPt.x += 1;
rectCenter = wxRect(topPt, wxSize(1, rr.GetHeight()) );
gdc.GradientFillLinear(rectCenter, m_penColour.ChangeLightness(80), m_bgColour, wxNORTH);
topPt.x += 1;
rectRight = wxRect(topPt, wxSize(1, rr.GetHeight()) );
gdc.GradientFillLinear(rectRight, sideColour, m_bgColour, wxNORTH);
}
示例2: DrawPanelBorder
void wxRibbonMetroArtProvider::DrawPanelBorder(wxDC& dc, const wxRect& rect,
wxPen& primary_colour,
wxPen& secondary_colour)
{
dc.SetPen(m_panel_border_pen);
dc.DrawLine(rect.GetTopRight(), rect.GetBottomRight());
}
示例3: DrawBottomRect
void clTabRendererCurved::DrawBottomRect(
clTabInfo::Ptr_t activeTab, const wxRect& clientRect, wxDC& dc, const clTabColours& colours, size_t style)
{
#ifdef __WXOSX__
if(!IS_VERTICAL_TABS(style)) {
wxPoint pt1, pt2;
dc.SetPen(colours.activeTabBgColour);
if(style & kNotebook_BottomTabs) {
// bottom tabs
pt1 = clientRect.GetTopLeft();
pt2 = clientRect.GetTopRight();
DRAW_LINE(pt1, pt2);
} else {
// Top tabs
pt1 = clientRect.GetBottomLeft();
pt2 = clientRect.GetBottomRight();
pt1.y -= 1;
pt2.y -= 1;
DRAW_LINE(pt1, pt2);
}
}
#else
if(!IS_VERTICAL_TABS(style)) {
wxPoint pt1, pt2;
dc.SetPen(colours.activeTabPenColour);
if(style & kNotebook_BottomTabs) {
// bottom tabs
pt1 = clientRect.GetTopLeft();
pt2 = clientRect.GetTopRight();
DRAW_LINE(pt1, pt2);
} else {
// Top tabs
pt1 = clientRect.GetBottomLeft();
pt2 = clientRect.GetBottomRight();
DRAW_LINE(pt1, pt2);
}
}
#endif
}
示例4: Stroke
void SkinRegion::Stroke(wxDC& dc, wxGraphicsContext* gc, const wxRect& rect, int /*n*/)
{
if (!has_border)
return;
int penw = border.GetWidth() / 2.0f;
wxRect r(rect);
r.Deflate(penw, penw);
//border.SetCap(wxCAP_PROJECTING);
if (rounded) {
bool needsDelete = false;
if (!gc) {
gc = wxGraphicsContext::Create((wxWindowDC&)dc);
needsDelete = true;
}
gc->SetBrush(*wxTRANSPARENT_BRUSH);
gc->SetPen(border);
gc->DrawRoundedRectangle(rect.x, rect.y, rect.width, rect.height, rounded * .97);
rect.Inflate(penw, penw);
if (needsDelete)
delete gc;
} else {
dc.SetPen(border);
int offset = (int)(border.GetWidth() % 2 == 0);
wxPoint x(offset, 0);
wxPoint y(0, offset);
dc.DrawLine(rect.GetTopLeft(), rect.GetBottomLeft() + y);
dc.DrawLine(rect.GetBottomLeft() + y, rect.GetBottomRight() + y + x);
dc.DrawLine(rect.GetBottomRight() + y + x, rect.GetTopRight() + x);
dc.DrawLine(rect.GetTopRight() + x, rect.GetTopLeft());
}
}
示例5: GetInvalidatedIconRange
wxSize CDragBar::GetInvalidatedIconRange(const wxRect& rect)
{
switch(m_orientation) {
case wxHORIZONTAL:
{
int first = FindToolFromCoords(rect.GetTopLeft());
if (first == -1)
first = FindToolFromCoords(rect.GetTopLeft() + wxSize(m_margins.GetWidth(), 0));
int last = FindToolFromCoords(rect.GetTopRight());
if (last == -1) {
last = FindToolFromCoords(rect.GetTopRight() - wxSize(m_margins.GetWidth(), 0));
if (last == -1)
last = static_cast<int>(m_items.size() - 1);
}
return wxSize(first, last);
}
case wxVERTICAL:
{
int first = FindToolFromCoords(rect.GetTopLeft());
if (first == -1)
first = FindToolFromCoords(rect.GetTopLeft() + wxSize(0, m_margins.GetHeight()));
int last = FindToolFromCoords(rect.GetBottomLeft());
if (last == -1) {
last = FindToolFromCoords(rect.GetBottomLeft() - wxSize(0, m_margins.GetHeight()));
if (last == -1)
last = static_cast<int>(m_items.size() - 1);
}
return wxSize(first, last);
}
default:
wxFAIL_MSG(wxT("m_orientation not initialized correctly"));
return wxSize(0, 0);
}
}
示例6: overdraw_rectangle
void Canvas::overdraw_rectangle(wxRect rect, wxDC *dc)
{
wxRect edges[4];
wxSize hor(rect.GetWidth(), 1), ver(1, rect.GetHeight());
edges[0] = wxRect( rect.GetTopLeft(), hor );
edges[1] = wxRect( rect.GetTopLeft(), ver );
edges[2] = wxRect( rect.GetTopRight(), ver );
edges[3] = wxRect( rect.GetBottomLeft(), hor );
for (int i = 0; i < 4; i++) {
dc->DrawBitmap( zoomed_bitmap_for_canvas_region( edges[i] ),
edges[i].GetTopLeft() );
}
}
示例7: FinaliseBackground
void clTabRendererClassic::FinaliseBackground(wxWindow* parent, wxDC& dc, const wxRect& clientRect,
const clTabColours& colours, size_t style)
{
wxUnusedVar(parent);
clTabColours c = colours;
if(DrawingUtils::IsDark(c.activeTabBgColour)) {
InitDarkColours(c, c.activeTabBgColour);
} else {
InitLightColours(c, c.activeTabBgColour);
}
dc.SetPen(c.activeTabPenColour);
if(style & kNotebook_BottomTabs) {
dc.DrawLine(clientRect.GetTopLeft(), clientRect.GetTopRight());
} else {
dc.DrawLine(clientRect.GetBottomLeft(), clientRect.GetBottomRight());
}
}