CComponents: use paintBoxRel() only in kill()

paintBackgroundBoxRel() ignores rounded corners. This avoids painting of
undesirable parts on corners.


Origin commit data
------------------
Branch: ni/coolstream
Commit: dc007e810a
Author: Thilo Graf <dbt@novatux.de>
Date: 2014-05-18 (Sun, 18 May 2014)



------------------
This commit was generated by Migit
This commit is contained in:
2014-05-18 21:49:07 +02:00
parent f4dcb577de
commit 8bbea0b762
3 changed files with 14 additions and 7 deletions

View File

@@ -228,13 +228,20 @@ inline void CComponents::hide()
}
//erase or paint over rendered objects
void CComponents::kill(const fb_pixel_t& bg_color)
void CComponents::kill(const fb_pixel_t& bg_color, const int& corner_radius)
{
for(size_t i =0; i< v_fbdata.size() ;i++){
if (bg_color)
frameBuffer->paintBoxRel(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy, bg_color, v_fbdata[i].r, corner_type);
#if 0
if (bg_color != COL_BACKGROUND)
#endif
int r = v_fbdata[i].r;
if (corner_radius > -1)
r = corner_radius;
frameBuffer->paintBoxRel(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy, bg_color, r, corner_type);
#if 0
else
frameBuffer->paintBackgroundBoxRel(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy);
#endif
}
clearFbData();
firstPaint = true;