Mino_el_Nukenin wrote: ↑May 12th, 2020, 10:54 pmOkay, i'm getting to understand it better. With a schematic, i'm not gonna lie, it's way more easy to understand.
Yeah, well, that's why they say that an image is worth a thousand words...
Mino_el_Nukenin wrote: ↑May 12th, 2020, 10:54 pmNot sure I got the angle part, since every new shape will be relative to the precedent, with just some pixels in between.
Ok, I'll spare you of the effort (again, LOL), and just serve you everything on a plate (just cause I'm such a nice guy and I like your projects visually, don't get it to your head...
).
The code - it's not as complicated as the mix of variables and formulas make it look like:
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
[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
Preview:
Circle & Arc.jpg
Ellipse & Arc.jpg
I only had to hack a little formula to take care of the arc's sweep direction, as I wanted it included in the whole thing and make everything "customizable". And yes, it works even if you set the arc radius to less, or if you want to change the sweep direction, or if you set other ellipse/arc stroke widths, or if you change the angles, or if you want the arc to "touch" an actual ellipse instead of a circle, or if you ... well, you get the point, LMAO. Just set everything from the variables and the rest will adapt to it.
You do not have the required permissions to view the files attached to this post.