It is currently June 24th, 2019, 8:21 pm

Thread for help with the new Shape meter

Help with creating, editing & fixing problems with skins
Yincognito
Posts: 652
Joined: February 27th, 2015, 2:38 pm

Re: Thread for help with the new Shape meter

Yincognito » January 15th, 2019, 1:31 am

jsmorley wrote:
January 15th, 2019, 1:19 am
As did William Tell... ;-)
Yep. Apples and lines, always surprising ... especially in Rainmeter :lol: (sorry, couldn't help it).
User avatar
qwerky
Posts: 180
Joined: April 10th, 2014, 12:31 am
Location: Canada

Re: Thread for help with the new Shape meter

qwerky » January 15th, 2019, 1:44 am

Excellent, thank you! :rosegift: One could mention that vector graphics are in use, but it is great as is. :great:
Yincognito
Posts: 652
Joined: February 27th, 2015, 2:38 pm

Re: Thread for help with the new Shape meter

Yincognito » January 15th, 2019, 2:24 am

qwerky wrote:
January 15th, 2019, 1:44 am
Excellent, thank you! :rosegift: One could mention that vector graphics are in use, but it is great as is. :great:
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.
User avatar
Behrooz
Posts: 2
Joined: February 3rd, 2019, 12:23 pm

Re: Thread for help with the new Shape meter

Behrooz » May 25th, 2019, 9:58 pm

Hello
I have been working on an animated Rainmeter Logo 8-) . 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.

Image
Image

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

User avatar
Behrooz
Posts: 2
Joined: February 3rd, 2019, 12:23 pm

Re: Thread for help with the new Shape meter

Behrooz » May 28th, 2019, 3:45 pm

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