It is currently April 26th, 2024, 7:14 am

Need help creating a shape.

Get help with creating, editing & fixing problems with skins
DudeGuy11
Posts: 6
Joined: February 20th, 2023, 10:17 pm

Need help creating a shape.

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

Re: Need help creating a shape.

Post by DudeGuy11 »

I added the Shape=Rectangle 0,0,245,140,20 myself but it didnt change much of anything, sorry im a noob
User avatar
balala
Rainmeter Sage
Posts: 16172
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Need help creating a shape.

Post by balala »

DudeGuy11 wrote: February 20th, 2023, 10:24 pm 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.
An Image meter ([MeterMyImage] is such a meter), doesn't accept a Shape option. This option can be used only on Shape meters. Accordingly I doubt to be honest you get a full square with the posted code. To get this, you have to modify the meter accordingly. For instance this way:

Code: Select all

[Variables]
BackgroundColor=0,0,0,0
StroleColor=255,0,0
StrokeWidth=4

[MeterMyImage]
Meter=Shape
Shape=Rectangle 0,0,245,140,20 | Extend MyModifiers1, MyModifiers2, MyModifiers3
MyModifiers1=Fill Color #BackgroundColor#
MyModifiers2=StrokeWidth #StrokeWidth#
MyModifiers3=Stroke Color #StroleColor#
X=2
Y=2
;W=2000
;H=2000
;SolidColor=[MeasureMyColor]
DynamicVariables=1
Note the followings:
  • The BackgroundColor, StrokeColor and StrokeWidth variables (set in the [Variables] section) are controlling the color of the rectangle, respectively the color and width of its border. The added colors are just for the example.
  • If you want to have a hollow square, use a transparency of 0 to the BackgroundColor, as I did above. You can use any color, but take care to have the last (fourth) parameter set to 0.
  • I commented out the W, H and SolidColor options of the Shape meter, because the doesn't really make sense on such a type of meter. They can be used, are perfectly valid all of them, but doesn't really make sense.
  • We don't know the code of the ColorRotate.lua file, used into the [MeasureMyColor] measure, but don1t think it is important for us.
  • Take care to place the meter in a proper position. This means that its position (its X and Y options) have to be large enough not to get the left and upper part of the meter cut off, by going outside of the skin. Their value have to be at least half of the value of the StrokeWidth variable.
Please try out this code and let me know if this is what you want