mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user