Open DJViking opened 6 years ago
I've made a fix to the problem with commit 1d7f07c993d37109efcceb091d48e97babbfd9df Could you please give it a try and let me know if this works for you?
It worked better, but there is still a problem with rendering of the needle. It is sometime not shown when it goes from one end to the other with values beyond minValue/maxValue.
The needle was missing on max, mostly only when value was way above maxValue, but not always. Sometime when the value was above max the needle was shown.
value=-3565.1111 (needle shown) value=700.3343 (needle is not shown)
value=244.5433 (needle shown) value=700.3342 (needle is shown)
value=-505.000 (needle is shown) value=700.3343 (needle is not shown)
The same happens in reverse value=700.3343 (needle is shown) value=-700.3343 (needle is not shown)
Hmm...that's interesting...neither with the values from the original issue nor with the values you provided in the last comment the needle will disappear on my mac??? So I always see the needle in the center of the gauge where it should be. Can you provide some information about your environment please?
Also modified the tooltip location a little bit with the last commit
Running OpenSUSE Leap 42.3 KDE Plasma 5 Intel graphics Java 8
I think it was running with the JavaFX software pipeline: -Dprism.order=sw Unsure if gtk3 was enabled or not with -Djdk.gtk.version=3. I have to check when I'm back at work on Monday. Perhaps try with/without either of these settings. Until then I will try running the test application at my home computer tomorrow, where I am running the same Linux distribution, but it has better NVIDIA graphics. I will also try running it with Java 10.
Should the needle be at the center(top) position if the value is outside of minValue/maxValue? I see that the needle is at bottom left side if value is lower than minValue and bottom right side if value is higher than maxValue. When the needle goes from one side to the next it is disappeared.
Ok so I did not test it using the software renderer but it would explain the difference. In case the value is smaller than the min value the needle should stick to the min value and if it is larger than the max value the needle should stick to the max value. This is really strange because like mentioned before I can't reproduce yet but will also try with the software renderer on my other linux system.
I don't think the problem is either the SW or HW renderer. I get same behaviour on either. I built a JAR of Medusa from master branch that contains your latest commits.
With Java 8 the needle was placed on the side of the Gauge and not on the Gauge. What I experienced previously on my work computer was that the needle disappeared. The value labels where in the correct place though at the tip of the needle.
With Java 10 I got the needle to stay in the correct place and not disappear. Though the value labels where no longer placed at the tip of the needle, but all over the place. The gauge was no longer a half circle of 180 degrees. According to the value above maxValue the circle could extend all the way to 360 degrees.
Made some recordings that shows this, attached two both with the es2 HW renderer. First recording: Java 8u172 Second recording: Java 10 recordings.zip
We have seen strange visual anomalies on Gauge with SkinType INDICATOR when the values have been updated constantly with extreme values beyond the minValue/maxValue range.
With setValueVisible(true), the value pops up different places around the Gauge.
We are using the Gauge INDICATOR as an carrier offset meter.
I have populated the test with some of the values we got in our application on Gauge. Example GaugeTest: