cc_item_shapes.cpp/h: Add method to create draw boxes without explicit objects

This commit is contained in:
2017-08-28 12:16:45 +02:00
parent b5d33f10e1
commit c743cb632b
2 changed files with 33 additions and 0 deletions

View File

@@ -107,3 +107,12 @@ void CComponentsShapeCircle::paint(bool do_save_bg)
{
paintInit(do_save_bg);
}
bool PaintBoxRel(const int& x, const int& y, const int& dx, const int& dy, const fb_pixel_t& col, int radius, int corner_type, int shadow_mode)
{
CComponentsShapeSquare box(x, y, dx, dy, NULL, shadow_mode, COL_SHADOW_PLUS_0, col);
box.setCorner(radius, corner_type);
box.paint(CC_SAVE_SCREEN_NO);
return box.isPainted();
}