One of the more popular meters in Rainmeter for graphically displaying the value of a measure is the Roundline meter.

It can be a little difficult to wrap your head around some of the options when you first start using it, so here is a little guide to how you might accomplish a few different things with the meter.

Values for the meter

First and foremost, the Roundline meter is used to display a current measure value graphically from 0% to 100%. It must be used with a MeasureName that defines a value as a Percentage. Some measures like CPU or FreeDiskSpace automatically are treated as a percentage value when used in a graphical meter like Roundline, (or Bar, Histogram, Line, and Rotator) and some you must set the MinValue and MaxValue on the measure to define a percentage the meter can evaluate.

Important Options

Next, let's examine some of the most important options you need to get the meter doing the things you want.

W

This sets the overall width of the meter.

H

This sets the overall height of the meter.

One thing to remember is that a Roundline meter

*always*treats the meter as a

**circle**, defined by these width and height options. As we will see in a bit, many of the other options need to be set based

**half**of the W and H options, so the meter can know where the

**center**of the circle defined by the meter is.

Hang on, what about those "Radians"?

Some of the options in Roundline (and Rotator incidentally) are defined as a number of Radians. That link can give you a fuller explanation of how radians work in Rainmeter, but the long and the short of it is:

Radians are a measure of arc angle, which can be used to define a distance around a circle of any size. In Rainmeter, it has a starting point that is

**directly to the right of the center of the circle**. Don't think "compass" here. 0° / 360° is not at the top of the circle, but directly to the right. Since we tend to find it easier to visualize a circle in terms of

**degrees**and not radians, we simply use the built-in (Rad(SomeDegrees)) Rainmeter function to turn degrees into radians in our options. This will become more clear as we explore the options.

StartAngle

This defines the

**starting point**in radians on the circle that will be considered as 0%. In our example meters to come, we will be starting at the top of the circle, so we will be using StartAngle=(Rad(270)). This means start 270° clockwise from the 0° point on the circle. (remember, that is directly to the right of center) That value will start things at the top of the circle.

RotationAngle

This defines the

**distance**in radians

**from StartAngle**that the meter will travel around the circle when the measure value is 100%. So the meter starts at StartAngle when the value is 0%, and will travel clockwise up to RotationAngle radians as the value increases toward 100%. In our example meters to come, we will be using the entire circle as 100%, so we will be using RotationAngle=(Rad(360)). This means end 360° clockwise from the point defined by StartAngle, or all the way around back to the starting point.

*Note that a negative number in RotationAngle will cause the meter to travel counter-clockwise*. e.g. RotationAngle=(Rad(-360))

LineStart

This defines the distance

**in pixels**from the

**center**of the circle that the line will start drawing. Remember that our entire circle is defined in W and H, so the center would be half of those. If we have a meter that is 80 X 80 pixels, then the center of the circle is at 40 pixels. LineStart will treat that as the center, or zero. To have the line start 10 pixels from the center of the circle, you would use LineStart=10. This will become more clear in our examples in a bit.

LineLength

This defines the distance

**in pixels**from the

**center**of the circle that the line will extend.

**Note:**It is important to understand that this value is always measured from the center of the circle, no matter what LineStart is set at. So if we have our meter that is 80 X 80, the center is at 40 and if we want to have a line that draws in the outer 10 pixels of the overall meter we set LineStart=30 and LineLength=40. Again, this should be more clear in our examples.

LineWidth

If you are creating a Roundline meter that will act as a "pointer" to the measured value, then you will set the width of the pointer line in pixels with this option.

Solid

If this is set to 1 then instead of creating a "pointer" using a line, the meter will just "fill in" the circle up to the point of the measured value. If you use this, then LineWidth is ignored.

Our examples:

First, here is the code for the entire skin. It demonstrates three different ways to use Roundline meters. A

**pie**a

**circle**and a

**pointer**. We will tear each one apart and explain what is being done after.

Code: Select all

```
[Rainmeter]
Update=100
AccurateText=1
DynamicWindowSize=1
[MeasureCounter]
Measure=Calc
Formula=(MeasureCounter % 100) + 1
MinValue=1
MaxValue=100
[MeterBackgroundPie]
Meter=Roundline
W=80
H=80
StartAngle=(Rad(270))
RotationAngle=(Rad(360))
LineLength=25
LineColor=150,150,150,255
Solid=1
AntiAlias=1
[MeterBackgroundCircle]
Meter=Roundline
W=80
H=80
StartAngle=(Rad(270))
RotationAngle=(Rad(360))
LineStart=30
LineLength=40
LineColor=150,150,150,255
Solid=1
AntiAlias=1
[MeterPie]
Meter=Roundline
MeasureName=MeasureCounter
W=80
H=80
StartAngle=(Rad(270))
RotationAngle=(Rad(360))
LineLength=25
LineColor=175,247,151,255
Solid=1
AntiAlias=1
[MeterCircle]
Meter=Roundline
MeasureName=MeasureCounter
W=80
H=80
StartAngle=(Rad(270))
RotationAngle=(Rad(360))
LineStart=30
LineLength=40
LineColor=173,220,247,255
Solid=1
AntiAlias=1
[MeterPointer]
Meter=Roundline
MeasureName=MeasureCounter
W=80
H=80
StartAngle=(Rad(270))
RotationAngle=(Rad(360))
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=%1%
```

Code: Select all

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

*Then we have a couple of RoundLine meters that are used to create "backgrounds" for our meters. We won't go into those right now, except to say that you can create a Roundline meter that has NO MeasureName defined, and it is just treated as being at 100% all the time. That can be used to create a background meter for your real ones. Just give them the same option values as your real Roundline meters, but no MeasureName.*

The Pie meter

Code: Select all

```
[MeterPie]
Meter=Roundline
MeasureName=MeasureCounter
W=80
H=80
StartAngle=(Rad(270))
RotationAngle=(Rad(360))
LineLength=25
LineColor=175,247,151,255
Solid=1
AntiAlias=1
```

**green**pie chart element in the middle of the skin.

The Circle meter

Code: Select all

```
[MeterCircle]
Meter=Roundline
MeasureName=MeasureCounter
W=80
H=80
StartAngle=(Rad(270))
RotationAngle=(Rad(360))
LineStart=30
LineLength=40
LineColor=173,220,247,255
Solid=1
AntiAlias=1
```

**blue**circle in our image above.

The Pointer meter

Code: Select all

```
[MeterPointer]
Meter=Roundline
MeasureName=MeasureCounter
W=80
H=80
StartAngle=(Rad(270))
RotationAngle=(Rad(360))
LineWidth=3
LineLength=40
LineColor=217,54,54,255
AntiAlias=1
```

**red**line in our image above.

I hope this helps a bit with Roundline. There is a lot more you can do with it if you use your imagination and play around with the various options.