It is currently April 20th, 2024, 4:26 am

Simple Arc Image.

Get help with creating, editing & fixing problems with skins
Eisenhorn
Posts: 6
Joined: April 21st, 2010, 10:36 pm

Simple Arc Image.

Post by Eisenhorn »

I'm fairly new at skinning, and I was wondering if it was possible to draw an arc with rainmeter that serves no function, just aesthetic. I've noticed its possible to create moving arcs that follow Winamp song progress, but I cant seem to find a way to make a plain arc.

Any help is appreciated.
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Simple Arc Image.

Post by smurfier »

Code: Select all

[msAmount]
Measure=Calc
Formula=90*(PI/180)

[mtArc]
Meter=Roundline
MeasureName=msAmount
LineLength=20
LineStart=15
Solid=1
This will produce a half arc that is 5 pixels in width. Change the first value in the measure to the desired degrees in order to change the amount of the arc.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
Eisenhorn
Posts: 6
Joined: April 21st, 2010, 10:36 pm

Re: Simple Arc Image.

Post by Eisenhorn »

Hmm, thanks for the response, but when I ran this code, it was a full circle.

I figured out how to change the size and thickness of the circle, but i cant seem to be able to change the radian value to get a half circle.
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Simple Arc Image.

Post by smurfier »

oops...sorry. Brain fart.
It's not supposed to be an angle, but the value in % pretty much of how much is filled. (a value between 0 and 1 unless maxvalue is set in the measure)
Try this.

Code: Select all

[msAmount]
Measure=Calc
Formula=50
MaxValue=100

[mtArc]
Meter=Roundline
MeasureName=msAmount
LineLength=20
LineStart=15
Solid=1
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
Eisenhorn
Posts: 6
Joined: April 21st, 2010, 10:36 pm

Re: Simple Arc Image.

Post by Eisenhorn »

Awesome!
Thanks very much.

One more question though, I have my skin set for 75 percent opening, but the skin measures clockwise, so the opening is always in the top right corner of the semi-circle. Is there away to make it open to the left?
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Simple Arc Image.

Post by smurfier »

The startangle option should accomplish this. You'll have to play with it until the opening is where you want it. Remember this value is in radians. To convert degrees to radians: Degrees*(PI/180)
If you're going to be changing this a bit and are sued to degrees, I suggest using a calc measure so that you just have to change that value. Remember dynamic variables?
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
Eisenhorn
Posts: 6
Joined: April 21st, 2010, 10:36 pm

Re: Simple Arc Image.

Post by Eisenhorn »

Dynamic Variables?

I can partial fraction decomp and integrate by parts, but ive never heard of that.
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Simple Arc Image.

Post by smurfier »

Dynamic Variables are a function of Rainmeter where as you can use a measure as you would a variable. You also need to use dynamic variables if you use the !RainmeterSetVariable bang to change the value of a variable. You put the setting DynamicVariables=1 in the measure or meter. Then where you would want to use the measure as a variable, you put the measure name complete with brackets (ie. [msAngle]). If you want to use a measure in another measure formula, you only need to use it's name, without brackets, and do not have to set dynamic variables.

Code: Select all

[msAmount]
Measure=Calc
Formula=50
MaxValue=100

[msAngle]
Measure=Calc
Formula=20*(PI/180)

[mtArc]
Meter=Roundline
MeasureName=msAmount
LineLength=20
LineStart=15
StartAngle=[msAngle]
Solid=1
DynamicVariables=1
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
Eisenhorn
Posts: 6
Joined: April 21st, 2010, 10:36 pm

Re: Simple Arc Image.

Post by Eisenhorn »

Very cool, thanks for your help.
User avatar
Alex2539
Rainmeter Sage
Posts: 642
Joined: July 19th, 2009, 5:59 am
Location: Montreal, QC, Canada

Re: Simple Arc Image.

Post by Alex2539 »

To get it to go the other way, all you need to do is change the RotationAngle. Just add this line to your Roundline meter:

Code: Select all

RotationAngle=-6.28319
RotationAngle sets how far it will rotate in all. The value is in radians, so 360 degrees is 2*PI, which is about 6.28319. By making the value negative, your meter will rotate the other way. No need for dynamic variables at all!
ImageImageImageImage