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
------------------
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 is contained in:
Michael Liebmann
2012-02-07 11:12:45 +00:00
parent 5bf7eced37
commit 5321c4c754
4 changed files with 21 additions and 4 deletions

View File

@@ -548,12 +548,25 @@ void CPictureViewer::rescaleImageDimensions(int *width, int *height, const int m
}
bool CPictureViewer::DisplayImage (const std::string & name, int posx, int posy, int width, int height)
{
return int_DisplayImage(name, posx, posy, width, height, false);
}
bool CPictureViewer::DisplayImage(const std::string & name, int posx, int posy, int width, int height, const fb_pixel_t colBg)
{
return int_DisplayImage(name, posx, posy, width, height, true, colBg);
}
bool CPictureViewer::int_DisplayImage(const std::string & name, int posx, int posy, int width, int height, bool paintBg, const fb_pixel_t colBg)
{
/* TODO: cache or check for same */
fb_pixel_t * data = getImage(name, width, height);
if(data) {
CFrameBuffer::getInstance()->blit2FB(data, width, height, posx, posy);
CFrameBuffer* frameBuffer = CFrameBuffer::getInstance();
if (paintBg)
frameBuffer->paintBoxRel(posx, posy, width, height, colBg);
frameBuffer->blit2FB(data, width, height, posx, posy);
cs_free_uncached(data);
return true;
}