It is currently April 18th, 2024, 1:22 am

[BUG?] InlineSetting=Shadow doesn't render in Container

Report bugs with the Rainmeter application and suggest features.
OnyxBlack
Posts: 27
Joined: June 3rd, 2020, 10:06 am

[BUG?] InlineSetting=Shadow doesn't render in Container

Post by OnyxBlack »

Hi,

I was adding InlineSetting=Shadows to my string meters when I noticed some of them weren't showing the shadow effect. Turns out, the only String meters that didn't render the shadow were assigned a container. Here's an example:

Code: Select all

[MeterTempShapeLeft]
Meter=Shape
H=120
W=120
X=10R
Y=10r
ThisPath= 0,0 | LineTo 0,80 | LineTo 120,40 | LineTo 120,0 | ClosePath 1
Shape=Path ThisPath | Fill Color 0,0,0,255

[MeterTempShapeRight]
Meter=Shape
H=120
W=120
X=0r
Y=0r
ThisPath= 120,120 | LineTo 120,40 | LineTo 0,80 | LineTo 0,120 | ClosePath 1
Shape=Path ThisPath | Fill Color 0,0,0,255

[MeterCurrentTemp]
Meter=String
MeasureName=@CurrentTemperature
StringAlign=LeftTop
FontFace=Open Sans Light
FontSize=64
FontColor=FFFFFF
FontWeight=600
InlineSetting=Shadow | 2 | 2 | 3 | 0,0,0,50
X=-5
Y=-24
H=120
W=120
AntiAlias=1
Container=MeterTempShapeLeft

[MeterTodayForecast]
Meter=String
StringAlign=RightBottom
FontFace=Open Sans Light
FontSize=64
FontColor=FFFFFF
FontWeight=600
InlineSetting=Shadow | 2 | 2 | 3 | 0,0,0,50
X=116
Y=155
W=120
H=120
AntiAlias=1
Container=MeterTempShapeRight
When I remove the
Container=
lines, the inline shadow renders normally.

Am I missing something obvious or is this a bug?
I've read elsewhere about shadow issues with dynamic updating and the likes, but this isn't the issue here.
Tried with version 4.3.1 and newest 4.4 beta, no difference.
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [BUG?] InlineSetting=Shadow doesn't render in Container

Post by balala »

OnyxBlack wrote: October 23rd, 2020, 2:39 pm Am I missing something obvious or is this a bug?
No, this is not a bug. The shadows are rendering properly, just i suppose you don't see them. Try to use other colors for the shadows, for instance:

Code: Select all

[MeterCurrentTemp]
...
InlineSetting=Shadow | 2 | 2 | 3 | 250,0,0,255
...

[MeterTodayForecast]
...
InlineSetting=Shadow | 2 | 2 | 3 | 250,250,0,255
...
On [MeterCurrentTemp] this leads to a red, while on [MeterTodayForecast] to a yellow shadow. See that I increased the last, Alpha parameter of the used colors, in order to can see the shadows better.
Now I see both of them, no matter if I'm adding or removing the Container meters.
With the added Container options:
Shadow.png
and without them:
Shadow2.png
They are obviously there, right? Please try replacing the colors and check. Are the shadows visible in such a case?
You do not have the required permissions to view the files attached to this post.
OnyxBlack
Posts: 27
Joined: June 3rd, 2020, 10:06 am

Re: [BUG?] InlineSetting=Shadow doesn't render in Container

Post by OnyxBlack »

