mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 00:41:17 +02:00
CComponentsPicture: add member function paintPicture()
compact calling in paint()
This commit is contained in:
@@ -167,23 +167,29 @@ void CComponentsPicture::initVarPicture()
|
||||
height = max(max(pic_height, pic_max_h), height) + sw ;
|
||||
}
|
||||
|
||||
void CComponentsPicture::paint(bool do_save_bg)
|
||||
void CComponentsPicture::paintPicture()
|
||||
{
|
||||
initVarPicture();
|
||||
paintInit(do_save_bg);
|
||||
pic_painted = false;
|
||||
|
||||
|
||||
if (do_paint){
|
||||
#ifdef DEBUG_CC
|
||||
printf(" [CComponentsPicture] %s: paint image: %s (do_paint=%d)\n", __FUNCTION__, pic_name.c_str(), do_paint);
|
||||
#endif
|
||||
|
||||
if (do_paint){
|
||||
if (pic_paint_mode == CC_PIC_IMAGE_MODE_OFF)
|
||||
pic_painted = frameBuffer->paintIcon(pic_name, pic_x, pic_y, 0 /*pic_max_h*/, pic_offset, pic_paint, pic_paintBg, col_body);
|
||||
else if (pic_paint_mode == CC_PIC_IMAGE_MODE_ON)
|
||||
pic_painted = g_PicViewer->DisplayImage(pic_name, pic_x, pic_y, pic_width, pic_height);
|
||||
do_paint = false;
|
||||
}
|
||||
|
||||
if (pic_painted)
|
||||
do_paint = false;
|
||||
}
|
||||
|
||||
void CComponentsPicture::paint(bool do_save_bg)
|
||||
{
|
||||
initVarPicture();
|
||||
paintInit(do_save_bg);
|
||||
paintPicture();
|
||||
}
|
||||
|
||||
void CComponentsPicture::hide(bool no_restore)
|
||||
|
Reference in New Issue
Block a user