It is currently September 18th, 2024, 10:39 am

## New Shape Meter

Changes made during the Rainmeter 4.0 beta cycle.
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

### Re: New Shape Meter

Never mind, thanks jsmorley anyway, I found a solution.

I've to admit that I'm starting to love this Shape meter, but, shh... don't tell anyone.

In the meantime, experimenting with it, if it were possible, I would suggest adding a new type of attribute modifier, or a sort of, since I think a "Pattern" is missing.

Something similar to: take a shape, line or path, then repeat it n times spacing it with two parameters for the distance from top (and bottom) and from left (and right).

Code: Select all

``````Shape5=Rectangle 0,0,12,12 | Fill Color 150,150,150,200
Shape6=Rectangle 0,0,220,300 | Pattern myPattern
myPattern=Shape5 | 120 | 5,5``````
...or I'm probably too lazy to repeat a thing n times.
jsmorley
Developer
Posts: 22745
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

### Re: New Shape Meter

The Shape meter is really pretty cool.

test1.gif
You do not have the required permissions to view the files attached to this post.
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

### Re: New Shape Meter

Yes, it's pretty cool.

I don't know if my above suggestion could be considered or not, however I've found a workaround to create a pattern, I'll have to experiment a little.
Yincognito
Rainmeter Sage
Posts: 8171
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

### Re: New Shape Meter

jsmorley wrote: April 21st, 2020, 11:28 pm The Shape meter is really pretty cool.

test1.gif
So I suppose these "cylinders" are closed stroke paths (made of two vertical lines and two arcs at the top and bottom, and filled with gradients) combined with the inversely filled stroked ellipses at the top, right? With the animation made by dynamically changing the length of the vertical lines?

Just curious, since they indeed look so nice...
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
jsmorley
Developer
Posts: 22745
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

### Re: New Shape Meter

Yincognito wrote: April 22nd, 2020, 12:18 pm So I suppose these "cylinders" are closed stroke paths (made of two vertical lines and two arcs at the top and bottom, and filled with gradients) combined with the inversely filled stroked ellipses at the top, right? With the animation made by dynamically changing the length of the vertical lines?

Just curious, since they indeed look so nice...

Code: Select all

``````[Rainmeter]
Update=16
DynamicWindowSize=1
AccurateText=1

[Variables]
DarkBlue=65,138,217,255
LightBlue=220,234,250,255
DarkGreen=70,217,65,255
LightGreen=221,250,220,255
DarkGold=217,197,65,255
LightGold=250,248,220
DarkRed=217,65,65,255
LightRed=250,220,220,255

[MeasureLoop]
Measure=Loop
StartValue=0
EndValue=52
IfCondition=MeasureLoop = 52
IfTrueAction=[!SetOption MeasureLoop InvertMeasure "1"][!UpdateMeasure MeasureLoop]
IfCondition2=MeasureLoop = 0
IfTrueAction2=[!SetOption MeasureLoop InvertMeasure "0"][!UpdateMeasure MeasureLoop]

[MeterCylinder1]
Meter=Shape
X=10
Y=10
MyGradient1=360 | #DarkBlue# ; 0.0 | #LightBlue# ; 1.0
MyGradient2=180 | #DarkBlue# ; 0.0 | #LightBlue# ; 1.0

[MeterCylinder2]
Meter=Shape
X=20R
Y=10
MyGradient1=360 | #DarkGreen# ; 0.0 | #LightGreen# ; 1.0
MyGradient2=180 | #DarkGreen# ; 0.0 | #LightGreen# ; 1.0
DynamicVariables=1

[MeterCylinder3]
Meter=Shape
X=20R
Y=10
MyGradient1=360 | #DarkGold# ; 0.0 | #LightGold# ; 1.0
MyGradient2=180 | #DarkGold# ; 0.0 | #LightGold# ; 1.0
DynamicVariables=1

[MeterCylinder4]
Meter=Shape
X=20R
Y=10
MyGradient1=360 | #DarkRed# ; 0.0 | #LightRed# ; 1.0
MyGradient2=180 | #DarkRed# ; 0.0 | #LightRed# ; 1.0
DynamicVariables=1
``````
But yes, it could be done with LineTo and ArcTo.
jsmorley
Developer
Posts: 22745
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

### Re: New Shape Meter

Code: Select all

``````[Rainmeter]
Update=32
DynamicWindowSize=1
AccurateText=1

[Variables]
ScaleFactor=1.0

[MeasureRotate]
Measure=Loop
StartValue=0
EndValue=359
Increment=3

[MeterSunAndEarth]
Meter=Shape
W=(152 * #ScaleFactor#)
H=(152 * #ScaleFactor#)
X=(52 * #ScaleFactor#)
Y=(52 * #ScaleFactor#)
SunGrad=0,0 | 252,239,151,255 ; 0.0 | 171,43,43,255 ; 1.5
EarthGrad=0,0,-20,-20,30,30 | 200,226,250,255 ; 0.0 | 36,93,145,255 ; 1.0
DynamicVariables=1
TransformationMatrix=#ScaleFactor#;0;0;#ScaleFactor#;0;0

; Rotate degree, (CenterBigX - CenterSmallX + CenterSmallRadiusX), (CenterBigY - CenterSmallY + CenterSmallRadiusY)
; 50 - 110 + 15" = -45

; Remember that TransformmationMatrix does not change the size of the meter, and so DynamicWindowSize won't be effective when you scale up a shape meter with TransformationMatrix. You need to dynamically set the meter size large enough, so DynamicWindowSize can enlarge the overall skin as needed.
``````

test1.gif
You do not have the required permissions to view the files attached to this post.
Yincognito
Rainmeter Sage
Posts: 8171
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

### Re: New Shape Meter

jsmorley wrote: April 22nd, 2020, 12:25 pmBut yes, it could be done with LineTo and ArcTo.
True, but your way is much more elegant and easier. The other demo is nice too.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
jsmorley
Developer
Posts: 22745
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

### Re: New Shape Meter

Yincognito wrote: April 22nd, 2020, 2:48 pm True, but your way is much more elegant and easier. The other demo is nice too.
Seems better today. It was slow indeed yesterday.
Yincognito
Rainmeter Sage
Posts: 8171
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

### Re: New Shape Meter

jsmorley wrote: April 22nd, 2020, 2:52 pm Seems better today. It was slow indeed yesterday.
Understood.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
jsmorley
Developer
Posts: 22745
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

### Re: New Shape Meter

fonpaolo wrote: April 22nd, 2020, 11:39 am I don't know if my above suggestion could be considered or not, however I've found a workaround to create a pattern, I'll have to experiment a little.
I doubt that we would add things that are not part of the normal behavior of the standard vector graphics engine. We are trying to stick pretty close to it, to facilitate using Tools like Inkscape to at least prototype your shape meters, and to keep it as simple as possible, given the relative complexity of vector graphics in general.

I'm not opposed in principle to things that reduce repetitive code, we get those kind of requests all the time. Given our limited resources though, we have to prioritize what we work on.