It is currently August 15th, 2024, 1:26 pm

## Round the edges of a roundline

Get help with creating, editing & fixing problems with skins
Yincognito
Rainmeter Sage
Posts: 7908
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

### Re: Round the edges of a roundline

Þ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?
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:

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
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
DynamicVariables=1

[Roundline]
Meter=Roundline
X=(#EllipseStrokeWidth#)
Y=(#EllipseStrokeWidth#)
LineColor=#RoundlineColor#
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)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
balala
Rainmeter Sage
Posts: 16449
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

### Re: Round the edges of a roundline

ÞeSheepMan wrote: July 15th, 2024, 9:36 pm How could I prevent it from moving?

Note a disadvantage of this approach: since in your meter you've used some constant values, added as numbers (I'm referring here to the values 430 and 173, used into the Shape and Shape2 options), I had to use the same values into the above TransformationMatrix option, added same way, as numbers. If you move your meter, or even worse the shapes into the meter itself, the TransformationMatrix will have to be rewritten. I'd use those numbers better as variables, added to the [Variables] section. This approach would let us to can make the meter to be same way rotated, no matter where do you place it.
If you are absolutely positive you'll never move the meter, your approach is a good one, but can you be absolutely positive on this?
ÞeSheepMan
Posts: 9
Joined: July 15th, 2024, 12:22 am

### Re: Round the edges of a roundline

For future reference both of these strategies did indeed work. The roundline meter was what I was trying to use at first until I found this thread. So thank you for showing me this to solve an old issue I was having.
balala wrote: July 16th, 2024, 8:29 pm Note a disadvantage of this approach: since in your meter you've used some constant values, added as numbers (I'm referring here to the values 430 and 173, used into the Shape and Shape2 options), I had to use the same values into the above TransformationMatrix option, added same way, as numbers. If you move your meter, or even worse the shapes into the meter itself, the TransformationMatrix will have to be rewritten. I'd use those numbers better as variables, added to the [Variables] section. This approach would let us to can make the meter to be same way rotated, no matter where do you place it.
If you are absolutely positive you'll never move the meter, your approach is a good one, but can you be absolutely positive on this?
Like I said previously, this also worked, and in hindsight, the variables are a much better idea and I can't remember at this point why I didn't use them in the first place. I have since converted most of my values in the final product to variables to account for this.

Thank you very much for the support both of yall! Final result somewhere around here (not sure if itll show above or below and still a work in progress)
You do not have the required permissions to view the files attached to this post.
Yincognito
Rainmeter Sage
Posts: 7908
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

### Re: Round the edges of a roundline

ÞeSheepMan wrote: July 16th, 2024, 9:11 pm For future reference both of these strategies did indeed work.
Excellent - just use whatever you're most comfortable with, we're always glad to help!

I hope you don't mind that I intentionally didn't set those angles to the values that you needed, in order to let you change them yourself and understand the idea behind it.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
ÞeSheepMan
Posts: 9
Joined: July 15th, 2024, 12:22 am

### Re: Round the edges of a roundline

Yincognito wrote: July 16th, 2024, 9:36 pm Excellent - just use whatever you're most comfortable with, we're always glad to help!

I hope you don't mind that I intentionally didn't set those angles to the values that you needed, in order to let you change them yourself and understand the idea behind it.
Its all good, I appreciate you letting me learn my way through it
ÞeSheepMan
Posts: 9
Joined: July 15th, 2024, 12:22 am

### Re: Round the edges of a roundline

I do actually have one more issue. I flipped it around for the GPU as well, but it results in the right hand side getting cut off as shown in the image. Increasing the thickness of the inner purple circle or the more outer gray circle seems to fix it but it seems weird that its dependent on those two circles. How could I prevent this?

(Gray)

Code: Select all

``````[GPUUsageGraphLineCircle]
Meter=Shape
Shape=Ellipse #CenterXGPU#, #CenterYGPU#, 91 | Fill Color 0, 0, 0, 0 | StrokeWidth 10 | Stroke Color 95, 96, 98, 255``````
(Purple)

Code: Select all

``````[GPUUsageGraphInnerCircle]
Meter=Shape
Shape=Ellipse #CenterXGPU#, #CenterYGPU#, 79 | Fill Color 0, 0, 0, 0 | StrokeWidth 15 | Stroke Color 132, 119, 183, 255``````
You do not have the required permissions to view the files attached to this post.
Yincognito
Rainmeter Sage
Posts: 7908
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

### Re: Round the edges of a roundline

ÞeSheepMan wrote: July 16th, 2024, 10:33 pm I do actually have one more issue. I flipped it around for the GPU as well, but it results in the right hand side getting cut off as shown in the image. Increasing the thickness of the inner purple circle or the more outer gray circle seems to fix it but it seems weird that its dependent on those two circles. How could I prevent this?

(Gray)

Code: Select all

``````[GPUUsageGraphLineCircle]
Meter=Shape
Shape=Ellipse #CenterXGPU#, #CenterYGPU#, 91 | Fill Color 0, 0, 0, 0 | StrokeWidth 10 | Stroke Color 95, 96, 98, 255``````
(Purple)

Code: Select all

``````[GPUUsageGraphInnerCircle]
Meter=Shape
Shape=Ellipse #CenterXGPU#, #CenterYGPU#, 79 | Fill Color 0, 0, 0, 0 | StrokeWidth 15 | Stroke Color 132, 119, 183, 255``````
A bit difficult to put the finger on what the problem is without having an idea of what other relevant parts of the code look like, but unless you're limiting your skin's size via SkinWidth and SkinHeight instead of using DynamicWindowSize to make it adapt to its contents, one thing I can think of as a cause for this is that you're maybe not taking into account the fact that the stroke in a shape is "half in and half out" the coordinates of the said shape, like explained in the notes on StrokeWidth...
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
ÞeSheepMan
Posts: 9
Joined: July 15th, 2024, 12:22 am

### Re: Round the edges of a roundline

Thank you very much, I got it working! (:
sl23
Posts: 1502
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

### Re: Round the edges of a roundline

I had the same issue years ago with shapes, I had to specify the square size of the shape so it wouldn't cut off that bit.
- MuLab -
Yincognito
Rainmeter Sage
Posts: 7908
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

### Re: Round the edges of a roundline

I had the opposite problem recently, where a 0,0,0,0 colored shape would still take space and enlarge the skin's size, despite the fact that it normally shouldn't have, given that it was fully transparent.

Specifying the size of the meter seems to be more of a Roundline thing than a Shape one since the latter sets the size of its meter based on the containing shapes and doesn't even need a W and H on it...

Anyway, I'm glad you got it working, that's the spirit!
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth