Yep. Apples and lines, always surprising ... especially in Rainmeter (sorry, couldn't help it).
It is currently September 20th, 2024, 6:36 pm
Thread for help with the Shape meter
-
- Rainmeter Sage
- Posts: 8191
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Thread for help with the new Shape meter
-
- Posts: 207
- Joined: April 10th, 2014, 12:31 am
- Location: Canada
Re: Thread for help with the new Shape meter
Excellent, thank you! One could mention that vector graphics are in use, but it is great as is.
-
- Rainmeter Sage
- Posts: 8191
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Thread for help with the new Shape meter
I would have made it even shorter: inclusive/exclusive and 'required', separated by commas, inside the brackets corresponding to EndX and EndY - but that's just me. Anyway, credits to jsmorley for assessing this and inserting the note there - that's nice to see there are still software where users are listen to, once in a while.
This note will come handy for newcomers in the Rainmeter world or to the Shape meters, as for the already accustomed, it feels natural, since most (if not all) of the meters act pretty much the same way. I only realized that later on, since I was focused on the differences between lines and rectanges in your example, at first.
-
- Posts: 2
- Joined: February 3rd, 2019, 12:23 pm
Re: Thread for help with the new Shape meter
Hello
I have been working on an animated Rainmeter Logo . Specifically I'm trying to "fill color" The Yellow shape or Blue one in this Rainmeter logo. I have problem with adding "Fill Color" to "Combine" shapes or adding "Fill Color" to a "Curve".
Is it possible to define which side of a "Interactive Cubic Bézier Shape" to be filled? Or Is it possible to make a Combined Shape made out of curves so that it can be filled with color?
I appreciate any other suggestion to improve this shape please. I'm a newbie
Thank you.
I have been working on an animated Rainmeter Logo . Specifically I'm trying to "fill color" The Yellow shape or Blue one in this Rainmeter logo. I have problem with adding "Fill Color" to "Combine" shapes or adding "Fill Color" to a "Curve".
Is it possible to define which side of a "Interactive Cubic Bézier Shape" to be filled? Or Is it possible to make a Combined Shape made out of curves so that it can be filled with color?
I appreciate any other suggestion to improve this shape please. I'm a newbie
Thank you.
Code: Select all
[Rainmeter]
Author=Behrooz
Update=-1
[Variables]
Xpoint1=23
Ypoint1=140
Xpoint2=50
Ypoint2=150
Speed=60
inNStep=20
NbyN=3
updateroutin=[!UpdateMeasure MeasureShiftPoints][!UpdateMeter "animation_ready_meter"][!Redraw]
;;====================================================
;; Measures
;;====================================================
[MeasureShiftPoints]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat Addtopoints,#Speed#,#inNStep#
Addtopoints=[!SetVariable Ypoint1 "(Clamp(#Ypoint1#+#NbyN#,100,140))"][!SetVariable Ypoint2 "(Clamp(#Ypoint2#-#NbyN#,150,210))"] [!SetVariable Xpoint2 "(Clamp(#Xpoint2#+#NbyN#,50,80))"]#updateroutin#
ActionList2=Repeat Subtractpoints,#Speed#,#inNStep#
Subtractpoints=[!SetVariable Ypoint1 "(Clamp(#Ypoint1#-#NbyN#,100,140))"][!SetVariable Ypoint2 "(Clamp(#Ypoint2#+#NbyN#,150,210))"] [!SetVariable Xpoint2 "(Clamp(#Xpoint2#-#NbyN#,50,80))"]#updateroutin#
IfCondition=#Ypoint2#<151
IfTrueAction=[!CommandMeasure MeasureShiftPoints "Stop 1"][!CommandMeasure MeasureShiftPoints "Execute 2"]
IfCondition2=#Ypoint2#>209
IfTrueAction2=[!CommandMeasure MeasureShiftPoints "Stop 2"][!CommandMeasure MeasureShiftPoints "Execute 1"]
DynamicVariables=1
;;====================================================
;; Meters
;;====================================================
[Rainmeterlogo]
x=30
y=30
meter=shape
Shape=Curve 67,0,0,156,46,94,0,118 | Extend StrokeDef
Shape2=Curve 67,0,134,156,88,94,134,118 | Extend StrokeDef
Shape3=Arc 0,156,134,156,*,*,*,1,*,0 | Extend StrokeDef
StrokeDef=StrokeWidth 8 | StrokeColor 129,212,222,255 | StrokeStartCap Round | StrokeEndCap Round | fill color 0,0,0,1
[animation_ready_meter]
meter=shape
x=30
y=30
Shape=Curve 23,156,111,156,#Xpoint1#,#Ypoint1#,#Xpoint2#,#Ypoint2# | Extend StrokeDef
Shape2=Arc 23,156,111,156,*,*,*,1,*,0 | Extend StrokeDef
StrokeDef=StrokeWidth 8 | StrokeColor 220,190,34,255 | StrokeStartCap Round | StrokeEndCap Round
DynamicVariables=1
-
- Posts: 2
- Joined: February 3rd, 2019, 12:23 pm
Re: Thread for help with the new Shape meter
My apology. Using CurveTo I could make a closed curvy shape. don't know if it is best way but it seems to work.
Code: Select all
[animation_ready_meter]
meter=shape
x=30
y=30
DynamicVariables=1
Shape = Path Path1 | StrokeWidth 0 | StrokeColor 33,216,207,255 | fill color 24,215,208,255
Path1 = 23, 156 | CurveTo 111,156,#Xpoint1#,#Ypoint1#,#Xpoint2#,#Ypoint2# | CurveTo 67,200,111,180,91,200 | CurveTo 23,156,42,200,23,180 | ClosePath 1
-
- Posts: 1705
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
Re: Thread for help with the new Shape meter
Last edited by sl23 on August 23rd, 2024, 10:52 am, edited 1 time in total.
57686174 77696C6C 6265 77696C6C 6265
-
- Developer
- Posts: 22748
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Thread for help with the new Shape meter
Here are two approaches that are visibly the same...
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
[Variables]
StrokeAlpha=255
StrokeWidth=8
[MeterShape1]
Meter=Shape
Shape=Rectangle 4,4,300,150 | StrokeWidth 8 | Stroke Color 47,47,47,#StrokeAlpha#
DynamicVariables=1
MouseOverAction=[!SetVariable StrokeAlpha "0"][!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetVariable StrokeAlpha "255"][!UpdateMeter *][!Redraw]
[MeterShape2]
Meter=Shape
Y=10R
Shape=Rectangle 4,4,300,150 | StrokeWidth #StrokeWidth# | Stroke Color 47,47,47,255
DynamicVariables=1
MouseOverAction=[!SetVariable StrokeWidth "0"][!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetVariable StrokeWidth "8"][!UpdateMeter *][!Redraw]
-
- Posts: 1705
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
Re: Thread for help with the new Shape meter
Last edited by sl23 on August 23rd, 2024, 10:52 am, edited 1 time in total.
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 new Shape meter
Last edited by sl23 on August 23rd, 2024, 10:52 am, edited 1 time in total.
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 new Shape meter
Last edited by sl23 on August 23rd, 2024, 10:52 am, edited 1 time in total.
57686174 77696C6C 6265 77696C6C 6265