Add paint background to paintIcon() / DisplayImage()

- paint background before display icon in CFrameBuffer::paintIcon()
- paint background before display image in CPictureViewer::DisplayImage()

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2082 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Branch: ni/coolstream
Commit: 6bbef9a0f6
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2012-02-07 (Tue, 07 Feb 2012)

Origin message was:
------------------
* Add paint background to paintIcon() / DisplayImage()

- paint background before display icon in CFrameBuffer::paintIcon()
- paint background before display image in CPictureViewer::DisplayImage()

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2082 e54a6e83-5905-42d5-8d5c-058d10e6a962


------------------
This commit was generated by Migit
This commit is contained in:
Michael Liebmann
2012-02-07 11:12:45 +00:00
parent b610a6975e
commit 1fa4b5cf3f
4 changed files with 21 additions and 4 deletions

View File

@@ -956,7 +956,7 @@ bool CFrameBuffer::blitToPrimary(unsigned int *, int, int, int, int)
if height h is given, center vertically between y and y+h
offset is a color offset (probably only useful with palette) */
bool CFrameBuffer::paintIcon(const std::string & filename, const int x, const int y,
const int h, const unsigned char offset, bool paint)
const int h, const unsigned char offset, bool paint, bool paintBg, const fb_pixel_t colBg)
{
struct rawHeader header;
int width, height;
@@ -1053,6 +1053,8 @@ _display:
if (h != 0)
yy += (h - height) / 2;
if (paintBg)
paintBoxRel(x, yy, width, height, colBg);
blit2FB(data, width, height, x, yy, 0, 0, true);
return true;