Jump to content


Photo

How to make ananalog clock in the skin


  • Please log in to reply
48 replies to this topic

#1 Loui (PD1LOI)

  • Senior Member
  • 4,544 posts

+140
Excellent

Posted 13 December 2012 - 17:44

Ik gebruik OpenPli HD skin maar natuurlijk ook die ikzelf heb aangepast nu wil ik er eigenlijk een anologe klok in bouwen, maar hoe doe ik zoiets.

Re: How to make ananalog clock in the skin #2 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 13 December 2012 - 17:59

daarvoor zal je een stukje c++ moeten schrijven (lib/gui/) wat cirkels en lijnen kan tekenen, en een python renderer er omheen, die je vervolgens in de skin kunt gebruiken.
(cirkel kan je eventueel nog laten zitten, door een ronde png als achtergrond te gebruiken)

Re: How to make ananalog clock in the skin #3 Loui (PD1LOI)

  • Senior Member
  • 4,544 posts

+140
Excellent

Posted 13 December 2012 - 18:13

Oke dat doe ik nou niet zo snel als ik het zo hoor, toch te ingewikkeld voor mij helaas.

Re: How to make ananalog clock in the skin #4 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 13 December 2012 - 19:02

ja, en voor mij net iets teveel werk om ff snel tussendoor te doen ;)

Re: How to make ananalog clock in the skin #5 mirakels

  • Forum Moderator
    PLi® Core member
  • 7,602 posts

+62
Good

Posted 13 December 2012 - 19:18

hadden we die niet in enigma1 zitten (een cirkel widget bedoel ik dus) . Ik dacht dat ik dat zelf ooit had gemaakt. Iets met gauge widget of zo...

Misschien kan Loui dat als basis gebruiken om het multifuctioneel te maken waar dan makkelijk een klok van te maken is...
Geen wonder... Had slechts een dm7000, maar wel ook een rotor. eigenlijk al een tijdje ook een dm600 en dm7025. Maar nu kijkend met een et9000 en vuduo

Re: How to make ananalog clock in the skin #6 blzr

  • PLi® Core member
  • 2,269 posts

+118
Excellent

Posted 13 December 2012 - 20:38

FWIW
analog clock could be displayed (on Open PLi) using @shamann's Watches renderer and ExtraNumText converter (see attachment), both GPLed
(and of course you'll need some clock face png...)
in custom-patched skin I use, code for it looks something like this:
<ePixmap pixmap="/usr/share/enigma2/brt_skin/clock_b.png" position="1068, 619" zPosition="1" size="72,65" alphatest="on" />
<widget source="global.CurrentTime" render="Watches" position="1075,620" size="62,62" zPosition="2" alphatest="on" foregroundColor="red">
	 <convert type="ExtraNumText">secHand</convert>
</widget>
<widget source="global.CurrentTime" render="Watches" position="1075,620" size="62,62" zPosition="4" foregroundColor="white" alphatest="on">
	 <convert type="ExtraNumText">minHand</convert>
</widget>
<widget source="global.CurrentTime" render="Watches" position="1086,631" size="40,40" zPosition="3" foregroundColor="white" alphatest="on">
	 <convert type="ExtraNumText">hourHand</convert>
</widget>
maybe one (with python skills) could use these sources as a basis for some OpenPLi's own component(s) /?/

//and btw, I'm still a bit confused - am I allowed to answer in English in a Dutch started thread, in this dual-language section or not? ;)

Attached Files


True sarcasm doesn't need green font...

Re: How to make ananalog clock in the skin #7 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 13 December 2012 - 21:23

In this case you are allowed to answer in English ;)
Indeed, that would work.
Though porting our eGauge would still be a good idea, as that would avoid the expensive per-pixel fillRect, which the Watches renderer is using.
fillRect uses hardware acceleration, so this means one seperate dma transfer for each pixel being drawn ;)

Re: How to make ananalog clock in the skin #8 blzr

  • PLi® Core member
  • 2,269 posts

+118
Excellent

Posted 13 December 2012 - 21:44

In this case you are allowed to answer in English ;)

Whew! thank goodness... :P

...as that would avoid the expensive per-pixel fillRect, which the Watches renderer is using.
fillRect uses hardware acceleration, so this means one seperate dma transfer for each pixel being drawn ;)

well, I somehow/?/ suspected it's not the most effective-use-of-resources solution...

Though porting our eGauge would still be a good idea...

so, anybody? ;)
True sarcasm doesn't need green font...

Re: How to make ananalog clock in the skin #9 Loui (PD1LOI)

  • Senior Member
  • 4,544 posts

+140
Excellent

Posted 14 December 2012 - 08:36

Ik heb de clock in mijn skin maar nu zitten er nog geen wijzers op die met de tijd meelopen. Moet ik de inhoud van Watches_Extranumtext.tar.gz nog ergens plaatsen? Ik probeer een beetje inzicht te krijgen in het systeem hoe zoiets werkt.

Re: How to make ananalog clock in the skin #10 Loui (PD1LOI)

  • Senior Member
  • 4,544 posts

+140
Excellent

Posted 14 December 2012 - 08:48

Ik heb de clock in mijn skin maar nu zitten er nog geen wijzers op die met de tijd meelopen. Moet ik de inhoud van Watches_Extranumtext.tar.gz nog ergens plaatsen? Ik probeer een beetje inzicht te krijgen in het systeem hoe zoiets werkt.