Thanks for the reply.
No, this is not a bug. The shadows are rendering properly, just i suppose you don't see them.
No,really, they are not rendering. I have the same shadows on other string meters, and they are showing the shadow (the only difference, as stated, is that those aren't in a container). I tried your shadow setting and it doesn't render either. The reason I need the shadow is so my text doesn't disappear against bright backgrounds, which is what I'm testing with (not a black background, that would be obvious).
As soon as I take out the container setting the shadows appear as expected.
As you can see in the image, every text has a shadow, except the big temperature numbers (those have the container to mask them).
inlineshadow_1.jpg
Interestingly (though I might be seeing things), in your first example image the green shadow on the lower string is cut off near the bottom, do you see that? Might this be significant?
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [BUG?] InlineSetting=Shadow doesn't render in Container

Post by balala »

OnyxBlack wrote: October 23rd, 2020, 10:25 pm As soon as I take out the container setting the shadows appear as expected.
As you can see in the image, every text has a shadow, except the big temperature numbers (those have the container to mask them).
Ok, please pack the whole config and upload it here. Just to can check it, because I find this interesting, but don't know what to say.
OnyxBlack
Posts: 27
Joined: June 3rd, 2020, 10:06 am

Re: [BUG?] InlineSetting=Shadow doesn't render in Container

Post by OnyxBlack »

k, please pack the whole config and upload it here.
Funny timing, I was just about to do that :D.
I tested the issue with a fresh, barebones skin, with just a meter and a container, and the shadow rendered just fine (like your example). This leads me to believe there is some other issue that is unique to my skin, so I've packaged it up for inspection:

SimpleWeather_1.0.rmskin

The problematic meters start at line 44 in SimpleWeather.ini

Note that I apply the shadows here via a MeterStyle, but this has no bearing on the issue.
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [BUG?] InlineSetting=Shadow doesn't render in Container

Post by balala »

OnyxBlack wrote: October 24th, 2020, 12:32 pm I tested the issue with a fresh, barebones skin, with just a meter and a container, and the shadow rendered just fine (like your example). This leads me to believe there is some other issue that is unique to my skin, so I've packaged it up for inspection:


SimpleWeather_1.0.rmskin


The problematic meters start at line 44 in SimpleWeather.ini

Note that I apply the shadows here via a MeterStyle, but this has no bearing on the issue.
Now I have to admit: have no idea what's going on. Probably an admin will be neede here to clarify this. Here, me at least, definitely can't help. Sorry...
OnyxBlack
Posts: 27
Joined: June 3rd, 2020, 10:06 am

Re: [BUG?] InlineSetting=Shadow doesn't render in Container

Post by OnyxBlack »

Were you having the same issue on your end after installing the skin?
User avatar
Yincognito
Rainmeter Sage
Posts: 7120
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: [BUG?] InlineSetting=Shadow doesn't render in Container

Post by Yincognito »

OnyxBlack wrote: October 23rd, 2020, 2:39 pmI've read elsewhere about shadow issues with dynamic updating and the likes, but this isn't the issue here.
The shadow issue while using dynamic variables has been corrected by Brian already, so it can't be an issue anymore (although this might be a side effect of either the original status of that issue or the correction, in some strange way).
OnyxBlack wrote: October 24th, 2020, 12:32 pmI tested the issue with a fresh, barebones skin, with just a meter and a container, and the shadow rendered just fine (like your example). This leads me to believe there is some other issue that is unique to my skin, so I've packaged it up for inspection:

The problematic meters start at line 44 in SimpleWeather.ini
Note that I apply the shadows here via a MeterStyle, but this has no bearing on the issue.
Ok, so this got me curious, thus I oversimplified (read: butchered) your skin to this:

Code: Select all

[Variables]

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1

---Meters---

[ContainerShapeCurrentTemp]
Meter=Shape
X=150
Y=0
Shape=Path ThisPath | StrokeWidth 0 | Stroke Color 255,255,255,255 | Fill Color 255,255,255,255
ThisPath=0,0 | LineTo 0,80 | LineTo 120,40 | LineTo 120,0 | ClosePath 1

[MeterCurrentTemp]
Container=ContainerShapeCurrentTemp
Meter=String
StringAlign=LeftTop
FontFace=Tahoma
FontSize=54
FontColor=255,255,255,255
FontWeight=700
InlineSetting=Shadow | 2 | 2 | 3 | 0,0,0,255
InlinePattern=^(.*)$
AntiAlias=1
Text="9"
This is more or less your code for the big text that you can't draw an inline shadow on. As expected, the issue persists in the above sample ... BUT ... if you decrease the value of container meter's X (try first to 0, then to 100), you'll notice something very interesting: the shadow is in fact entirely drawn for X=0, while it is only partially drawn for X=100:
Simplest Weather - Shadow Test.jpg
This explains what you saw in balala's screenshot, with the cropped shadow and all, because it appears that although the other coordinates (like, say, the position of the contained meter) are adjusted properly when changing the position of the container, the inline shadow is masked as if the coordinates of the container meter stayed at (0,0) instead of being changed to (100,0). You can clearly see that if you further set the X to 110 and then finally to 120 (in this latter case, the X of the container just equalled the width of the shape and the shadow is entirely hidden as it's only drawn up until X = shapewidth = 120).

