- cc_item_shapes; add ClearBoxRel() function; analogous to PaintBoxRel()

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2018-01-26 09:57:40 +01:00
committed by Thilo Graf
parent 88ded2e279
commit a3ce3d65c4
2 changed files with 25 additions and 2 deletions

View File

@@ -110,7 +110,6 @@ 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);
@@ -118,3 +117,10 @@ bool PaintBoxRel(const int& x, const int& y, const int& dx, const int& dy, const
box.paint(CC_SAVE_SCREEN_NO);
return box.isPainted();
}
void ClearBoxRel(const int& x, const int& y, const int& dx, const int& dy, int shadow_mode)
{
int w = dx + (shadow_mode ? OFFSET_SHADOW : 0);
int h = dy + (shadow_mode ? OFFSET_SHADOW : 0);
CFrameBuffer::getInstance()->paintBackgroundBoxRel(x, y, w, h);
}