Thx a lot man - on point answerbalala wrote:See the Shape3 option, which combines the previous two shapes.
The width of the created shape is 200 pixels (the third number in the Rectangle parameter) and its height is 160 pixels (the sum of the second and fourth number of the Rectangle parameter of Shape2 option. I used arbitrary color for stroke.
You have to modify the parameters, to meet your needs. Feel free to ask, if anything isn't clear enough.
It is currently September 20th, 2024, 11:42 am
Thread for help with the Shape meter
-
- Posts: 23
- Joined: October 8th, 2018, 4:38 pm
Re: Thread for help with the new Shape meter
-
- Rainmeter Sage
- Posts: 16564
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
-
- Posts: 172
- Joined: July 8th, 2018, 8:05 pm
Re: Thread for help with the new Shape meter
It can be done also with the shape type "Path", see https://docs.rainmeter.net/manual/meters/shape/#PathSlim08 wrote:Hi, I'm new here and didn't want to open a new topic just because of this.
I already feel pretty stupid for asking but how do I get a shape of a rectangle with just the top corners rounded but the bottom ones still square? My best guess is subtracting one shape from the other with the one that is subtracted having Fill Color 0,0,0,0. I tried finding it on https://docs.rainmeter.net/manual/meters/shape/ or someone who did some skin similar but everything i tried was made with images instead of a shape. Can you pleas point me in the right direction?
-
- Rainmeter Sage
- Posts: 16564
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Thread for help with the new Shape meter
Yes, as usually here also are more solutions to the same question. But an example would be great to indicate what have you thought about. So, for example:brax64 wrote:It can be done also with the shape type "Path",
Code: Select all
[MeterShape]
Meter=Shape
X=1
Y=1
Shape=Path MyPath | StrokeWidth 2 | Stroke Color 46,215,31 | Fill Color 0,0,0,0
MyPath=0,160 | LineTo 0,10 | ArcTo 10,0,10 | LineTo 190,0 | ArcTo 200,10,10 | LineTo 200,160 | ClosePath 1
-
- Posts: 23
- Joined: October 8th, 2018, 4:38 pm
Re: Thread for help with the new Shape meter
I ended up with this
and I'm very pleased with the result - thx again balala
now I'm looking for a way to make the skin auto center on my screen.
I have 3 monitors which have a total resolution of 6400x1080. 1=secondary screen 1920x1080 | 2=primary screen 2560x1080 | 3=secondary screen 1920x1080. The goal would be to auto center it on screen 2. The catch is that I'm trying to make the centering around the "barwidth" parameter which is subject to changes. Do you guys have any idea how I could do that?
Code: Select all
[Rainmeter]
Author=Slim08
AppVersion=v1.0
Update=-1
[Variables]
barwidth=1200
[FrostedGlass]
Measure=Plugin
Plugin=FrostedGlass
Type=Blur
Border=None
[MeterShape]
Meter=Shape
X=0
Y=0
Shape=Rectangle 0,0,#barwidth#,30,7 | Extend MyModifiers1
Shape2=Rectangle 0,10,#barwidth#,30 | Extend MyModifiers1
Shape3=Combine Shape | Union Shape2
Shape4=Rectangle 0,38,#barwidth#,2,0 | Extend MyModifiers2
MyModifiers1=Fill Color 208,209,210,80 | StrokeWidth 0
MyModifiers2=Fill Color 0,0,0,80 | StrokeWidth 0
now I'm looking for a way to make the skin auto center on my screen.
I have 3 monitors which have a total resolution of 6400x1080. 1=secondary screen 1920x1080 | 2=primary screen 2560x1080 | 3=secondary screen 1920x1080. The goal would be to auto center it on screen 2. The catch is that I'm trying to make the centering around the "barwidth" parameter which is subject to changes. Do you guys have any idea how I could do that?
-
- Rainmeter Sage
- Posts: 16564
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Thread for help with the new Shape meter
Add to your code the following two Calc measures:Slim08 wrote:now I'm looking for a way to make the skin auto center on my screen.
Code: Select all
[MeasureX]
Measure=Calc
Formula=(( #SCREENAREAWIDTH# - #CURRENTCONFIGWIDTH# ) / 2 )
DynamicVariables=1
[MeasureY]
Measure=Calc
Formula=(( #SCREENAREAHEIGHT# - #CURRENTCONFIGHEIGHT# ) / 2 )
DynamicVariables=1
I hope this will work. I have one single monitor, so can't test it, but I'm hoping it works.
Additionally two other, not very important observations. These definitely don't prevent the skin to work, but have to tell you that:
- The Author option doesn't belong to the [Rainmeter] section anymore, but to [Metadata]. Yes, once it belonged to [Rainmeter], but not any more.
- The AppVersion option is completely deprecated. Shouldn't have to be used.
-
- Posts: 23
- Joined: October 8th, 2018, 4:38 pm
Re: Thread for help with the new Shape meter
I made a mistake - what I meant to say was auto center on the x axis and on the bottom of the screen on the y axis. My bad. This one is working like intended:
thx again balala
Code: Select all
[Rainmeter]
OnRefreshAction=[!Move "[MeasureX]" "[MeasureY]"]
Update=-1
[Metadata]
Author=Slim08
[Variables]
barwidth=1200
[FrostedGlass]
Measure=Plugin
Plugin=FrostedGlass
Type=Blur
Border=None
[MeterShape]
Meter=Shape
X=0
Y=0
Shape=Rectangle 0,0,#barwidth#,30,7 | Extend MyModifiers1
Shape2=Rectangle 0,10,#barwidth#,30 | Extend MyModifiers1
Shape3=Combine Shape | Union Shape2
Shape4=Rectangle 0,38,#barwidth#,2,0 | Extend MyModifiers2
MyModifiers1=Fill Color 208,209,210,80 | StrokeWidth 0
MyModifiers2=Fill Color 0,0,0,80 | StrokeWidth 0
[MeasureX]
Measure=Calc
Formula=(( #SCREENAREAWIDTH# - #CURRENTCONFIGWIDTH# + 640 ) / 2 )
DynamicVariables=1
[MeasureY]
Measure=Calc
Formula=( #SCREENAREAHEIGHT# - #CURRENTCONFIGHEIGHT# )
DynamicVariables=1
-
- Rainmeter Sage
- Posts: 16564
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Thread for help with the new Shape meter
A question: if you want to center the skin on the X axis (so horizontally), why have you added 640 to the difference, in the Formula option of the [MeasureX] measure?
And a comment: in Formula option of the [MeasureY] measure, instead of #SCREENAREAHEIGHT#, I probably would better use #WORKAREAHEIGHT# (Formula=( #SCREENAREAHEIGHT# - #CURRENTCONFIGHEIGHT# )). If you're working with #SCREENAREAHEIGHT# and the taskbar is in the bottom of the screen, it can hide the skin. But if you're using #WORKAREAHEIGHT#, the skin doesn't go below the taskbar, remaining visible.
And a comment: in Formula option of the [MeasureY] measure, instead of #SCREENAREAHEIGHT#, I probably would better use #WORKAREAHEIGHT# (Formula=( #SCREENAREAHEIGHT# - #CURRENTCONFIGHEIGHT# )). If you're working with #SCREENAREAHEIGHT# and the taskbar is in the bottom of the screen, it can hide the skin. But if you're using #WORKAREAHEIGHT#, the skin doesn't go below the taskbar, remaining visible.
-
- Posts: 23
- Joined: October 8th, 2018, 4:38 pm
Re: Thread for help with the new Shape meter
That's funny
because I want it to go behind the taskbar (mine is transparent and the skin is like a custom one / replacement)And a comment: in Formula option of the [MeasureY] measure, instead of #SCREENAREAHEIGHT#, I probably would better use #WORKAREAHEIGHT# (Formula=( #SCREENAREAHEIGHT# - #CURRENTCONFIGHEIGHT# )). If you're working with #SCREENAREAHEIGHT# and the taskbar is in the bottom of the screen, it can hide the skin. But if you're using #WORKAREAHEIGHT#, the skin doesn't go below the taskbar, remaining visible.
I don't know if it is a bug or I just don't get the logic behind rainmeters calculation but it seems like rainmeter is thinking for some reason that my center screen (2560x1080) is the same resolution then the other two side screens (both 1920x1080). The skin was always a bit off to the left side when I tried your original code til i figured out that it was exactly off by 640 (difference between 2560 and 1920)A question: if you want to center the skin on the X axis (so horizontally), why have you added 640 to the difference, in the Formula option of the [MeasureX] measure?
-
- Rainmeter Sage
- Posts: 16564
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Thread for help with the new Shape meter
In this case it's ok with #SCREENAREAHEIGHT#, I think.Slim08 wrote:because I want it to go behind the taskbar (mine is transparent and the skin is like a custom one / replacement)
Ok, now I understood. Can't add anything smart here, because as I said, I'm using one single monitor, so I don't know what's going on if you have more.Slim08 wrote:I don't know if it is a bug or I just don't get the logic behind rainmeters calculation but it seems like rainmeter is thinking for some reason that my center screen (2560x1080) is the same resolution then the other two side screens (both 1920x1080). The skin was always a bit off to the left side when I tried your original code til i figured out that it was exactly off by 640 (difference between 2560 and 1920)