mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
framebuffer/pictureviewer: add functions to query icon size
Add infrastructure to query icon size as in tuxbox neutrino.
TODO: those functions are yet to be tested for non-.raw icons ;)
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@44 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Commit: af169c19ff
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2009-12-13 (Sun, 13 Dec 2009)
This commit is contained in:
@@ -443,6 +443,26 @@ printf("logo file: %s\n", fname);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int CPictureViewer::getWidth(const char* name)
|
||||
{
|
||||
int x, y;
|
||||
CFormathandler *fh;
|
||||
fh = fh_getsize(name, &x, &y, INT_MAX, INT_MAX);
|
||||
if (fh == NULL)
|
||||
return -1;
|
||||
return x;
|
||||
}
|
||||
|
||||
int CPictureViewer::getHeight(const char* name)
|
||||
{
|
||||
int x, y;
|
||||
CFormathandler *fh;
|
||||
fh = fh_getsize(name, &x, &y, INT_MAX, INT_MAX);
|
||||
if (fh == NULL)
|
||||
return -1;
|
||||
return y;
|
||||
}
|
||||
|
||||
bool CPictureViewer::DisplayImage (const std::string & name, int posx, int posy, int width, int height)
|
||||
{
|
||||
int x, y;
|
||||
|
Reference in New Issue
Block a user