mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +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;
|
lasttime = 0;
|
||||||
aspectRatio = 0;
|
aspectRatio = 0;
|
||||||
ChanInfoX = 0;
|
ChanInfoX = 0;
|
||||||
|
analogclock_buf = NULL; //NI
|
||||||
Init();
|
Init();
|
||||||
infoViewerBB->Init();
|
infoViewerBB->Init();
|
||||||
oldinfo.current_uniqueKey = 0;
|
oldinfo.current_uniqueKey = 0;
|
||||||
@@ -177,6 +178,12 @@ void CInfoViewer::Init()
|
|||||||
|
|
||||||
_livestreamInfo1.clear();
|
_livestreamInfo1.clear();
|
||||||
_livestreamInfo2.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)));
|
hx = int((dia * 0.6 * cos(hAngleInRad)));
|
||||||
hy = int((dia * 0.6 * sin(hAngleInRad)));
|
hy = int((dia * 0.6 * sin(hAngleInRad)));
|
||||||
|
|
||||||
std::string clock_face = ICONSDIR_VAR "/clock_face.png";
|
if (analogclock_buf == NULL) {
|
||||||
if (access(clock_face.c_str(), F_OK) != 0)
|
std::string clock_face = ICONSDIR_VAR "/clock_face.png";
|
||||||
clock_face = ICONSDIR "/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+hx,posy+hy,COL_MENUHEAD_TEXT);
|
||||||
frameBuffer->paintLine(posx,posy,posx+mx,posy+my,COL_MENUHEAD_TEXT);
|
frameBuffer->paintLine(posx,posy,posx+mx,posy+my,COL_MENUHEAD_TEXT);
|
||||||
@@ -2510,6 +2523,12 @@ void CInfoViewer::ResetModules()
|
|||||||
ResetPB();
|
ResetPB();
|
||||||
delete rec; rec = NULL;
|
delete rec; rec = NULL;
|
||||||
infoViewerBB->ResetModules();
|
infoViewerBB->ResetModules();
|
||||||
|
|
||||||
|
//NI
|
||||||
|
if (analogclock_buf) {
|
||||||
|
delete analogclock_buf;
|
||||||
|
analogclock_buf = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//NI
|
//NI
|
||||||
|
@@ -84,6 +84,7 @@ class CInfoViewer
|
|||||||
int numbox_offset;
|
int numbox_offset;
|
||||||
int analogclock_size; //NI
|
int analogclock_size; //NI
|
||||||
int analogclock_offset; //NI
|
int analogclock_offset; //NI
|
||||||
|
fb_pixel_t* analogclock_buf; //NI
|
||||||
|
|
||||||
CSectionsdClient::CurrentNextInfo info_CurrentNext;
|
CSectionsdClient::CurrentNextInfo info_CurrentNext;
|
||||||
CSectionsdClient::CurrentNextInfo oldinfo;
|
CSectionsdClient::CurrentNextInfo oldinfo;
|
||||||
|
Reference in New Issue
Block a user