Re: half bars

Markus Dolze <[email protected]> Sun, 27 Jan 2013 13:04:25 +0100
Newsgroups gmane.comp.sysutils.lcdproc
Message-ID <[email protected]>
On 26.01.2013 21:28, Chris Jones wrote:
> Hey folks
>
> Is it possible (or how hard would it be to implement) for hbar/vbar
> widgets to show two values at once (by splitting the bar along its
> main axis).
> I have quite a small LCD and for things like Rx/Tx network traffic,
> it's quite nice to have a long axis for lots of scale, without
> requiring two lines.
>
> (If it's not clear what I mean, take a look at the LAN/DSL bars
> in http://ssl.bulix.org/projects/lcd4linux/attachment/wiki/CoolStuff/dual_display.jpg
> )
>
> (Also I quite like the way they are able to draw a border around the
> bar - is that possible/hard in lcdproc?)
>
> Cheers,
>
> Chris Jones
>    [email protected] <mailto:[email protected]>
>     www.tenshu.net <http://www.tenshu.net>
>
>

Hi,

the idea is very nice. These are my thoughts:

Widgets can be 'anywhere'. The may even overlap. During rendering they
are just passed to the driver.

The core does know about all widgets, so it may check for any
overlapping. But bars are rather complicated regarding their length
(there is some weird pixel length calulation in there). Additionally,
there is no interface to the drivers for 'split bars'.

During rendering those widgets are just passed to the driver. In the
case of barsthey key may overlap too. So the driver may check for
overlapping bars. It needs to keep track of any rendered bars, which
currently no driver does (and should not need to).

Additionally it needs a different way of using custom characters.
Currently, all possible bar characters for a bar are loaded to the LCD
if a bar is used. This will not be possible with split bars anymore as
there are too many combinations.

I currently cannot think of way to do this globally for all drivers. At
the end each (or some) driver(s) will have to be modified to make use of
this. And this is something I don not really want to happen.

Regards,
Markus