It is currently May 27th, 2020, 3:40 am

Thread for help with the Shape meter

Help with creating, editing & fixing problems with skins
prince1142003
Posts: 56
Joined: December 27th, 2011, 12:32 pm

Re: Thread for help with the Shape meter

Post by prince1142003 »

Hi all. I noticed something that seemed a little odd to me when combining shapes with stroke widths.

Code: Select all

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

[.case1]
X=0
Y=5R
H=[#CURRENTSECTION#:W]
Shape=Rectangle 0,0,128,128 | StrokeWidth 0 | Fill Color 255,0,0,255
Shape2=Rectangle 0,0,128,128 | StrokeWidth 0
Shape3=Combine Shape | Intersect Shape2 | Scale ([#CURRENTSECTION#:W]/128),([#CURRENTSECTION#:W]/128),0,0
Shape4=Rectangle 12,12,104,104 | StrokeWidth 0 | Fill Color 0,255,0,255
Shape5=Combine Shape4 | Intersect Shape2 | Scale ([#CURRENTSECTION#:W]/128),([#CURRENTSECTION#:W]/128),0,0
DynamicVariables=1

[.case2]
X=5R
Y=r
Shape4=Rectangle 12,12,104,104 | StrokeWidth 1 | Fill Color 0,255,0,255

[Test1]
Meter=Shape
MeterStyle=.case1
W=64

[Test2]
Meter=Shape
MeterStyle=.case1 | .case2
W=64

[Test3]
Meter=Shape
MeterStyle=.case1
W=128

[Test4]
Meter=Shape
MeterStyle=.case1 | .case2
W=128

[Test5]
Meter=Shape
MeterStyle=.case1
W=256

[Test6]
Meter=Shape
MeterStyle=.case1 | .case2
W=256
This is how the above code is rendering for me:
Stroked Combined Shapes.png
The only difference between the two shapes is that one of the combined shapes for the meter on the right has a StrokeWidth of 1. Is this a bug, or an intended outcome of combining shapes?

I'm using Rainmeter 4.4.0.3348 beta

Edit: Corrected Update from 1 to 1000. Was a mistake, doesn't change the outcome on my end.
You do not have the required permissions to view the files attached to this post.
Last edited by prince1142003 on April 19th, 2020, 10:42 pm, edited 2 times in total.
User avatar
ikarus1969
Posts: 354
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: Thread for help with the Shape meter

Post by ikarus1969 »

So i'm not sure what your expected behavior is in that case?
To me, at first sight, there's nothing wrong with the shapes. But maybe i have overseen something.
User avatar
jsmorley
Developer
Posts: 20650
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Thread for help with the Shape meter

Post by jsmorley »

That is really odd that just the change in StrokeWidth causes that weird offset. And in the 1st and 3rd "sets" but not the "2nd". I think Brian will need to weigh in on this one.
prince1142003
Posts: 56
Joined: December 27th, 2011, 12:32 pm

Re: Thread for help with the Shape meter

Post by prince1142003 »

jsmorley wrote:
April 19th, 2020, 4:30 pm
That is really odd that just the change in StrokeWidth causes that weird offset. And in the 1st and 3rd "sets" but not the "2nd". I think Brian will need to weigh in on this one.
I think it has something to do with the Scale modifier. The 2nd set has a scale that calculates out to 1,1,0,0, and displays correctly. The first and third sets have scales that calculate out to 0.5,0.5,0,0 and 2,2,0,0 respectively and seem to have issues.