I think I encountered that behavior too, if I remember correctly. I always forget what's the right way to write it, so I just copy paste that bit from the manual and move on...
It is currently September 19th, 2024, 4:31 pm
Thread for help with the Shape meter
-
- Rainmeter Sage
- Posts: 8179
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Thread for help with the Shape meter
-
- Posts: 6
- Joined: February 20th, 2023, 10:17 pm
Re: Thread for help with the Shape meter
I just found a Rainmeter skin that had exactly the effect I needed but its the wrong shape. Im trying to turn the effect into a hollow square or rectangle, that would act as a thick-ish border for my screen, now its a full square so im trying to figure out how to modify it. Its the skin created by JSMorley.
Thanks to anybody in advance
Thanks to anybody in advance
Code: Select all
[Rainmeter]
Update=50
DynamicWindowSize=1
AccurateText=1
[Metadata]
Name=ColorRotate
Author=JSMorley
Information=Use Lua to rotate through the "Hue" of the HSB color space. The "saturation" and "brightness" can be set to some desired initial value.
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Version=August 25, 2017
[MeasureMyColor]
Measure=Script
ScriptFile=ColorRotate.lua
; MySaturation and MyBrightness can be 0.0 (none) to 1.0 (full)
MySaturation=0.75
MyBrightness=1.0
DynamicVariables=1
[MeterMyImage]
Meter=Image
Shape=Rectangle 0,0,245,140,20
W=2000
H=2000
SolidColor=[MeasureMyColor]
DynamicVariables=1
[MeterMyString]
Meter=String
X=15R
Y=25
FontSize=1
FontWeight=400
FontColor=[MeasureMyColor]
AntiAlias=1
DynamicVariables=1
Text=Color is: [MeasureMyColor]
-
- Rainmeter Sage
- Posts: 8179
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Thread for help with the Shape meter
There are a number of ways you can do it, but I guess the easiest one would be to use a stroke colored with the said effect and have the fill color either partially or completely transparent for your rectangle. Something like this, instead of your MeterMyImage:DudeGuy11 wrote: ↑February 20th, 2023, 10:50 pm I just found a Rainmeter skin that had exactly the effect I needed but its the wrong shape. Im trying to turn the effect into a hollow square or rectangle, that would act as a thick-ish border for my screen, now its a full square so im trying to figure out how to modify it. Its the skin created by JSMorley.
Code: Select all
[MeterMyThickishBorder]
Meter=Shape
Shape=Rectangle (0+10/2),(0+10/2),(1920-10/2),(1080-10/2) | StrokeWidth 10 | Stroke Color [MeasureMyColor] | Fill Color 0,0,0,0
DynamicVariables=1
-
- Posts: 6
- Joined: February 20th, 2023, 10:17 pm
Re: Thread for help with the Shape meter
Wow thank you Yincognito , so the parameter that affects the thickness of the border is, strokewidth? And so now I need to adjust width along with shaping it to my screen so ill just tool around with that.
-
- Posts: 6
- Joined: February 20th, 2023, 10:17 pm
Re: Thread for help with the Shape meter
A side question, would it be possible to split the frame into 4 pieces and have the color rotation rotating at different points for each piece?
Just a curiosity I had.
Thanks again
Just a curiosity I had.
Thanks again
-
- Rainmeter Sage
- Posts: 8179
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Thread for help with the Shape meter
Yes it is, indeed.
In case you didn't know, if you declare a variable called, let's say, Thickness=10 in the related [Variables] section of the skin (create it at the start of the skin), you could set the coordinates formula based on that, so you wouldn't need to modify every occurrence of the thickness value each time you change it - something like:
Code: Select all
[Variables]
Thickness=10
...
...
...
[MeterMyThickishBorder]
Meter=Shape
Shape=Rectangle (0+#Thickness#/2),(0+#Thickness#/2),(1920-#Thickness#/2),(1080-#Thickness#/2) | StrokeWidth #Thickness# | Stroke Color [MeasureMyColor] | Fill Color 0,0,0,0
DynamicVariables=1
Probably. It depends on what you mean by rotating at different points. If it's this skin, I suspect that copy pasting MeasureMyColor under different names and setting various hue and saturation values in each case should do it, assuming you then reference the newly created measures in the Stroke Color parameter of your newly created meters for the rest of the pieces.
-
- Posts: 6
- Joined: February 20th, 2023, 10:17 pm
Re: Thread for help with the Shape meter
Alright, ima take a look at that, thanks again for the very detailed and massively helpful reply.
-
- Posts: 1705
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
Re: Thread for help with the Shape meter
I am wondering if it's possible to use an IfCondition to change the X position of a shape meter, but by specifying only one shape within that shape meter?
eg: If a disk isn't available, the meters to the right move to the left so leaving no gaps, or at least a one or two pixels gap.
Is there a way to Extend the X position the same way you can with FillColor and StrokeWidth/Color?
Thanks
eg: If a disk isn't available, the meters to the right move to the left so leaving no gaps, or at least a one or two pixels gap.
Code: Select all
Shape=Rectangle 0, 0, #BarW#, #BarH# | StrokeWidth 0 | Extend Fill1
Shape2=Rectangle 0, 0, #BarW#, ([m1Used:]/[m1Total:]*#BarH#) | StrokeWidth 0 | Extend Fill2
Shape3=Rectangle 14, 0, #BarW#, #BarH# | StrokeWidth 0 | Extend Fill3
Shape4=Rectangle 14, 0, #BarW#, ([m2Used:]/[m2Total:]*#BarH#) | StrokeWidth 0 | Extend Fill4
Shape5=Rectangle 28, 0, #BarW#, #BarH# | StrokeWidth 0 | Extend Fill5
Shape6=Rectangle 28, 0, #BarW#, ([m3Used:]/[m3Total:]*#BarH#) | StrokeWidth 0 | Extend Fill6
Shape7=Rectangle 42, 0, #BarW#, #BarH# | StrokeWidth 0 | Extend Fill7
Shape8=Rectangle 42, 0, #BarW#, ([m4Used:]/[m4Total:]*#BarH#) | StrokeWidth 0 | Extend Fill8
Shape9=Rectangle 56, 0, #BarW#, #BarH# | StrokeWidth 0 | Extend Fill9
Shape10=Rectangle 56, 0, #BarW#, ([m5Used:]/[m5Total:]*#BarH#) | StrokeWidth 0 | Extend Fill10
Thanks
57686174 77696C6C 6265 77696C6C 6265
-
- Posts: 1705
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
Re: Thread for help with the Shape meter
Found this is the docs:
Not sure if that works the way I wanted though? Or if it's dynamically changeable?Offset Default: 0, 0
Offsets (moves) the shape in the X and / or Y axis some number of positive or negative pixels.
Example: Shape=Rectangle 0,0,100,100 | Offset 10,0
57686174 77696C6C 6265 77696C6C 6265
-
- Rainmeter Sage
- Posts: 8179
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Thread for help with the Shape meter
Why wouldn't it work dynamically the way you wanted? As long as you have DynamicVariables=1 on the meter, and you use some changed variable as one of the parameter for the Offset part, it should work...
P.S. Didn't think of using the offset to move the "hold" values in the other thread, lol. I just computed the rectangle corners in formulas.