My test skin:
Sorry!Brian wrote:Hopefully no more issues with the Line meter.
Also, just to clarify. There is no "GDI vs D2D mode". Rainmeter 4.2 used GDI+ to render a lot of meters (but not all). Rainmeter 4.3 strictly uses D2D only - which can be hardware accelerated or not (which is probably what you meant by GDI+ vs D2D mode).rxtd wrote:... in both GDI and D2D modes.
Yeah, unfortunately anti-aliasing will never be the same with D2D vs GDI+ since the position of their underlying "unit" is different. GDI+ works in whole pixels, while D2D works in DIPs (device independent pixels), with the "starting point" of the unit half way between each pixel. Since we have to mimic GDI+ for backwards compatibility, an offset was added to the line meter in various places which is the reason why things were "slightly" off. We don't adjust anything when drawing with anti-aliasing, we just ask the rendering engine (D2D) to do it for us. So basically, it will be close, but not pixel perfect.rxtd wrote:First could be nitpicking, but with antialiasing the first (most current) pixel is not fully drawn. It's like you draw a line not to a pixel center but with ~0.5 pixel offset. I would not count it as a problem but leftmost and rightmost pixels behave differently.
These rounding issues actually existed in Rainmeter 4.2 and prior, but they have definitely popped up more often with all the tweaking to 4.3 (mostly due to the issues describe above). I adjusted the offset a bit, so hopefully these rounding issues will be to a minimum.rxtd wrote:Second is 100% bug. It's probably linked to some rounding issues.
Without antialiasing the most current pixel sometimes disappears. For me it randomly happens for one update, the majority of time everything is fine.
Good catch, definitely a bug since Rainmeter 4.2 does not do this. Apparently, the issue was with some bounds checking that was not taking the offset into account.rxtd wrote:I'm not really sure if it is a bug or undocumented behavior.
If you feed Line meter with negative values then it is goes beyond it's bounds.
Code: Select all
[Variables] Width=129 Height=30 AA=0 [BackStyle1] X=-1r Y=4R W=#Width# H=#Height# SolidColor=888888 [BackStyle2] X=4R Y=-1r W=#Height# H=#Width# [LineStyle1] MeasureName=Ram X=1r Y=1r W=(#Width# - 2) H=(#Height# - 2) SolidColor=112233AA LineColor=FF00BBAA AntiAlias=#AA# [LineStyle2] W=(#Height# - 2) H=(#Width# - 2) GraphOrientation=Horizontal [Ram] Measure=PhysicalMemory ;Measure=Calc ;Formula=-1 ; Vertical GraphOrientation [Back1] Meter=Image MeterStyle=BackStyle1 X=0 Y=0 [Line1] Meter=Line MeterStyle=LineStyle1 GraphStart=Left Flip=1 [Back2] Meter=Image MeterStyle=BackStyle1 [Line2] Meter=Line MeterStyle=LineStyle1 GraphStart=Left Flip=0 [Back3] Meter=Image MeterStyle=BackStyle1 [Line3] Meter=Line MeterStyle=LineStyle1 GraphStart=Right Flip=1 [Back4] Meter=Image MeterStyle=BackStyle1 [Line4] Meter=Line MeterStyle=LineStyle1 GraphStart=Right Flip=0 ;Horizontal GraphOrientation [Back5] Meter=Image MeterStyle=BackStyle1 | BackStyle2 X=0 Y=4R [Line5] Meter=Line MeterStyle=LineStyle1 | LineStyle2 GraphStart=Left Flip=1 [Back6] Meter=Image MeterStyle=BackStyle1 | BackStyle2 [Line6] Meter=Line MeterStyle=LineStyle1 | LineStyle2 GraphStart=Left Flip=0 [Back7] Meter=Image MeterStyle=BackStyle1 | BackStyle2 [Line7] Meter=Line MeterStyle=LineStyle1 | LineStyle2 GraphStart=Right Flip=1 [Back8] Meter=Image MeterStyle=BackStyle1 | BackStyle2 [Line8] Meter=Line MeterStyle=LineStyle1 | LineStyle2 GraphStart=Right Flip=0
As yourself said, this isn't necessary a disadvantage. I never tried to apply a TransformationMatrix to a Line meter before, but if I'd try it, this is exactly what I'd expect.rxtd wrote: ↑October 14th, 2018, 10:34 am1. When used with behavior in 4.2 and 4.3 differs:
In 4.2 line itself is affected by transformations. If I scale meter, then line is scaled. If I scale meter only in one dimension, line is also scaled in this dimension (which looks horrible). I didn't test it but it's obvious that other transformations also affect line.
In 4.3 only point positions are affected. If I scale line then meter have bigger size, but line itself is still thin.
I actually like this new behavior and don't want it to be changed because transformations in old style often looks bad, and there is no way to have line with consistent width and height if scale for X and Y are not equal. New behavior is really sweet, it is what I would expect from line transformations. But it is still a compatibility issue.
Well, I like it too. And I know that there is LineWidth option.balala wrote: ↑October 14th, 2018, 12:25 pmAs yourself said, this isn't necessary a disadvantage. I never tried to apply a TransformationMatrix to a Line meter before, but if I'd try it, this is exactly what I'd expect.
Plus if you want to increase the width, you can apply a LineWidth option. For example replace the with ([line] meter).
So, I think this is a good and desirable improvement.
I'm not sure this difference would cause any incompatibility. Yes, the Line meters which have applied scaling through TransformationMatrix don't look exactly the same, but in my opinion (at least) this isn't an incompatibility issue.