Yes I briefly saw this one method before starting with shape. But it need a value. Here it's juste visual it won't use any data from the OS... so I though it wasn't the rigth method.Yincognito wrote: ↑May 12th, 2020, 11:37 pm By the way, I knew this can be done easier ... if I'm not mistaken, this can be done using Roundline meters as well.
It is currently April 18th, 2024, 2:50 am
Help: Switching wallpapers with a button
-
- Posts: 231
- Joined: April 24th, 2020, 7:39 pm
- Location: France
Re: Help: Switching wallpapers with a button
-
- Rainmeter Sage
- Posts: 7120
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Help: Switching wallpapers with a button
Yep - here it is the Roundline equivalent. I set a different color and a smaller "width" / thickness of the arc - actually, part of the "line" parameters in this case - (the -#ArcStrokeW#/2, which should have been -#ArcStrokeW#), so you can see all the meters involved. So yeah, it can be done easier using Roundline (don't know how I could miss this when initially replying, guess the music factor stroke again, LOL) ... but the drawback is that you're limited to an actual circle (and not a "free-form" ellipse).Mino_el_Nukenin wrote: ↑May 12th, 2020, 11:42 pm Yes I briefly saw this one method before starting with shape. But it need a value. Here it's juste visual it won't use any data from the OS... so I though it wasn't the rigth method.
The code (I let the rest just for comparison):
Code: Select all
[Variables]
EllipseFillColor=0,0,0,255
EllipseStrokeColor=255,255,255,255
ArcStrokeColor=255,0,0,255
EllipseStrokeW=2
EllipseCenterX=90
EllipseCenterY=90
EllipseRadiusX=89
EllipseRadiusY=89
ArcStrokeW=15
ArcCenterX=(#EllipseCenterX#)
ArcCenterY=(#EllipseCenterY#)
ArcRadiusX=(#EllipseRadiusX#-#EllipseStrokeW#/2-#ArcStrokeW#/2)
ArcRadiusY=(#EllipseRadiusY#-#EllipseStrokeW#/2-#ArcStrokeW#/2)
ArcAngleStart=60
ArcAngleEnd=240
ArcSweepDirection=1
RoundlineColor=0,0,255,255
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
---Meters---
[MeterShapes]
Meter=Shape
Shape=Ellipse #EllipseCenterX#,#EllipseCenterY#,#EllipseRadiusX#,#EllipseRadiusY# | Fill Color #EllipseFillColor# | StrokeWidth #EllipseStrokeW# | Stroke Color #EllipseStrokeColor#
Shape2=Arc (#ArcCenterX#+#ArcRadiusX#*Cos(Rad(#ArcAngleStart#))),(#ArcCenterY#+(1-2*#ArcSweepDirection#)*#ArcRadiusY#*Sin(Rad(#ArcAngleStart#))),(#ArcCenterX#+#ArcRadiusX#*Cos(Rad(#ArcAngleEnd#))),(#ArcCenterY#+(1-2*#ArcSweepDirection#)*#ArcRadiusY#*Sin(Rad(#ArcAngleEnd#))),#ArcRadiusX#,#ArcRadiusY#,360,#ArcSweepDirection#,0,0 | StrokeWidth #ArcStrokeW# | Stroke Color #ArcStrokeColor#
AntiAlias=1
[MeterRoundline]
Meter=Roundline
X=(#EllipseStrokeW#)r
Y=(#EllipseStrokeW#)r
W=(#EllipseRadiusX#*2-#EllipseStrokeW#)
H=(#EllipseRadiusY#*2-#EllipseStrokeW#)
LineColor=#RoundlineColor#
StartAngle=(Rad(-60))
RotationAngle=(Rad(-180))
LineStart=(#EllipseRadiusX#-#EllipseStrokeW#/2-#ArcStrokeW#/2)
LineLength=(#EllipseRadiusX#-#EllipseStrokeW#/2)
Solid=1
AntiAlias=1
You do not have the required permissions to view the files attached to this post.
-
- Posts: 231
- Joined: April 24th, 2020, 7:39 pm
- Location: France
Re: Help: Switching wallpapers with a button
Wow that's nice !Yincognito wrote: ↑May 13th, 2020, 12:19 am Yep - here it is the Roundline equivalent. I set a different color and a smaller "width" / thickness of the arc - actually, part of the "line" parameters in this case - (the -#ArcStrokeW#/2, which should have been -#ArcStrokeW#), so you can see all the meters involved. So yeah, it can be done easier using Roundline (don't know how I could miss this when initially replying, guess the music factor stroke again, LOL) ... but the drawback is that you're limited to an actual circle (and not a "free-form" ellipse).
Another difference here: the "rotation angle" is not absolute (i.e. 240 like in the other case), but rather the "length" of the arc in degrees from the starting angle onwards (i.e. 180). The values are negative since I wanted a counter-clockwise direction, to suit the previous results (the equivalent of the arc sweep direction in the other implementation).
I'll stay with the first code, with the shape, since have already complete the first outer "circle" of arc shapes I want, see the result in image.
Now onto an inner circle of arc !
EDIT : not sure what what variables i should copy and tweak for the inner arc to be "before" the others with a little space in between
EDIT 2 : okay found it, just add ArcRadiusX2=(#EllipseRadiusX#-12)
ArcRadiusY2=(#EllipseRadiusY#-12).
You do not have the required permissions to view the files attached to this post.
-
- Rainmeter Sage
- Posts: 7120
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Help: Switching wallpapers with a button
Yes, that's right.Mino_el_Nukenin wrote: ↑May 13th, 2020, 12:36 amEDIT 2 : okay found it, just add ArcRadiusX2=(#EllipseRadiusX#-12) and ArcRadiusY2=(#EllipseRadiusY#-12).
Well, I'm obviously glad that you stayed with my initial code, but if you don't want an arc for an actual ellipse and you want to understad what you did in the code 6 months from now, a Roundline approach is indeed easier, you just have to modify the angles for same radius stuff, and adjust a bit the line start and length on a different radius. You don't even need the variables, as things are relatively easy to add / subtract / multiply anyway:Mino_el_Nukenin wrote: ↑May 13th, 2020, 12:36 amI'll stay with the first code, with the shape, since have already complete the first outer "circle" of arc shapes I want, see the result in image.
Code: Select all
[MeterRoundline]
Meter=Roundline
X=2r
Y=2r
W=176
H=176
LineColor=0,0,255,255
StartAngle=(Rad(-60))
RotationAngle=(Rad(-180))
LineStart=73
LineLength=88
Solid=1
AntiAlias=1
88 = 89 - 1 = 89 - 2/2 = circle radius - half the circle's stroke width
176 = 2 * 89 - 2 = 2 * circle radius - circle's stroke width = 2 * line length = basically the diameter, including the arc's stroke
73 = 88 - 15 = 88 - arc's stroke width
Last edited by Yincognito on May 13th, 2020, 1:41 am, edited 1 time in total.
-
- Posts: 231
- Joined: April 24th, 2020, 7:39 pm
- Location: France
Re: Help: Switching wallpapers with a button
Yeah I see, maybe I'll use it for not so complicate visual on another I have in mind.Yincognito wrote: ↑May 13th, 2020, 1:32 am Well, I'm obviously glad that you stayed with my initial code, but if you don't want an arc for an actual ellipse and you want to understad what you did in the code 6 months from now, a Roundline approach is indeed easier, you just have to modify the angles for same radius stuff, and adjust a bit the line start and length on a different radius. You don't even need the variables, as things are relatively easy to add / subtract / multiply subtract anyway:
2r = refers to the circle's stroke width, assuming the meter is positioned relative to the top left corner of the circle meter
88 = 89 - 1 = 89 - 2/2 = circle radius - half the circle's stroke width
176 = 2 * 89 - 2 = 2 * circle radius - circle's stroke width = 2 * line length = basically the diameter, including the arc's stroke
73 = 88 - 15 = 88 - arc's stroke width
-
- Rainmeter Sage
- Posts: 7120
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Help: Switching wallpapers with a button
Mino_el_Nukenin wrote: ↑May 13th, 2020, 1:40 am Yeah I see, maybe I'll use it for not so complicate visual on another I have in mind.
-
- Posts: 231
- Joined: April 24th, 2020, 7:39 pm
- Location: France
Re: Help: Switching wallpapers with a button
Anyaway, next step is adding, some very small rectangles merged with some of the inner arcs to look like they "connect" we the button in the middle.
And then, if possible, have all the outer arcs to rotate clockwise while the inner arcs rotate counter-clockwise.
But that's for another day ! Sleep time for me, I've got lot of work to do first... god d*mned thesis...
And then, if possible, have all the outer arcs to rotate clockwise while the inner arcs rotate counter-clockwise.
But that's for another day ! Sleep time for me, I've got lot of work to do first... god d*mned thesis...
-
- Posts: 231
- Joined: April 24th, 2020, 7:39 pm
- Location: France
Re: Help: Switching wallpapers with a button
I'm trying to have different arc shapes rotating, based on the center of a circle.
I came up with this measure
And then added Rotate [MeasureRotateClockwise],#EllipseCenterX#,#EllipseCenterY# at the end of the shape line code.
But no result.
Not sure what I missed.
I came up with this measure
Code: Select all
[MeasureRotateClockwise]
Measure=Calc
Formula=(MeasureRotateClockwise+1)%360
But no result.
Not sure what I missed.
-
- Posts: 231
- Joined: April 24th, 2020, 7:39 pm
- Location: France
Re: Help: Switching wallpapers with a button
Any help with this rotating problem I have ?
I've modified the measure as one I saw on the forum:
Code: Select all
[MeasureRotate]
Measure=Loop
StartValue=0
EndValue=359
Code: Select all
AnchorX=(#EllipseCenterX#-#ArcCenterX#+#ArcRadiusX#)
AnchorY=(#EllipseCenterY#-#ArcCenterY#+#ArcRadiusY#)
Rotate [MeasureRotate],#AnchorX#,#AnchorY#
-
- Rainmeter Sage
- Posts: 16143
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Help: Switching wallpapers with a button
Have you added a DynamicVariables=1 option to that meter?Mino_el_Nukenin wrote: ↑May 13th, 2020, 7:51 pm And this to the arcs I want to rotate, but nothing :
Rotate [MeasureRotate],#AnchorX#,#AnchorY#