SilverAzide wrote: ↑August 9th, 2022, 8:57 pmIt appears that the String meter's
InlineSetting=Shadow option is not rendering the shadow quite right when using
TransformationMatrix on the meter. It is acting as if the shadow is being drawn with scaling applied twice or something similar.
[...]
The code to duplicate this is below. Please note what happens if you comment out the
SkinWidth line; the rendering will be correct. This effect also happens when setting the width on the string meter; text will render the shadow incorrectly in proportion to the width as specified by the TransformationMatrix value.
[...]
I don't think this is the fault of
TransformationMatrix or
InlineSetting=Shadow options, which probably both work correctly. The way I see it, the
SkinWidth option is most likely "clamping" the meter / string width to a value less than
TransformationMatrix needs to scale the inline Shadow completely (in other words, less than the meters'
original widths). Also, setting the width of the String meters doesn't produce incomplete shadows if used along a
ClipString=... option (scroll to see the effect on various widths - also, notice how the final visible width is not the one set by the variable, but that value scaled by
TransformationMatrix, which kind of explains why the shadow extended to precisely the same area in your screenshot as well):
Code: Select all
[Variables]
Width=400
[Rainmeter]
AccurateText=1
BackgroundMode=2
DynamicWindowSize=1
SolidColor=88,138,178,255
; SkinWidth=400
MouseScrollUpAction=[!SetVariable Width (Clamp([#Width]+5,5,[#SCREENAREAWIDTH]))][!Update]
MouseScrollDownAction=[!SetVariable Width (Clamp([#Width]-5,5,[#SCREENAREAWIDTH]))][!Update]
[Meter1]
Meter=String
AntiAlias=1
FontColor=255,255,255
FontSize=20
FontWeight=400
InlineSetting=Shadow | 2 | 4 | 3 | 0,0,0
Text="100% Test Test Test Test Test Test Test Test"
X=5
Y=5
W=[#Width]
ClipString=1
DynamicVariables=1
[Meter2]
Meter=String
AntiAlias=1
FontColor=255,255,255
FontSize=30
FontWeight=400
InlineSetting=Shadow | 2 | 4 | 3 | 0,0,0
Text="66% Test Test Test Test Test Test Test Test Test Test Test"
X=0r
Y=60r
W=[#Width]
ClipString=1
TransformationMatrix=0.66;0;0;0.66;0;0
DynamicVariables=1
[Meter3]
Meter=String
AntiAlias=1
FontColor=255,255,255
FontSize=40
FontWeight=400
InlineSetting=Shadow | 2 | 4 | 3 | 0,0,0
Text="50% Test Test Test Test Test Test Test Test Test Test Test"
X=0r
Y=100r
W=[#Width]
ClipString=1
TransformationMatrix=0.50;0;0;0.50;0;0
DynamicVariables=1
One more thing, related to the observations before the code above: if you set
SkinWidth to the largest width of those 3 String meters (roughly 1335 pixels as per my Screen Ruler skin), the inline shadow will be complete on all meters:
Largest String Meter Width.jpg
I guess this is because: a) the width is not clamped to less than that; b) the
original width of the meters, along with the distance to the left side of the skin, is the one used by TransformationMatrix internally, something relatively consistent with the documentation on it.
That being said, if I remember correctly, you use TM extensively in your skins to scale things. It's probably too late and too much work to change the system now, but setting the skin dimensions based on the font face & size being used (via measuring the largest text dimension in the skin using an invisible String meter reference) is less prone to such surprises than doing the reverse and scaling things based on skin dimensions using TMs. Other than that, from a visual point of view, you shouldn't even need to set the skin dimensions since these will adjust to the opaque pixels in your skin anyway when using
DynamicWindowSize=1.
You do not have the required permissions to view the files attached to this post.