From 79064be4908b439b686f15906a30f3a082bc37c2 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Sun, 18 Mar 2012 18:46:40 +0000 Subject: [PATCH] neutrino: GUI Painting of Vol. Mute and Clock (Part2) - Move painting of muteicon to framebuffer - Background removed for MuteIcon (switchable) git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2152 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/cece80cc6f3421465f64a7158266ee054fa7e7f4 Author: Michael Liebmann Date: 2012-03-18 (Sun, 18 Mar 2012) Origin message was: ------------------ * neutrino: GUI Painting of Vol. Mute and Clock (Part2) - Move painting of muteicon to framebuffer - Background removed for MuteIcon (switchable) git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2152 e54a6e83-5905-42d5-8d5c-058d10e6a962 ------------------ This commit was generated by Migit --- src/driver/framebuffer.cpp | 15 +++++++++++++++ src/driver/framebuffer.h | 1 + 2 files changed, 16 insertions(+) diff --git a/src/driver/framebuffer.cpp b/src/driver/framebuffer.cpp index 5f84f50f4..5ce510b7a 100644 --- a/src/driver/framebuffer.cpp +++ b/src/driver/framebuffer.cpp @@ -1744,3 +1744,18 @@ void CFrameBuffer::displayRGB(unsigned char *rgbbuff, int x_size, int y_size, in blit2FB(fbbuff, x_size, y_size, x_offs, y_offs, x_pan, y_pan); cs_free_uncached(fbbuff); } + +void CFrameBuffer::paintMuteIcon(bool paint, int ax, int ay, int dx, int dy, bool paintFrame) +{ + if(paint) { + if (paintFrame) { + paintBackgroundBoxRel(ax, ay, dx, dy); + paintBoxRel(ax, ay, dx, dy, COL_MENUCONTENT_PLUS_0, RADIUS_SMALL); + } + int icon_dx=0, icon_dy=0; + getIconSize(NEUTRINO_ICON_BUTTON_MUTE, &icon_dx, &icon_dy); + paintIcon(NEUTRINO_ICON_BUTTON_MUTE, ax+((dx-icon_dx)/2), ay+((dy-icon_dy)/2)); + } + else + paintBackgroundBoxRel(ax, ay, dx, dy); +} diff --git a/src/driver/framebuffer.h b/src/driver/framebuffer.h index c042c4d01..1ceb61441 100644 --- a/src/driver/framebuffer.h +++ b/src/driver/framebuffer.h @@ -221,6 +221,7 @@ class CFrameBuffer void displayRGB(unsigned char *rgbbuff, int x_size, int y_size, int x_pan, int y_pan, int x_offs, int y_offs, bool clearfb = true, int transp = 0xFF); void blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp = 0, uint32_t yp = 0, bool transp = false); bool blitToPrimary(unsigned int * data, int dx, int dy, int sw, int sh); + void paintMuteIcon(bool paint, int ax, int ay, int dx, int dy, bool paintFrame=true); };