Here's a general sample that will make an arc of a Shape meter (red color) behave exactly like a Roundline meter (blue color) - no transformation matrix needed:ÞeSheepMan wrote: ↑July 15th, 2024, 9:03 pm This was what I was looking for, but is there anyway to start it at an angle, one the same as what 0 speed on a speedometer would be? An angle at the lower left?
Code: Select all
[Variables]
EllipseFillColor=0,0,0,255
EllipseStrokeColor=255,255,255,255
EllipseStrokeWidth=2
RoundlineColor=0,0,255,255
ArcStrokeColor=255,0,0,255
ArcStrokeWidth=16
ArcCenterX=90
ArcCenterY=90
ArcRadiusX=80
ArcRadiusY=80
ArcStartAngle=330
ArcDirectionAngle=-260
ArcRotationAngle=0
ArcShapeEnding=0
[Rainmeter]
Update=25
DynamicWindowSize=1
AccurateText=1
---Measures---
[Percent]
Measure=Calc
Formula=((Percent+1)%100)
MinValue=0
MaxValue=100
---Meters---
[Ellipse]
Meter=Shape
Shape=Ellipse (#ArcCenterX#),(#ArcCenterY#),(#ArcRadiusX#+#ArcStrokeWidth#/2+#EllipseStrokeWidth#/2),(#ArcRadiusY#+#ArcStrokeWidth#/2+#EllipseStrokeWidth#/2) | Fill Color #EllipseFillColor# | StrokeWidth #EllipseStrokeWidth# | Stroke Color #EllipseStrokeColor#
DynamicVariables=1
[Arc]
Meter=Shape
Shape=Arc (#ArcCenterX#+#ArcRadiusX#*Cos(Rad(#ArcStartAngle#))),(#ArcCenterY#+#ArcRadiusY#*Sin(Rad(#ArcStartAngle#))),(#ArcCenterX#+#ArcRadiusX#*Cos(Rad(#ArcStartAngle#+#ArcDirectionAngle#*[Percent:]/[Percent:MaxValue]))),(#ArcCenterY#+#ArcRadiusY#*Sin(Rad(#ArcStartAngle#+#ArcDirectionAngle#*[Percent:]/[Percent:MaxValue]))),#ArcRadiusX#,#ArcRadiusY#,#ArcRotationAngle#,(#ArcDirectionAngle#<0?1:0),(Abs(#ArcDirectionAngle#*[Percent:]/[Percent:MaxValue])<180?0:1),#ArcShapeEnding# | StrokeWidth #ArcStrokeWidth# | Stroke Color #ArcStrokeColor#
DynamicVariables=1
[Roundline]
Meter=Roundline
X=(#EllipseStrokeWidth#)
Y=(#EllipseStrokeWidth#)
W=(#ArcRadiusX#*2+#ArcStrokeWidth#)
H=(#ArcRadiusX#*2+#ArcStrokeWidth#)
LineColor=#RoundlineColor#
StartAngle=(Rad(#ArcStartAngle#))
RotationAngle=(Rad(#ArcDirectionAngle#))
LineStart=(#ArcRadiusX#)
LineLength=(#ArcRadiusX#+#ArcStrokeWidth#/2)
Solid=1
MeasureName=Percent
DynamicVariables=1
References:
- https://docs.rainmeter.net/manual/meters/shape/#Arc (to know what each parameter of the Arc shape means)
- https://docs.rainmeter.net/manual/meters/roundline/ (to know how to adjust the ArcStartAngle and ArcDirectionAngle variables / values)