mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
- cc_item_shapes; add ClearBoxRel() function; analogous to PaintBoxRel()
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -110,7 +110,6 @@ void CComponentsShapeCircle::paint(bool do_save_bg)
|
|||||||
paintInit(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)
|
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);
|
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);
|
box.paint(CC_SAVE_SCREEN_NO);
|
||||||
return box.isPainted();
|
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);
|
||||||
|
}
|
||||||
|
@@ -93,8 +93,25 @@ bool PaintBoxRel(const int& x,
|
|||||||
const int& dx,
|
const int& dx,
|
||||||
const int& dy,
|
const int& dy,
|
||||||
const fb_pixel_t& col,
|
const fb_pixel_t& col,
|
||||||
int radius = 0,
|
int radius = 0 /*RADIUS_NONE*/,
|
||||||
int corner_type = CORNER_ALL,
|
int corner_type = CORNER_ALL,
|
||||||
int shadow_mode = CC_SHADOW_OFF);
|
int shadow_mode = CC_SHADOW_OFF);
|
||||||
|
|
||||||
|
/**Small and easy to apply box clear methode
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @param[in] x expects type int, x position on screen
|
||||||
|
* @param[in] y expects type int, y position on screen modes are:
|
||||||
|
* @param[in] dx expects type int, width of scrollbar object
|
||||||
|
* @param[in] dy expects type int, height of scrollbar object
|
||||||
|
*
|
||||||
|
* usual paraemters:
|
||||||
|
* @param[in] shadow_mode optional, expects type int defined by shadow mode enums, default CC_SHADOW_OFF
|
||||||
|
*/
|
||||||
|
void ClearBoxRel(const int& x,
|
||||||
|
const int& y,
|
||||||
|
const int& dx,
|
||||||
|
const int& dy,
|
||||||
|
int shadow_mode = CC_SHADOW_OFF);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user