explicit conversion from point/size to rectangle

This commit is contained in:
Jinhao
2015-06-22 11:30:14 +08:00
parent 1bb9a09a8a
commit 28413b7f25
28 changed files with 82 additions and 77 deletions

View File

@@ -98,10 +98,10 @@ namespace nana{
void _m_render_edge_nimbus(core_window_t* wd, const nana::rectangle & visual)
{
nana::rectangle r(visual);
auto r = visual;
r.pare_off(-static_cast<int>(weight()));
nana::rectangle good_r;
if(overlap(r, wd->root_graph->size(), good_r))
rectangle good_r;
if (overlap(r, rectangle{ wd->root_graph->size() }, good_r))
{
if( (good_r.x < wd->pos_root.x) || (good_r.y < wd->pos_root.y) ||
(good_r.x + good_r.width > visual.x + visual.width) || (good_r.y + good_r.height > visual.y + visual.height))

View File

@@ -46,7 +46,7 @@ namespace nana
class event_arg
{
public:
virtual ~event_arg();
virtual ~event_arg() = default;
/// ignorable handlers behind the current one in a chain of event handlers will not get called.
void stop_propagation() const;

View File

@@ -574,7 +574,7 @@ namespace nana{ namespace widgets{ namespace skeletons
virtual void nontext_render(graph_reference graph, int x, int y) override
{
if(size_ != image_.size())
image_.stretch(image_.size(), graph, nana::rectangle(x, y, size_.width, size_.height));
image_.stretch(::nana::rectangle{ image_.size() }, graph, nana::rectangle(x, y, size_.width, size_.height));
else
image_.paste(graph, x, y);
}

View File

@@ -76,7 +76,7 @@ namespace nana
point pos() const;
void move(int x, int y);
//void move(const point&);
void move(const point&);
void move(const rectangle&);
void fgcolor(const nana::color&);