It is currently December 4th, 2020, 5:16 am

## Thread for help with the Shape meter

Help with creating, editing & fixing problems with skins
jsmorley
Developer
Posts: 21513
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

### Re: Thread for help with the new Shape meter

balala wrote: October 29th, 2019, 7:40 am Just to simplify a little bit the expression (as Yincognito otherwise already posted), I definitely would rewrite the Shape=Rectangle 1,1,180,([Footer2:Y]+[Footer2:H]),5 | Fill Color 0,0,0,50 | StrokeWidth 2 | Extend StrokeAlpha option as Shape=Rectangle 1,1,180,[Footer2:YH],5 | Fill Color 0,0,0,50 | StrokeWidth 2 | Extend StrokeAlpha. It's practically the same thing, but it's shorter: https://docs.rainmeter.net/manual/variables/section-variables/#XWYH
Yes, I forgot about that new section variable option balala...
balala
Rainmeter Sage
Posts: 11857
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

### Re: Thread for help with the new Shape meter

jsmorley wrote: October 29th, 2019, 12:24 pm Yes, I forgot about that new section variable option balala...
It happens to all of us from time to time.
Yincognito
Posts: 2934
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

### Re: Thread for help with the new Shape meter

balala wrote: October 29th, 2019, 7:40 amJust to simplify a little bit the expression [...]
Yeah, I have to admit I didn't quite get why those [Meter:XW] and [Meter:YH] section variables were introduced in Rainmeter at the beginning (as one could always add X&W and Y&H respectively), but it turns out it helps a lot with simplifying things. If it did simplify things for a single meter (sl23's case), you can imagine how much it simplifies a Max() formula involving all the meters in a skin (assuming one needs the width and height of a skin that includes arbitrarily positioned and sized meters - like those in an animation, for example). The only thing that still complicates a bit calculating the dimensions of a true dynamic shape-based background is the padding, especially when it's not consistent throughout the skin's meters.

It was actually my first time using those section variables...
sl23
Posts: 411
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

### Re: Thread for help with the new Shape meter

Ok thanks for all your help, really appreciate it
And the Tip from balala, I like anything that reduces code! Good for my OCD

As a little note, mathematically, YH should mean YxH not Y+H. Least that's what I learnt!
Yincognito
Posts: 2934
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

### Re: Thread for help with the new Shape meter

sl23 wrote: October 29th, 2019, 2:10 pmAs a little note, mathematically, YH should mean YxH not Y+H. Least that's what I learnt!
jsmorley
Developer
Posts: 21513
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

### Re: Thread for help with the new Shape meter

sl23 wrote: October 29th, 2019, 2:10 pm Ok thanks for all your help, really appreciate it
And the Tip from balala, I like anything that reduces code! Good for my OCD

As a little note, mathematically, YH should mean YxH not Y+H. Least that's what I learnt!
No, it's Y+H...
sl23
Posts: 411
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

### Re: Thread for help with the new Shape meter

jsmorley
Developer
Posts: 21513
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

### Re: Thread for help with the new Shape meter

sl23 wrote: October 29th, 2019, 2:49 pm I think you'll find I'm right
Oh sorry, I see what you are saying. No, that is not a "mathematical formula" in any sense of the word, but a "function" that we have implemented to combine the value of X and the value of W or the value of Y and the value of H. It is simply shorthand for X+W or Y+H.
sl23
Posts: 411
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

### Re: Thread for help with the new Shape meter

Ok, so it's used differently in programming? Or just Rainmeter? Which only works traditionally if used in a calc?

Just to make things more confusing
balala
Rainmeter Sage
Posts: 11857
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

### Re: Thread for help with the new Shape meter

sl23 wrote: October 29th, 2019, 2:57 pm Just to make things more confusing
No, it's not confusing at all. What jsmorley said is ok. [MyMeter:YH] means the vertical position of the meter, plus its height. This way you get the "end" (the coordinate of the lower edge) of the meter.
Mu multiplication.