It is currently May 4th, 2024, 10:38 pm

Roundline meter with high line width, is it bendable?

Get help with creating, editing & fixing problems with skins
Benjirich
Posts: 7
Joined: October 13th, 2015, 7:14 am

Roundline meter with high line width, is it bendable?

Post by Benjirich »

I am making a clock with 3 Roundline rings of only 5px thickness (LineLenght-LineStart=5) , so for visibility I want the line to be very wide.

If I raise linewidth the line is straight instead of following the rings curve, how do I fix that?
User avatar
CodeCode
Posts: 1366
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Roundline meter with high line width, is it bendable?

Post by CodeCode »

Please post you config (in a rmskin package).

No one will be able to really help fully without your code.
Last edited by CodeCode on September 2nd, 2021, 10:44 pm, edited 1 time in total.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
CodeCode
Posts: 1366
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Roundline meter with high line width, is it bendable?

Post by CodeCode »

Have a look at this:

Code: Select all

[MeterRL]
Meter=ROUNDLINE
MeasureName=YourMeasure
X=100
Y=100
W=52
H=52
StartAngle=4.6825758
RotationAngle=-3.0820
LineColor=220,220,220,255
LineLength=70
LineStart=75
Solid=1
You dont need the line width in this. The start and length are all you do need.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
CodeCode
Posts: 1366
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Roundline meter with high line width, is it bendable?

Post by CodeCode »

ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
CodeCode
Posts: 1366
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Roundline meter with high line width, is it bendable?

Post by CodeCode »

CodeCode wrote: September 2nd, 2021, 10:44 pm Have a look at this:

Code: Select all

[MeterRL]
Meter=ROUNDLINE
MeasureName=YourMeasure
X=100
Y=100
W=52
H=52
StartAngle=4.6825758
RotationAngle=-3.0820
LineColor=220,220,220,255
LineLength=70
LineStart=75
Solid=1
You dont need the line width in this. The start and length are all you do need.
Sorry, those rotationangle and StartAngle are only for a half circle.

This is a full circle at 100% measuretest.

Code: Select all

StartAngle=-1.5458897
RotationAngle=6.188
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
balala
Rainmeter Sage
Posts: 16200
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Roundline meter with high line width, is it bendable?

Post by balala »

CodeCode wrote: September 2nd, 2021, 10:42 pm Please post you config (in a rmskin package).
Or at least the code (especially if no resources - images for instance - are involved).
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Roundline meter with high line width, is it bendable?

Post by death.crafter »

What he needs is an arc. Roundline becomes a straight line when LineWidth is used.

Code: Select all

[Rainmeter]
Update=40

[Loop]
Measure=Loop
StartValue=0
EndValue=99
MaxValue=99

[RoundLine]
Meter=Roundline
MeasureName=Loop
W=150
H=150
StartAngle=(rad(-90))
RotationAngle=(rad(360))
LineColor=220,0,0
LineLength=70
LineStart=75
LineWidth=30
Solid=0
SolidColor=0,0,0

[Arc]
Meter=Shape
X=r
Y=R
W=150
H=150
Shape=Arc (72.5+(72.5)*cos(rad(-90-20/2+360*[Loop:%]))),(72.5+(72.5)*sin(rad(-90-20/2+360*[Loop:%]))), (72.5+(72.5)*cos(rad(-90+20/2+360*[Loop:%]))),(72.5+(72.5)*sin(rad(-90+20/2+360*[Loop:%]))), 72.5, 72.5 | StrokeWidth 5 | StrokeStartCap Round | StrokeEndCap Round | Stroke Color 0000FF
SolidColor=0,0,0
DynamicVariables=1
from the Realm of Death
Benjirich
Posts: 7
Joined: October 13th, 2015, 7:14 am

Re: Roundline meter with high line width, is it bendable?

Post by Benjirich »

@death.crafter Thank you so much I'd have never been able to figure it out on my own!

I am having a hard time understanding and implementing it but I'm getting there. Do you happen to know how to get rid of the slight offset (half of the stroke width) to the left and upwards? Besides using a variable for stroke width and moving it X/Y by half of that.
User avatar
balala
Rainmeter Sage
Posts: 16200
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Roundline meter with high line width, is it bendable?

Post by balala »

Benjirich wrote: September 4th, 2021, 11:32 am I am having a hard time understanding and implementing it but I'm getting there. Do you happen to know how to get rid of the slight offset (half of the stroke width) to the left and upwards? Besides using a variable for stroke width and moving it X/Y by half of that.
A code still would be needed, as asked before.
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Roundline meter with high line width, is it bendable?

Post by death.crafter »

Benjirich wrote: September 4th, 2021, 11:32 am @death.crafter Thank you so much I'd have never been able to figure it out on my own!

I am having a hard time understanding and implementing it but I'm getting there. Do you happen to know how to get rid of the slight offset (half of the stroke width) to the left and upwards? Besides using a variable for stroke width and moving it X/Y by half of that.
The anatomy of the Arc would be:

Shape=Arc StartX, StartY, EndX, EndY, RadiusX, RadiusY, BigArc

StartX=(CenterX+Radius*cos(startAngle-angularWidth/2+rotationAngle*[Measure]))

StartY=(CenterY+Radius*sin(startAngle-angularWidth/2+rotationAngle*[Measure]))

EndX=(CenterX+Radius*cos(startAngle+angularWidth/2+rotationAngle*[Measure]))

EndY=(CenterY+Radius*sin(startAngle+angularWidth/2+rotationAngle*[Measure]))

RadiusX=RadiusY=Radius

BigArc=0 since we want the smaller arc.

So just change the CenterX and CenterY points to position it right. That's add half the stroke width to both CenterX and CenterY.

I am on phone so couldn't format it more readable-y. Hope you can get the gist of it. Feel free to ask if you don't understand something.
from the Realm of Death