mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
* CFrameBuffer::paintBoxRel: Skip paint the line, if the calculated width < 0
- When width < 0 GXA overwrites undefined image regions - Skip paint the line, if the calculated width = 0 (unnecessarily)
This commit is contained in:
@@ -675,7 +675,7 @@ void CFrameBuffer::paintBoxRel(const int x, const int y, const int dx, const int
|
||||
return;
|
||||
|
||||
if (dx == 0 || dy == 0) {
|
||||
printf("paintBoxRel: radius %d, start x %d y %d end x %d y %d\n", radius, x, y, x+dx, y+dy);
|
||||
printf("[%s - %d]: radius %d, start x %d y %d end x %d y %d\n", __FUNCTION__, __LINE__, radius, x, y, x+dx, y+dy);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -721,8 +721,15 @@ void CFrameBuffer::paintBoxRel(const int x, const int y, const int dx, const int
|
||||
#endif
|
||||
}
|
||||
|
||||
if (dx-ofr-ofl == 0)
|
||||
printf("paintBoxRel: radius %d, start x %d y %d end x %d y %d\n", radius, x, y, dx-ofr-ofl, y+line);
|
||||
if (dx-ofr-ofl < 1) {
|
||||
if (dx-ofr-ofl == 0)
|
||||
printf("[%s - %d]: radius %d, start x %d y %d end x %d y %d\n", __FUNCTION__, __LINE__, radius, x, y, x+dx-ofr-ofl, y+line);
|
||||
else
|
||||
printf("[%s - %04d]: Calculated width: %d\n (radius %d, dx %d, offsetLeft %d, offsetRight %d).\n Width can not be less than 0, abort.\n",
|
||||
__FUNCTION__, __LINE__, dx-ofr-ofl, radius, dx, ofl, ofr);
|
||||
line++;
|
||||
continue;
|
||||
}
|
||||
#ifdef USE_NEVIS_GXA
|
||||
_write_gxa(gxa_base, GXA_BLT_CONTROL_REG, 0);
|
||||
_write_gxa(gxa_base, cmd, GXA_POINT(x + ofl, y + line)); /* destination x/y */
|
||||
|
Reference in New Issue
Block a user