本文整理汇总了C++中graph_reference::rectangle方法的典型用法代码示例。如果您正苦于以下问题:C++ graph_reference::rectangle方法的具体用法?C++ graph_reference::rectangle怎么用?C++ graph_reference::rectangle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类graph_reference
的用法示例。
在下文中一共展示了graph_reference::rectangle方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _m_button_frame
void drawer::_m_button_frame(graph_reference graph, rectangle r, int state)
{
if (!state)
return;
::nana::color clr{0x97, 0x97, 0x97}; //highlight
switch(state)
{
case states::actived:
clr.from_rgb(0x86, 0xD5, 0xFD); break;
case states::selected:
clr.from_rgb(0x3C, 0x7F, 0xB1); break;
}
graph.rectangle(r, false, clr);
clr = clr.blend(colors::white, 0.5);
graph.palette(false, clr);
r.pare_off(2);
if(vertical_)
{
unsigned half = r.width / 2;
graph.rectangle({ r.x + static_cast<int>(r.width - half), r.y, half, r.height }, true);
r.width -= half;
}
else
{
unsigned half = r.height / 2;
graph.rectangle({r.x, r.y + static_cast<int>(r.height - half), r.width, half}, true);
r.height -= half;
}
graph.gradual_rectangle(r, colors::white, clr, !vertical_);
}
示例2: _m_background
//private:
void drawer::_m_background(graph_reference graph)
{
graph.rectangle(true, {0xf0, 0xf0, 0xf0});
if (!metrics_.pressed || !_m_check())
return;
nana::rectangle_rotator r(vertical_, ::nana::rectangle{ graph.size() });
if(metrics_.what == buttons::forward)
{
r.x_ref() = static_cast<int>(fixedsize);
r.w_ref() = metrics_.scroll_pos;
}
else if(buttons::backward == metrics_.what)
{
r.x_ref() = static_cast<int>(fixedsize + metrics_.scroll_pos + metrics_.scroll_length);
r.w_ref() = static_cast<unsigned>((vertical_ ? graph.height() : graph.width()) - (fixedsize * 2 + metrics_.scroll_pos + metrics_.scroll_length));
}
else
return;
auto result = r.result();
if (!result.empty())
graph.rectangle(result, true, static_cast<color_rgb>(0xDCDCDC));
}
示例3: _m_draw_border
void drawer::_m_draw_border(graph_reference graph, nana::color_t bgcolor)
{
if (!API::widget_borderless(widget_->handle()))
{
nana::rectangle r(graph.size());
graph.rectangle(r, (status_.has_focus ? 0x0595E2 : 0x999A9E), false);
graph.rectangle(r.pare_off(1), bgcolor, false);
}
}
示例4: _m_draw_border
void drawer::_m_draw_border(graph_reference graph)
{
if(status_.border)
{
nana::rectangle r(graph.size());
graph.rectangle(r, (status_.has_focus ? 0x0595E2 : 0x999A9E), false);
r.pare_off(1);
graph.rectangle(r, 0xFFFFFF, false);
}
}
示例5: _m_draw_border
void trigger::_m_draw_border(graph_reference graph)
{
nana::rectangle r(graph.size());
::nana::color lt(static_cast<color_rgb>(0x7f7f7f)), rb(static_cast<color_rgb>(0x707070));
graph.frame_rectangle(r, lt, lt, rb, rb);
graph.set_color(colors::button_face);
draw_corner_point(graph, r);
graph.set_color(static_cast<color_rgb>(0x919191));
draw_corner_point(graph, r.pare_off(1));
if (element_state::pressed == attr_.e_state)
graph.rectangle(r, false, static_cast<color_rgb>(0xc3c3c3));
}
示例6: _m_draw_background
void drawer::_m_draw_background(graph_reference graph)
{
if(bground_mode::basic != API::effects_bground_mode(*widget_))
graph.rectangle(true, API::bgcolor(*widget_));
}
示例7: refresh
void refresh(graph_reference graph)
{
graph.rectangle(false, colors::black);
graph.rectangle(::nana::rectangle(graph.size()).pare_off(1), true, {0xf0, 0xf0, 0xf0});
}
示例8: refresh
void drawer::refresh(graph_reference graph)
{
if (!API::dev::copy_transparent_background(window_, graph))
graph.rectangle(true, API::bgcolor(window_));
}
示例9: refresh
void trigger::refresh(graph_reference graph)
{
graph.rectangle(true, API::bgcolor(*wd_));
}
示例10: refresh
void drawer::refresh(graph_reference graph)
{
if(bground_mode::basic != API::effects_bground_mode(window_))
graph.rectangle(true, API::bgcolor(window_));
}