It is currently April 19th, 2024, 11:29 am

Thread for help with the Shape meter

Get help with creating, editing & fixing problems with skins
User avatar
Yincognito
Rainmeter Sage
Posts: 7125
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Thread for help with the Shape meter

Post by Yincognito »

Jeff wrote: October 19th, 2022, 7:52 pm I just noticed FillColor and Fill Color (with a space) do the same thing, can't find anything about it on the docs, I guess it's just a harmless parsing error that ends up resolving itself
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... :D
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
DudeGuy11
Posts: 6
Joined: February 20th, 2023, 10:17 pm

Re: Thread for help with the Shape meter

Post by DudeGuy11 »

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

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]
User avatar
Yincognito
Rainmeter Sage
Posts: 7125
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Thread for help with the Shape meter

Post by Yincognito »

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.
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:

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
You need to add and subtract half of the stroke width when it comes to the rectangle coordinates because the stroke / border is drawn from its middle towards its margin so it should be a bit inwards to avoid clipping parts of it. Also, in the code you posted the meter type was wrong (it's a shape, not an image in this case) and the solid color didn't act on the shape at all, other than providing a general fill for the meter. Of course, you can adjust the dimensions of the rectangle to your liking.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
DudeGuy11
Posts: 6
Joined: February 20th, 2023, 10:17 pm

Re: Thread for help with the Shape meter

Post by DudeGuy11 »

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.
DudeGuy11
Posts: 6
Joined: February 20th, 2023, 10:17 pm

Re: Thread for help with the Shape meter

Post by DudeGuy11 »

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
User avatar
Yincognito
Rainmeter Sage
Posts: 7125
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Thread for help with the Shape meter

Post by Yincognito »

DudeGuy11 wrote: February 20th, 2023, 11:50 pmWow thank you Yincognito , so the parameter that affects the thickness of the border is, strokewidth?
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
So now the formula stays the same since it references the static #Thickness# variable, and you can play all you want with the value declared at the top, the coordinates below will adjust accordingly. You can approach this similarly in the case of the dimensions or whatever, if you need to.
DudeGuy11 wrote: February 21st, 2023, 12:10 am 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?
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.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
DudeGuy11
Posts: 6
Joined: February 20th, 2023, 10:17 pm

Re: Thread for help with the Shape meter

Post by DudeGuy11 »

Alright, ima take a look at that, thanks again for the very detailed and massively helpful reply.