It is currently September 22nd, 2021, 6:21 pm

## Working with Roundline

Our most popular Tips and Tricks from the Rainmeter Team and others jsmorley
Developer
Posts: 22291
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

### Re: Working with Roundline

moshi wrote: to get this to work on the other edges you'll need to define an image as Background in the [Rainmeter] section of a skin.
Ah, right. There we go...

Code: Select all

``````[Rainmeter]
Update=50
AccurateText=1
BackgroundMode=0
Background=#@#Images\100x100.png
LeftMouseUpAction=[!ShowMeter MeterCircle][!EnableMeasure MeasureLoop][!CommandMeasure MeasureLoop "Reset"]

[MeasureLoop]
Measure=Loop
StartValue=-50
EndValue=150
Increment=5
LoopCount=1
Disabled=1

[MeasureCalc]
Measure=Calc
Formula=1

[MeterCircle]
Meter=Roundline
MeasureName=MeasureCalc
X=[MeasureLoop]
Y=[MeasureLoop]
LineLength=50
LineColor=235,245,255,255
SolidColor=0,0,0,1
Solid=1
AntiAlias=1
DynamicVariables=1
Hidden=1
``````
test.gif
Now I can finally finish that Rainmeter Pacman game... You do not have the required permissions to view the files attached to this post.
setsuna
Posts: 9
Joined: May 28th, 2015, 1:56 am

### Re: Working with Roundline

Hi guys,

I was wondering if its possible to make a roundline that corresponds with your Power % and decrease accordingly?  jsmorley
Developer
Posts: 22291
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

### Re: Working with Roundline

setsuna wrote:Hi guys,

I was wondering if its possible to make a roundline that corresponds with your Power % and decrease accordingly? Sure. If you use the example in my first post, you can just replace:

[MeasureCounter]
Measure=Calc
Formula=(MeasureCounter % 100) + 1
MinValue=1
MaxValue=100

[MeasureBatteryPercent]
Measure=Plugin
Plugin=PowerPlugin
PowerState=Percent
MinValue=0
MaxValue=100

It is still a percentage from 0-100%, so it will work fine.
setsuna
Posts: 9
Joined: May 28th, 2015, 1:56 am

### Re: Working with Roundline Awesome!

Sorry I'm a total noob at this, but how do I get it to display the actual power percentage and have the line in the circle shift accordingly?

I also tried changing the size of the circle by changing the H and W values but it still stayed the same. jsmorley
Developer
Posts: 22291
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

### Re: Working with Roundline

setsuna wrote: Awesome!

Sorry I'm a total noob at this, but how do I get it to display the actual power percentage and have the line in the circle shift accordingly?

I also tried changing the size of the circle by changing the H and W values but it still stayed the same.
You will use a String meter to display the percentage as text, and the size of the Roundline inside the meter defined by W and H is done with LineStart and LineLength.
setsuna
Posts: 9
Joined: May 28th, 2015, 1:56 am

### Re: Working with Roundline

I see,

The LineStart and LineLenght has been changed but they seem to be restrained within a border which I can no locate to increase the dimensions?

Also, the power meter does not seem to be correlating with the actual power level?

Here is what I have:

Code: Select all

``````[Rainmeter]
Update=100
AccurateText=1
DynamicWindowSize=1

[MeasureBatteryPercent]
Measure=Plugin
Plugin=PowerPlugin
PowerState=Percent
MinValue=0
MaxValue=100

[MeterBackgroundPie]
Meter=Roundline
W=80
H=80
LineLength=25
LineColor=150,150,150,255
Solid=1
AntiAlias=1

[MeterBackgroundCircle]
Meter=Roundline
W=80
H=80
LineStart=50
LineLength=60
LineColor=150,150,150,255
Solid=1
AntiAlias=1

[MeterPie]
Meter=Roundline
MeasureName=MeasureCounter
W=80
H=80
LineLength=25
LineColor=175,247,151,255
Solid=1
AntiAlias=1

[MeterCircle]
Meter=Roundline
MeasureName=MeasureCounter
W=80
H=80
LineStart=30
LineLength=40
LineColor=173,220,247,255
Solid=1
AntiAlias=1

