image::paste throws exception if graphics or image is empty
This commit is contained in:
@@ -201,7 +201,7 @@ namespace nana
|
||||
case frame::kind::oneshot:
|
||||
_m_render(outs, [&frmobj](paint::graphics& tar, const nana::point& pos)
|
||||
{
|
||||
frmobj.u.oneshot->paste(tar, pos.x, pos.y);
|
||||
frmobj.u.oneshot->paste(tar, pos);
|
||||
});
|
||||
break;
|
||||
case frame::kind::framebuilder:
|
||||
@@ -230,7 +230,7 @@ namespace nana
|
||||
switch(frmobj.type)
|
||||
{
|
||||
case frame::kind::oneshot:
|
||||
frmobj.u.oneshot->paste(graph, pos.x, pos.y);
|
||||
frmobj.u.oneshot->paste(graph, pos);
|
||||
break;
|
||||
case frame::kind::framebuilder:
|
||||
if(rebuild_frame)
|
||||
|
||||
@@ -258,7 +258,7 @@ namespace nana{ namespace drawerbase
|
||||
}
|
||||
|
||||
if(attr_.icon)
|
||||
attr_.icon->paste(graph, 3, (gsize.height - icon_sz.height) / 2);
|
||||
attr_.icon->paste(graph, point{ 3, static_cast<int>(gsize.height - icon_sz.height) / 2 });
|
||||
}
|
||||
|
||||
void trigger::_m_draw(graph_reference graph)
|
||||
|
||||
@@ -1263,7 +1263,7 @@ namespace nana
|
||||
img->stretch(::nana::rectangle{ size }, graph, attr.area);
|
||||
}
|
||||
else
|
||||
img->paste(graph, attr.area.x + static_cast<int>(attr.area.width - size.width) / 2, attr.area.y + static_cast<int>(attr.area.height - size.height) / 2);
|
||||
img->paste(graph, point{ attr.area.x + static_cast<int>(attr.area.width - size.width) / 2, attr.area.y + static_cast<int>(attr.area.height - size.height) / 2 });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user