It is currently March 28th, 2024, 11:44 am

[Suggestion] Change "Line+AntiAlias=0.5px offset" rule

Report bugs with the Rainmeter application and suggest features.
Post Reply
rxtd
Posts: 100
Joined: April 30th, 2017, 11:51 am

[Suggestion] Change "Line+AntiAlias=0.5px offset" rule

Post by rxtd »

Line with antialiasing turned on has half pixel offset to left, and half pixel offset to top.
And while I see that it should be kept for backward compatibility I really don't like it.
Here is some of the issues that I have because of this:
1) If value of a measure is 0 then line looks dim.
2018-08-30_11-55-10.png
I want to have a line of bright, full lit green. I get it without anlialiasing. But with it — the line has a dirty dim color, and there is no way to make it bright.

Code: Select all

[m]
measure=calc
Formula=0

[tm]
meter=image
h=30
w=100
solidcolor=888888

[tl]
meter=line
measurename=m
h=30
w=100
LineColor=00ff00
antialias=0
2) When used with Flip=1 real height of the line is bigger than it's H value.
2018-08-30_11-38-25 (3).png
Grey color shows the bounds of the meter, and the line goes above it's bounds.
Same happens if Flip=0 and a measure has its maximum value.

Code: Select all

[m]
measure=calc
Formula=0

[tm]
meter=image
h=30
w=100
solidcolor=ffffff

[tl]
meter=line
measurename=m
y=1
h=30
w=100
solidcolor=888888
LineColor=00ff0080
antialias=1
flip=1
3) Values of Meter=Line and Meter=Histogram differ in the same pixel
2018-08-30_11-44-32.png
I want to make a plot that is drawn using histogram as a filler and a line as a stroke.
As you see in the picture, I always get black pixels — because line has an half pixel offset.
I can make these black pixels be to the left or to the right of the line but I can't remove them.

Code: Select all

[rainmeter]
update=100

[m]
measure=netin

[tm]
meter=image
h=30
w=100
solidcolor=000000

[t0]
meter=histogram
measurename=m
h=30
w=100
LineColor=00ff0080
antialias=1

[tl]
meter=line
measurename=m
x=1
h=30
w=100
LineColor=00ff0080
antialias=1
4) If I want to hide values of the line that show zero then I need to use something with a 2 pixel height. Which is really inconvenient because a line with one pixel width looks thin, and a line with 2 pixel width does not.

I saw a post from Brian that states that by default D2D draws line using centers of the pixels — just as I want Line meter to behave.
I think that there can be new option for Line, something like "DisableHalfOffset", that makes a meter draw itself, well, without a half pixel offset.
It would be lovely to see this work with hardware acceleration turned off but even if it won't—it will be good to finally have a well drawn Line meter at least with hardware acceleration. Or a meter with this option can be always drawn using D2D.
Post Reply