[MeterPointer]
Meter=Roundline
MeasureName=MeasureCounter
W=80
H=80
LineWidth=3
LineLength=40
LineColor=217,54,54,255
AntiAlias=1

[MeterText]
Meter=String
MeasureName=MeasureCounter
FontSize=13
FontColor=255,255,255,255
X=80
Y=85
StringAlign=Right
AntiAlias=1
Text=100%`````` jsmorley
Developer
Posts: 22291
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

### Re: Working with Roundline

setsuna wrote:I see,

The LineStart and LineLenght has been changed but they seem to be restrained within a border which I can no locate to increase the dimensions?

Also, the power meter does not seem to be correlating with the actual power level?

Here is what I have:

Code: Select all

``````[Rainmeter]
Update=100
AccurateText=1
DynamicWindowSize=1

[MeasureBatteryPercent]
Measure=Plugin
Plugin=PowerPlugin
PowerState=Percent
MinValue=0
MaxValue=100

[MeterBackgroundPie]
Meter=Roundline
W=80
H=80
LineLength=25
LineColor=150,150,150,255
Solid=1
AntiAlias=1

[MeterBackgroundCircle]
Meter=Roundline
W=80
H=80
LineStart=50
LineLength=60
LineColor=150,150,150,255
Solid=1
AntiAlias=1

[MeterPie]
Meter=Roundline
MeasureName=MeasureCounter
W=80
H=80
LineLength=25
LineColor=175,247,151,255
Solid=1
AntiAlias=1

[MeterCircle]
Meter=Roundline
MeasureName=MeasureCounter
W=80
H=80
LineStart=30
LineLength=40
LineColor=173,220,247,255
Solid=1
AntiAlias=1

[MeterPointer]
Meter=Roundline
MeasureName=MeasureCounter
W=80
H=80
LineWidth=3
LineLength=40
LineColor=217,54,54,255
AntiAlias=1

[MeterText]
Meter=String
MeasureName=MeasureCounter
FontSize=13
FontColor=255,255,255,255
X=80
Y=85
StringAlign=Right
AntiAlias=1
Text=100%``````
You are going to want to use MeasureName=MeasureBatteryPercent and not MeasureName=MeasureCounter in all the meters that need to be "bound" to a measure right? Aren't you trying to display the value of MeasureBatteryPercent?
setsuna
Posts: 9
Joined: May 28th, 2015, 1:56 am

### Re: Working with Roundline

ah yes... silly me... thank you!

what about the rectangular border restriction on the circle itself? jsmorley
Developer
Posts: 22291
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

### Re: Working with Roundline

The way it works as far as size is:

- The overall meter is defined by W and H.
- The Roundline is drawn using the "center" of the meter as the origin
- So if a meter is W=120 and H=120 then the "center" is at W=60 and H=60
- The LineStart and LineLength value are then calculated from that "center"

So:

W=120
H=120
LineStart=50
LineLength=60

That will create a circle that is 120 X 120, the line will be drawn starting at 50 pixels from the center, and extending to 60 pixels from the center. So that will be a line in the last 10 pixels of the overall circle. jsmorley
Developer
Posts: 22291
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

### Re: Working with Roundline

Code: Select all

``````[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1

[MeasureBatteryPercent]
Measure=Plugin
Plugin=PowerPlugin
PowerState=Percent
MinValue=0
MaxValue=100

[MeterBackgroundCircle]
Meter=Roundline
W=120
H=120
LineStart=50
LineLength=60
LineColor=150,150,150,255
Solid=1
AntiAlias=1

[MeterCircle]
Meter=Roundline
MeasureName=MeasureBatteryPercent
W=120
H=120
LineStart=50
LineLength=60
LineColor=173,220,247,255
Solid=1
AntiAlias=1

[MeterText]
Meter=String
MeasureName=MeasureBatteryPercent
FontSize=13
FontColor=255,255,255,255
X=80
Y=85
StringAlign=Right
AntiAlias=1
Text=%1%
``````
test.gif
You do not have the required permissions to view the files attached to this post.