Yep. Apples and lines, always surprising ... especially in Rainmeter (sorry, couldn't help it).
It is currently March 28th, 2024, 2:34 pm
Thread for help with the Shape meter
- Yincognito
- Rainmeter Sage
- Posts: 7022
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
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.
- Yincognito
- Rainmeter Sage
- Posts: 7022
- 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.
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
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
Re: Thread for help with the new Shape meter
Is there a way to show the stroke on hover? Maybe change StrokeWidth as the mouse hovers/leaves the meter?
- jsmorley
- Developer
- Posts: 22628
- 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]
Re: Thread for help with the new Shape meter
Wow! that was quick!
Thanks.
I looked through the thread and found this:
I actually managed to figure this out and got it to work via this:
But your approach is far simpler, which I will use, thanks very much
Thanks.
I looked through the thread and found this:
Re: Thread for help with the new Shape meter
Hmm... It worked, until I added it to the second meter for another launcher. Which, when hovered changes the first launcher not the second! lol
EDIT: Scrap that, I forgot to add the reference to the variable, sorry!!!
My work in progress (sorry, bit of a mess):
Oh, I also want the Stroke to show only on hover.
EDIT: Scrap that, I forgot to add the reference to the variable, sorry!!!
My work in progress (sorry, bit of a mess):
Re: Thread for help with the new Shape meter
Actually, due to using this as a launcher, each section requires it's own mouse over instruction and variable.
In another skin I used this code as a MeterStyle in order to reduce repetition:
It allowed any text to be highlighted by changing FontColor and return it to it's normal state. Without affecting any other sections.
Is it possible to use a similar instruction for the StrokeWidth?
In another skin I used this code as a MeterStyle in order to reduce repetition:
Is it possible to use a similar instruction for the StrokeWidth?