I believe this is definitely a bug - just not the bug you thought to be. It's interesting, nevertheless. :sly:

Bottom line, the issue happens for other type of shapes as well, and it's probably related to the fact that the coordinates of the masked area of the inline shadow stay at (0,0) and are not consistent with the coordinates of the actual container. In the meantime, I guess you could set the coordinates of your container to (0,0) and correspondingly increase the coordinates of the path points (and also of the contained meter) as a temporary workaround (didn't test it, but it should work, if my reasoning is correct; just tested it and it works).
You do not have the required permissions to view the files attached to this post.
Last edited by Yincognito on October 25th, 2020, 4:23 pm, edited 1 time in total.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
OnyxBlack
Posts: 27
Joined: June 3rd, 2020, 10:06 am

Re: [BUG?] InlineSetting=Shadow doesn't render in Container

Post by OnyxBlack »

Yincognito wrote: ...the inline shadow is masked as if the coordinates of the container meter stayed at (0,0) instead of being changed to (100,0)
Thanks for the insight!
Yincognito wrote: In the meantime, I guess you could set the coordinates of your container to (0,0) and correspondingly increase the coordinates of the path points (and also of the contained meter) as a temporary workaround
So, I've tried that. I set the Container meter to 0,0, shifted the path coordinates, then set the x and y values on the contained meter to absolute values that match where the path is being drawn. Here's the code:

Code: Select all

[MeterShadowStyle]
InlineSetting=Shadow | 2 | 2 | 3 | FF00FFFF

[ContainerShapeCurrentTemp]
Meter=Shape
H=120
W=120
X=0
Y=0
ThisPath= 150,10 | LineTo 150,90 | LineTo 270,50 | LineTo 270,10 | ClosePath 1
Shape=Path ThisPath | FillColor FFFF0099 | StrokeWidth 0

[MeterCurrentTemp]
Meter=String
;MeasureName=@CurrentTemperature
Text=18
MeterStyle=MeterShadowStyle
StringAlign=LeftTop
FontFace=Open Sans Light
FontSize=64
FontColor=FFFFFFFF
FontWeight=600
InlineSetting2=CharacterSpacing | 0 | -4
X=150
Y=-15
H=120
W=120
AntiAlias=1
;Container=ContainerShapeCurrentTemp

[ContainerShapeForecast]
Meter=Shape
H=120
W=120
X=0
Y=0
ThisPath= 150,90 | LineTo 150,130 | LineTo 270,130 | LineTo 270,50 | ClosePath 1
Shape=Path ThisPath | Fill Color 00FFFF99 | StrokeWidth 0

[MeterTodayForecast]
Meter=String
MeterStyle=MeterShadowStyle
Text=20
StringAlign=RightBottom
FontFace=Open Sans Light
FontSize=64
FontColor=FFFFFF
FontWeight=600
InlineSetting2=CharacterSpacing | 0 | -4
X=260
Y=160
W=120
H=120
AntiAlias=1
;Container=ContainerShapeForecast
Everything lines up nice and dandy, however, as soon as I uncomment the Container key, my text vanishes. I assume it's somewhere, just not where it needs to be to be visible within the container mask. I understand its positioning has now changed to being relative to the Container meter, but that one is at 0,0 so nothing should have changed. I tried playing with all sorts of values on the x and y values for the contained meter, nada. Admittedly, I can't entirely wrap my head around rainmeter's positioning logic, especially when it comes to strings that have their StringAlign value set to anything other than LeftTop (e.g. using CenterCenter needs the X shifted to half the width of the meter, but following meters now appear to base the relative positioning (nr, nR) on where ever the actual string's beginning and end is, regardless of the string meter's X or W values are :confused: ).
So while I believe you when you say this fixes my shadow issue, I'm still stuck because I have no clue where the hell my string meters are :D
Yincognito wrote: I believe this is definitely a bug - just not the bug you thought to be.
Good to know, now how do I get the attention of a Dev so this gets looked at? :)
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [BUG?] InlineSetting=Shadow doesn't render in Container

Post by balala »

OnyxBlack wrote: October 24th, 2020, 9:01 pm Were you having the same issue on your end after installing the skin?
Yep, I have.