Attached File  screenshot.jpg   103.13KB   154 downloadsHet is nog wat rommelig maar daar wordt aan gewerkt.

Edited by Loui (PD1LOI), 14 December 2012 - 08:49.


Re: How to make ananalog clock in the skin #11 MiLo

  • PLi® Core member
  • 14,052 posts

+298
Excellent

Posted 14 December 2012 - 14:42

Though porting our eGauge would still be a good idea, as that would avoid the expensive per-pixel fillRect, which the Watches renderer is using.
fillRect uses hardware acceleration, so this means one seperate dma transfer for each pixel being drawn ;)


A circular egauge would also be nice for the progress in the movie selection list. It's using PNG files now.


BTW, you could make an analog clock with 60 PNG images (or 120 if you use a different hour hand).
Real musicians never die - they just decompose

Re: How to make ananalog clock in the skin #12 Loui (PD1LOI)

  • Senior Member
  • 4,544 posts

+140
Excellent

Posted 14 December 2012 - 17:02

I have the clock in my skin but now there are no pointers on that with the time flow. Do I need the contents of Watches_Extranumtext. tar.gz still places somewhere? I try to get a little insight in the system how something works

Re: How to make ananalog clock in the skin #13 blzr

  • PLi® Core member
  • 2,269 posts

+118
Excellent

Posted 15 December 2012 - 08:03

if you'l like to display analog clock using above watches/extranumtext:
- put Watches.py in /usr/lib/enigma2/python/Components/Renderer
- put ExtraNumText.py in /usr/lib/enigma2/python/Components/Converter
- add necessary code to your skin.xml in Infobar/Secondinfobar screen(s);
above you have example, there are three widgets, one for each clock hand;
of course you need to adjust (through trial and error ;)) size/position of them to your skin
True sarcasm doesn't need green font...

Re: How to make ananalog clock in the skin #14 littlesat

  • PLi® Core member
  • 56,616 posts

+694
Excellent

Posted 15 December 2012 - 09:38

As you can see you need to add a lot of extra code in your skin to make this work... In addition how it is implemented it only eats performance.
When you do it, you only do it because you like to see one... not for any added value...

To do it correctly someone needs to adapt out egauge code into E1, once we made in a very past for E2 as far I understood. Then it also does not eat performance...
We only need that someone...

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: How to make ananalog clock in the skin #15 Dimitrij

  • PLi® Core member
  • 10,093 posts

+343
Excellent

Posted 15 December 2012 - 11:19

permanentclock mod

Maybe someone will be interested.
On the choice of analog or digital clock.

GigaBlue UHD Quad 4K /Lunix3-4K/Solo 4K


Re: How to make ananalog clock in the skin #16 Loui (PD1LOI)

  • Senior Member
  • 4,544 posts

+140
Excellent

Posted 15 December 2012 - 11:54

if you'l like to display analog clock using above watches/extranumtext:
- put Watches.py in /usr/lib/enigma2/python/Components/Renderer
- put ExtraNumText.py in /usr/lib/enigma2/python/Components/Converter
- add necessary code to your skin.xml in Infobar/Secondinfobar screen(s);
above you have example, there are three widgets, one for each clock hand;
of course you need to adjust (through trial and error ;)) size/position of them to your skin


It works, is the only Clock Attached File  clock_b.png   1.66KB   17 downloads image not visible

Here is my Attached File  skins.rar   1.99MB   10 downloads onder construction.

Edited by Loui (PD1LOI), 15 December 2012 - 11:59.


Re: How to make ananalog clock in the skin #17 blzr

  • PLi® Core member
  • 2,269 posts

+118
Excellent

Posted 15 December 2012 - 12:38

I suppose removal of starting slash in the path to your clock face png should help...

<ePixmap pixmap="/Magic-HD-Common/infobar/clock_b.png" position="159,132" zPosition="1" size="60,60" alphatest="on" borderWidth="0" borderColor="secondBG" />


True sarcasm doesn't need green font...

Re: How to make ananalog clock in the skin #18 Loui (PD1LOI)

  • Senior Member
  • 4,544 posts

+140
Excellent

Posted 15 December 2012 - 13:14

I suppose removal of starting slash in the path to your clock face png should help...

<ePixmap pixmap="/Magic-HD-Common/infobar/clock_b.png" position="159,132" zPosition="1" size="60,60" alphatest="on" borderWidth="0" borderColor="secondBG" />


Yes i see it Thanks

Re: How to make ananalog clock in the skin #19 Loui (PD1LOI)

  • Senior Member
  • 4,544 posts

+140
Excellent

Posted 15 December 2012 - 13:51

I suppose removal of starting slash in the path to your clock face png should help...

<ePixmap pixmap="/Magic-HD-Common/infobar/clock_b.png" position="159,132" zPosition="1" size="60,60" alphatest="on" borderWidth="0" borderColor="secondBG" />

Attached File  skins.rar   2.02MB   6 downloads It works in Maimmenu but not in the infobar.

Re: How to make ananalog clock in the skin #20 blzr

  • PLi® Core member
  • 2,269 posts

+118
Excellent

Posted 15 December 2012 - 14:12

well, in skin.xml from your last attachment I can't find any analog clock stuff in Infobar(s) screen, so no surprise it's not displayed there/?/...
True sarcasm doesn't need green font...


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users