diff options
author | louis <louis.braun@gmx.de> | 2013-05-04 17:18:05 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-05-04 17:18:05 +0200 |
commit | 993bdf2ed543d832eebb1de158134223254dc8ee (patch) | |
tree | 81b8b7b98ff5ee3b4e31560cd768ed118e2d8af3 /menudetailview.c | |
parent | 1bfdd7c81c641cc0e782b7bf360497b060a1d39b (diff) | |
download | skin-nopacity-993bdf2ed543d832eebb1de158134223254dc8ee.tar.gz skin-nopacity-993bdf2ed543d832eebb1de158134223254dc8ee.tar.bz2 |
Implemented workaround for VDR DrawEllipse bug
Diffstat (limited to 'menudetailview.c')
-rw-r--r-- | menudetailview.c | 44 |
1 files changed, 26 insertions, 18 deletions
diff --git a/menudetailview.c b/menudetailview.c index 968b5b3..7b104aa 100644 --- a/menudetailview.c +++ b/menudetailview.c @@ -199,12 +199,14 @@ void cNopacityMenuDetailEventView::DrawHeader(void) { pixmapHeader->DrawImage(cPoint(width - config.epgImageWidth - border, (headerHeight-config.epgImageHeight)/2), imgLoader.GetImage()); if (config.roundedCorners) { int radius = config.cornerRadius; - int x = width - config.epgImageWidth - border; - int y = (headerHeight-config.epgImageHeight)/2; - pixmapHeader->DrawEllipse(cRect(x,y,radius,radius), clrTransparent, -2); - pixmapHeader->DrawEllipse(cRect(x + config.epgImageWidth - radius,y,radius,radius), clrTransparent, -1); - pixmapHeader->DrawEllipse(cRect(x,y + config.epgImageHeight - radius,radius,radius), clrTransparent, -3); - pixmapHeader->DrawEllipse(cRect(x + config.epgImageWidth - radius,y + config.epgImageHeight - radius,radius,radius), clrTransparent, -4); + if (radius > 2) { + int x = width - config.epgImageWidth - border; + int y = (headerHeight-config.epgImageHeight)/2; + pixmapHeader->DrawEllipse(cRect(x,y,radius,radius), clrTransparent, -2); + pixmapHeader->DrawEllipse(cRect(x + config.epgImageWidth - radius,y,radius,radius), clrTransparent, -1); + pixmapHeader->DrawEllipse(cRect(x,y + config.epgImageHeight - radius,radius,radius), clrTransparent, -3); + pixmapHeader->DrawEllipse(cRect(x + config.epgImageWidth - radius,y + config.epgImageHeight - radius,radius,radius), clrTransparent, -4); + } } widthTextHeader -= config.epgImageWidth; } @@ -295,10 +297,12 @@ void cNopacityMenuDetailEventView::DrawEPGPictures(int height) { pixmapContent->DrawImage(cPoint(currentX, currentY), imgLoader.GetImage()); if (config.roundedCorners) { int radius = config.cornerRadius; - pixmapContent->DrawEllipse(cRect(currentX,currentY,radius,radius), clrTransparent, -2); - pixmapContent->DrawEllipse(cRect(currentX + config.epgImageWidthLarge - radius,currentY,radius,radius), clrTransparent, -1); - pixmapContent->DrawEllipse(cRect(currentX,currentY + config.epgImageHeightLarge - radius,radius,radius), clrTransparent, -3); - pixmapContent->DrawEllipse(cRect(currentX + config.epgImageWidthLarge - radius,currentY + config.epgImageHeightLarge - radius,radius,radius), clrTransparent, -4); + if (radius > 2) { + pixmapContent->DrawEllipse(cRect(currentX,currentY,radius,radius), clrTransparent, -2); + pixmapContent->DrawEllipse(cRect(currentX + config.epgImageWidthLarge - radius,currentY,radius,radius), clrTransparent, -1); + pixmapContent->DrawEllipse(cRect(currentX,currentY + config.epgImageHeightLarge - radius,radius,radius), clrTransparent, -3); + pixmapContent->DrawEllipse(cRect(currentX + config.epgImageWidthLarge - radius,currentY + config.epgImageHeightLarge - radius,radius,radius), clrTransparent, -4); + } } if (currentPicsPerLine < picsPerLine) { currentX += config.epgImageWidthLarge + border; @@ -413,10 +417,12 @@ void cNopacityMenuDetailRecordingView::DrawEPGPictures(int height) { pixmapContent->DrawImage(cPoint(currentX, currentY), imgLoader.GetImage()); if (config.roundedCorners) { int radius = config.cornerRadius; - pixmapContent->DrawEllipse(cRect(currentX,currentY,radius,radius), clrTransparent, -2); - pixmapContent->DrawEllipse(cRect(currentX + config.epgImageWidthLarge - radius,currentY,radius,radius), clrTransparent, -1); - pixmapContent->DrawEllipse(cRect(currentX,currentY + config.epgImageHeightLarge - radius,radius,radius), clrTransparent, -3); - pixmapContent->DrawEllipse(cRect(currentX + config.epgImageWidthLarge - radius,currentY + config.epgImageHeightLarge - radius,radius,radius), clrTransparent, -4); + if (radius > 2) { + pixmapContent->DrawEllipse(cRect(currentX,currentY,radius,radius), clrTransparent, -2); + pixmapContent->DrawEllipse(cRect(currentX + config.epgImageWidthLarge - radius,currentY,radius,radius), clrTransparent, -1); + pixmapContent->DrawEllipse(cRect(currentX,currentY + config.epgImageHeightLarge - radius,radius,radius), clrTransparent, -3); + pixmapContent->DrawEllipse(cRect(currentX + config.epgImageWidthLarge - radius,currentY + config.epgImageHeightLarge - radius,radius,radius), clrTransparent, -4); + } } if (currentPicsPerLine < picsPerLine) { currentX += config.epgImageWidthLarge + border; @@ -450,10 +456,12 @@ void cNopacityMenuDetailRecordingView::DrawHeader(void) { int radius = config.cornerRadius; int x = width - config.epgImageWidth - border; int y = (headerHeight-config.epgImageHeight)/2; - pixmapHeader->DrawEllipse(cRect(x,y,radius,radius), clrTransparent, -2); - pixmapHeader->DrawEllipse(cRect(x + config.epgImageWidth - radius,y,radius,radius), clrTransparent, -1); - pixmapHeader->DrawEllipse(cRect(x,y + config.epgImageHeight - radius,radius,radius), clrTransparent, -3); - pixmapHeader->DrawEllipse(cRect(x + config.epgImageWidth - radius,y + config.epgImageHeight - radius,radius,radius), clrTransparent, -4); + if (radius > 2) { + pixmapHeader->DrawEllipse(cRect(x,y,radius,radius), clrTransparent, -2); + pixmapHeader->DrawEllipse(cRect(x + config.epgImageWidth - radius,y,radius,radius), clrTransparent, -1); + pixmapHeader->DrawEllipse(cRect(x,y + config.epgImageHeight - radius,radius,radius), clrTransparent, -3); + pixmapHeader->DrawEllipse(cRect(x + config.epgImageWidth - radius,y + config.epgImageHeight - radius,radius,radius), clrTransparent, -4); + } } widthTextHeader -= config.epgImageWidth; } |