Possible. Can't try, because don't have the font, but most probably you're right.Yincognito wrote: ↑September 12th, 2023, 6:28 pm Not sure it will have rounded corners though, despite the fact that the font does have a rounded appearance.
It is currently August 15th, 2024, 1:11 pm
Round the edges of a roundline

 Rainmeter Sage
 Posts: 16449
 Joined: October 11th, 2010, 6:27 pm
 Location: Gheorgheni, Romania
Re: Round the edges of a roundline

 Posts: 9
 Joined: July 15th, 2024, 12:22 am
Re: Round the edges of a roundline
Greetings, sorry to revive this post but I was using this arc graph and wanted to know how I would go about rotating the graph? It would really be nice to have it be rotated in the same way as a car's speedometer for example. Thanks!balala wrote: ↑September 11th, 2023, 6:02 pm Done. For instance:GIF 2023. 09. 11. 205728.gifCode: Select all
[Rainmeter] Update=1000 SkinWidth=(2*#CenterX#) SkinHeight=(2*#CenterY#) BackgroundMode=2 SolidColor=220,220,220,80 [Variables] CenterX=200 CenterY=200 Radius=100 Thickness=12 RoundlineColor=253,220,0 [MeasureCPU] Measure=CPU MinValue=0 MaxValue=100 [MeterShape] Meter=Shape X=2 Y=2 Shape=Arc #CenterX#,(#CenterY##Radius#),(#CenterX#+#Radius#*Sin(Rad(((Clamp((360*([MeasureCPU]/([MeasureCPU:MaxValue][MeasureCPU:MinValue]))),0,180)+180)%360)))),(#CenterY#+#Radius#*Cos(Rad(((Clamp((360*([MeasureCPU]/([MeasureCPU:MaxValue][MeasureCPU:MinValue]))),0,180)+180)%360)))),#Radius#,#Radius#,0,1,0,0  Extend MyModifiers Shape2=Arc (#CenterX#+#Radius#*Sin(Rad(((180+180)%360)))),(#CenterY#+#Radius#*Cos(Rad(((180+180)%360)))),(#CenterX#+#Radius#*Sin(Rad(((Clamp((360*([MeasureCPU]/([MeasureCPU:MaxValue][MeasureCPU:MinValue]))),180,360)+180)%360)))),(#CenterY#+#Radius#*Cos(Rad(((Clamp((360*([MeasureCPU]/([MeasureCPU:MaxValue][MeasureCPU:MinValue]))),180,360)+180)%360)))),#Radius#,#Radius#,0,1,0,0  Extend MyModifiers MyModifiers=StrokeWidth #Thickness#  Stroke Color #RoundlineColor#  Fill Color 0,0,0,0  StrokeStartCap Round  StrokeEndCap Round DynamicVariables=1
The magic here is the StrokeEndCap Round parameter of the MyModifiers option of the [MeterShape] meter, which rounds the ends of the shape.
The meaning of the used variables:I hope the meaning of the variables are obvious. The roundline is showing the CPU usage, but you can use it to show anything else, by altering the [MeasureCPU] measure.
 CenterX and CenterY are the coordinates of the center.
 Radius is the radius (or semidiameter) of the roundline
 Thickness is the thickness of the line used in drawing the roundline
 RoundlineColor is the color of roundline.

 Rainmeter Sage
 Posts: 7908
 Joined: February 27th, 2015, 2:38 pm
 Location: Terra Yincognita
Re: Round the edges of a roundline
Well, as far as I know, apart from the circular part displaying the available speeds, a car's speedometer indicating the current speed isn't an arc but a line, and the arc displaying the available speeds isn't rotating either, the line is instead:ÞeSheepMan wrote: ↑July 15th, 2024, 12:27 am Greetings, sorry to revive this post but I was using this arc graph and wanted to know how I would go about rotating the graph? It would really be nice to have it be rotated in the same way as a car's speedometer for example. Thanks!
So, given that it's not clear what you want, I'll just link each possibility:
 rotating shapes:
https://docs.rainmeter.net/manual/meters/shape/#TransformModifiers
 rotating images:
https://docs.rainmeter.net/manual/meters/rotator/
 rotating meter contents:
https://docs.rainmeter.net/manual/meters/generaloptions/#TransformationMatrix

 Posts: 9
 Joined: July 15th, 2024, 12:22 am
Re: Round the edges of a roundline
I mean 0% would be on the lower left bottom and 100% would be on the lower right bottom. Obviously no needle. The transformation matrix doesn't make much sense (at least for me) given that the arc lines change in size at difference percentages

 Rainmeter Sage
 Posts: 16449
 Joined: October 11th, 2010, 6:27 pm
 Location: Gheorgheni, Romania
Re: Round the edges of a roundline
So, you want to get it increasing in opposite direction, from left to right? If this is what you want, try the followings:ÞeSheepMan wrote: ↑July 15th, 2024, 12:27 am I was using this arc graph and wanted to know how I would go about rotating the graph? It would really be nice to have it be rotated in the same way as a car's speedometer for example.
 Replace the Rad functions in the Shape and Shape2 options of the [MeterShape] meter by Rad. This way you get the arc rotating in the opposite direction.
 Switch the SweepDirection of the same two Shape and Shape2 options, from 1 to 0. These values are the eighth values from the list of parameters of these two options.
Code: Select all
[MeterShape]
...
Shape=Arc #CenterX#,(#CenterY##Radius#),(#CenterX#+#Radius#*Sin(Rad(((Clamp((360*([MeasureCPU]/([MeasureCPU:MaxValue][MeasureCPU:MinValue]))),0,180)+180)%360)))),(#CenterY#+#Radius#*Cos(Rad(((Clamp((360*([MeasureCPU]/([MeasureCPU:MaxValue][MeasureCPU:MinValue]))),0,180)+180)%360)))),#Radius#,#Radius#,0,0,0,0  Extend MyModifiers
Shape2=Arc (#CenterX#+#Radius#*Sin(Rad(((180+180)%360)))),(#CenterY#+#Radius#*Cos(Rad(((180+180)%360)))),(#CenterX#+#Radius#*Sin(Rad(((Clamp((360*([MeasureCPU]/([MeasureCPU:MaxValue][MeasureCPU:MinValue]))),180,360)+180)%360)))),(#CenterY#+#Radius#*Cos(Rad(((Clamp((360*([MeasureCPU]/([MeasureCPU:MaxValue][MeasureCPU:MinValue]))),180,360)+180)%360)))),#Radius#,#Radius#,0,0,0,0  Extend MyModifiers
MyModifiers=StrokeWidth #Thickness#  Stroke Color #RoundlineColor#  Fill Color 0,0,0,0  StrokeStartCap Round  StrokeEndCap Round
Is this what you want to achieve? If it is, it's right, if it's not, I can't follow what you want (same way as Yincognito can't either). In this case further details are needed, please.

 Posts: 9
 Joined: July 15th, 2024, 12:22 am
Re: Round the edges of a roundline
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?

 Rainmeter Sage
 Posts: 16449
 Joined: October 11th, 2010, 6:27 pm
 Location: Gheorgheni, Romania
Re: Round the edges of a roundline
I'm glad.
There are more possibilities, but now quickly the easier way I'd do this is by TransformationMatrix. If you are interested, try:ÞeSheepMan wrote: ↑July 15th, 2024, 9:03 pm 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?
 Adding a RotationAngle variable to the [Variables] section. For instance:
This is the angle in degrees, by which the shape will be rotated. Note that positive values mean anticlockwise rotation, while obviously negative values mean clockwise rotation.
Code: Select all
[Variables] ... RotationAngle=135
 Add the following option to the [MeterShape] meter:
Once again, keep the existing options, just add this one.
Code: Select all
[MeterShape] ... TransformationMatrix=(Cos(Rad(#RotationAngle#)));(1*Sin(Rad(#RotationAngle#)));(Sin(Rad(#RotationAngle#)));(Cos(Rad(#RotationAngle#)));(#CenterX#(#CenterX#*Cos(Rad(#RotationAngle#)))(#CenterY#*Sin(Rad(#RotationAngle#))));(#CenterY#+(#CenterX#*Sin(Rad(#RotationAngle#)))(#CenterY#*Cos(Rad(#RotationAngle#))))

 Posts: 9
 Joined: July 15th, 2024, 12:22 am
Re: Round the edges of a roundline
I see. While it does seem to be rotating the arc, it doesn't keep it at the point I had desired. How could I prevent it from moving? Thanks.
You do not have the required permissions to view the files attached to this post.

 Rainmeter Sage
 Posts: 16449
 Joined: October 11th, 2010, 6:27 pm
 Location: Gheorgheni, Romania
Re: Round the edges of a roundline
Not sure why is it moving. Post please the code you are using, there maybe a mistake crept in (but gonna take a look only tomorrow).ÞeSheepMan wrote: ↑July 15th, 2024, 9:36 pm I see. While it does seem to be rotating the arc, it doesn't keep it at the point I had desired. How could I prevent it from moving? Thanks.

 Posts: 9
 Joined: July 15th, 2024, 12:22 am
Re: Round the edges of a roundline
All good if you look at this tomorrow. I forgot about my code, I did modify yours so that it only takes up ~85% of the circle (like a gauge) and moved it over to a specific point. I can't recall exactly if there was anything else, but its been a couple months since a paused on this project. This is that code:
Code: Select all
[CPUUsageGraph]
Meter=Shape
Shape=Arc 430,(17396),(430+96*Sin(Rad(((Clamp((307.96481*([CPUUsage]/([CPUUsage:MaxValue][CPUUsage:MinValue]))),0,180)+180)%360)))),(173+96*Cos(Rad(((Clamp((307.96481*([CPUUsage]/([CPUUsage:MaxValue][CPUUsage:MinValue]))),0,180)+180)%360)))),96,96,0,0,0,0  Extend MyModifiers
Shape2=Arc (430+96*Sin(Rad(((180+180)%360)))),(173+96*Cos(Rad(((180+180)%360)))),(430+96*Sin(Rad(((Clamp((307.96481*([CPUUsage]/([CPUUsage:MaxValue][CPUUsage:MinValue]))),180,360)+180)%360)))),(173+96*Cos(Rad(((Clamp((307.96481*([CPUUsage]/([CPUUsage:MaxValue][CPUUsage:MinValue]))),180,360)+180)%360)))),96,96,0,0,0,0  Extend MyModifiers
MyModifiers=StrokeWidth 20  Stroke Color 151, 139, 195, 255  Fill Color 0,0,0,0  StrokeStartCap Round  StrokeEndCap Round
TransformationMatrix=(Cos(Rad(#RotationAngle#)));(1*Sin(Rad(#RotationAngle#)));(Sin(Rad(#RotationAngle#)));(Cos(Rad(#RotationAngle#)));(#CenterX#(#CenterX#*Cos(Rad(#RotationAngle#)))(#CenterY#*Sin(Rad(#RotationAngle#))));(#CenterY#+(#CenterX#*Sin(Rad(#RotationAngle#)))(#CenterY#*Cos(Rad(#RotationAngle#))))
DynamicVariables=1