mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 00:41:09 +02:00
analogclock: Save background for using transparent clock images
Origin commit data
------------------
Branch: ni/coolstream
Commit: 5d04ea65f4
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2016-08-22 (Mon, 22 Aug 2016)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
committed by
vanhofen
parent
e203488ad9
commit
dd5f370fcc
@@ -130,6 +130,7 @@ CInfoViewer::CInfoViewer ()
|
||||
lasttime = 0;
|
||||
aspectRatio = 0;
|
||||
ChanInfoX = 0;
|
||||
analogclock_buf = NULL; //NI
|
||||
Init();
|
||||
infoViewerBB->Init();
|
||||
oldinfo.current_uniqueKey = 0;
|
||||
@@ -177,6 +178,12 @@ void CInfoViewer::Init()
|
||||
|
||||
_livestreamInfo1.clear();
|
||||
_livestreamInfo2.clear();
|
||||
|
||||
//NI
|
||||
if (analogclock_buf) {
|
||||
delete analogclock_buf;
|
||||
analogclock_buf = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2461,11 +2468,17 @@ void CInfoViewer::showAnalogClock(int posx,int posy,int dia)
|
||||
hx = int((dia * 0.6 * cos(hAngleInRad)));
|
||||
hy = int((dia * 0.6 * sin(hAngleInRad)));
|
||||
|
||||
std::string clock_face = ICONSDIR_VAR "/clock_face.png";
|
||||
if (access(clock_face.c_str(), F_OK) != 0)
|
||||
clock_face = ICONSDIR "/clock_face.png";
|
||||
if (analogclock_buf == NULL) {
|
||||
std::string clock_face = ICONSDIR_VAR "/clock_face.png";
|
||||
if (access(clock_face.c_str(), F_OK) != 0)
|
||||
clock_face = ICONSDIR "/clock_face.png";
|
||||
g_PicViewer->DisplayImage(clock_face, posx-dia, posy-dia, 2*dia, 2*dia);
|
||||
|
||||
g_PicViewer->DisplayImage(clock_face, posx-dia, posy-dia, 2*dia, 2*dia);
|
||||
analogclock_buf = new fb_pixel_t[2*dia * 2*dia];
|
||||
frameBuffer->SaveScreen(posx-dia, posy-dia, 2*dia, 2*dia, analogclock_buf);
|
||||
}
|
||||
else
|
||||
frameBuffer->RestoreScreen(posx-dia, posy-dia, 2*dia, 2*dia, analogclock_buf);
|
||||
|
||||
frameBuffer->paintLine(posx,posy,posx+hx,posy+hy,COL_MENUHEAD_TEXT);
|
||||
frameBuffer->paintLine(posx,posy,posx+mx,posy+my,COL_MENUHEAD_TEXT);
|
||||
@@ -2510,6 +2523,12 @@ void CInfoViewer::ResetModules()
|
||||
ResetPB();
|
||||
delete rec; rec = NULL;
|
||||
infoViewerBB->ResetModules();
|
||||
|
||||
//NI
|
||||
if (analogclock_buf) {
|
||||
delete analogclock_buf;
|
||||
analogclock_buf = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
//NI
|
||||
|
Reference in New Issue
Block a user