FreeEMS Issues - Tunix
View Issue Details
0000267TunixGeneral Featurespublic2011-09-22 23:302012-03-30 20:32
Fred 
dandruczyk 
lowminoralways
closedwon't fix 
AllAllAll
 
0.9.240.9.24 
unknown, updating issue to appear in roadmap
0000267: Make Value Display Of Gauges Not Move Dynamically
[12:49] <Cheetah> djandruczyk_home: djandruczyk one minor complaint about the gauges, the numbers move, meaning that when it switches to 2 digits from 3 or any other digit count switch it moves! This makes it really hard to read, esp if its moving quickly and even more especially if its hovering around a switch point,
[12:49] <Cheetah> eg 99 - 101 kpa
[12:49] <Cheetah> or something
[12:49] <Cheetah> even a digit change from x.0 to x.1 fucks it up because the char width is different
[12:50] <Cheetah> like on a real gauge IMO the decimal or base digit centre should stay at a fixed location

SNIP

[14:01] <Cheetah> you have the range
[14:01] <Cheetah> and you have the dp count
[14:01] <Cheetah> so you could centre it at max size and then fix it there
[14:05] <djandruczyk_home> (08:01:59 AM) Cheetah: so you could centre it at max size and then fix it there <- doesn't work
[14:06] <djandruczyk_home> test is ALREADY centered at the x/y coords specified, how3ever the coord specify the "CENTER" of hte text area, such that it scales properly no matter the size. if you define less chars, i belive it'll still shift
[14:06] <djandruczyk_home> i'll look into it though
[14:09] <Cheetah> OK, sure, there might be some dynamic movement of centre or initial calc of left and adjust from there or something, it can work somehow though :-)
[14:09] <djandruczyk_home> Cheetah: the problem is with fonts is NOT ALL chars are the same width
[14:09] <djandruczyk_home> so things'll get clipped
[14:10] <Cheetah> Yeah, you'd have to centre on the decimal with all zeros or something
[14:10] <djandruczyk_home> the way mtx works is as follows:
[14:10] <djandruczyk_home> format the string -> get its dimensions -> move to position -half txt widht /half txt height and render
[14:10] <Cheetah> not centre
[14:10] <djandruczyk_home> message = g_strdup_printf("%.*f", priv->precision,priv->value);
[14:10] <Cheetah> it can definitely be done though
[14:10] <djandruczyk_home> cairo_text_extents (cr, message, &extents);
[14:10] <djandruczyk_home> cairo_move_to
[14:10] <Cheetah> somehow
[14:10] <djandruczyk_home> Not easy
[14:10] <Cheetah> probably less gui cpu usage too
[14:10] <djandruczyk_home> and also mostgauges DO NOT have a decimal point
[14:10] <djandruczyk_home> so not extensible
[14:10] <Cheetah> they have an imaginary one
[14:10] <djandruczyk_home> and a one-off hack
[14:11] <Cheetah> centre on the right board of the first whole number digit
[14:11] <Cheetah> etc
[14:11] <Cheetah> it IS doable, and i dont care much
[14:11] <djandruczyk_home> centering on a odd place like that will skew all rescaling/resizing operations
[14:11] <Cheetah> just a nice polishing point
[14:11] <Cheetah> thats all
[14:11] <Cheetah> true
[14:11] <djandruczyk_home> my buddy always said "you can't polish a turd"
[14:11] <Cheetah> recalc on resize i guess
[14:11] <Cheetah> LOL
[14:11] <Cheetah> true
[14:11] <djandruczyk_home> FUGLY
[14:11] <Cheetah> mtx is NOT a turd, though
[14:11] <djandruczyk_home> HACK
[14:11] <djandruczyk_home> ugly hack at that (decimal point crap)
[14:11] <Cheetah> seems hacky now
[14:11] <Cheetah> its moving all the time
[14:11] <djandruczyk_home> then turn of fthe value display
[14:12] <djandruczyk_home> and jsut use the needle like a "real" gauge
[14:12] <Cheetah> no, me gusta
No tags attached.

Notes
(0000337)
dandruczyk   
2011-09-28 13:47   
Not easily fixable without really ugly hacks, that offer little overall benefit. The best solution would be to turn off the value display text as that's not even present on "real world" gauges.
(0000340)
Fred   
2011-09-28 13:51   
It can stay open as it should be fixed at some point, even if not by you. The point of having issues on such things is to keep track of them, closing them hides the issue.
(0000443)
dandruczyk   
2011-10-23 19:28   
Not fixable. Fonts are variable width and it's not possible to locate the exact position of a decimal point without doing very expensive (slow) extrapolation from each charactor. Normal gauges do NOT have visible values like mtx does, if this bothers you, use the gauge designer to disable the value text section.


Marking as not-fixable
(0000719)
dandruczyk   
2011-11-28 01:56   
same as http://issues.freeems.org/view.php?id=342 [^] . Won't be fixed ever.
(0000721)
Fred   
2011-11-28 01:59   
Reluctantly accepted.