Hi there.
I use the IMAGE meter to draw horizontal or vertical lines. Hell, I can also use the ROUNLINE meter to draw circular lines. But I can't manage to draw an oblique line. Is there a way?
It is currently April 26th, 2024, 2:11 pm
Drawing oblique lines
-
- Posts: 28
- Joined: April 7th, 2011, 7:20 pm
-
- Posts: 115
- Joined: August 12th, 2009, 4:10 pm
- Location: Behind you!
Re: Drawing oblique lines
You mean at some angle that is not a multiple of 90 degrees?
You could try this, but it is a bit of a pain, and I would just use an IMAGE meter with a .png...
(Note that I have not tested this; it's just theory...)
You want a Measure that will always be equal to one, to draw a solid, unmoving line with with roundline. For instance:
Then you would use a ROUNDLINE meter like this:
That should, in theory, work. The meter should just draw a line starting at the X/Y, outward "LineLength" at the angle given in "Start/RotationAngle." This method would, however, be extremely tedious depending on what you used it for.
You could try this, but it is a bit of a pain, and I would just use an IMAGE meter with a .png...
(Note that I have not tested this; it's just theory...)
You want a Measure that will always be equal to one, to draw a solid, unmoving line with with roundline. For instance:
Code: Select all
[measureAlways1]
Measure=FreeDiskSpace
Drive=C:
Total=1
MaxValue=1
MinValue=0
UpdateDivider=86400
Code: Select all
[meterLine]
Meter=ROUNDLINE
MeasureName=measureAlways1
X=0 <- wherever you want it
Y=0
StartAngle=4.712 <- the angle you want it at in Rad
RotationAngle=4.712
LineWidth=2 <- However thick you want it
LineStart=0
LineLength=60 <- however long you want it
LineColor=255,255,255
Solid=1 <- I'm not sure if this even matters, since the line won't move...
AntiAlias=1
[ Rainmeter 101 | The Manual | Tips and Tricks | My DeviantART ]
-
- Posts: 397
- Joined: June 22nd, 2010, 4:11 am
Re: Drawing oblique lines
thats one way falc... but not very good :/
ImageRotate
Rotates an image by the defined number of degrees. Negative numbers rotate counter-clockwise.
Thats what you want to use on images to rotate them. Its in degrees
ImageRotate
Rotates an image by the defined number of degrees. Negative numbers rotate counter-clockwise.
Thats what you want to use on images to rotate them. Its in degrees
I have three rules when I'm trying to help you.
- Don't get mad when you don't understand something
- Be VERY specific with what you ask for.
The more specific you are, the higher the quality of support you receive. - Do not just copy and paste what I put in examples and come back saying it doesn't work.
It does work, but I purposely left blanks that you need to fill for your specific needs.
-
- Posts: 115
- Joined: August 12th, 2009, 4:10 pm
- Location: Behind you!
Re: Drawing oblique lines
You've got me there. Hey, I said it was a pain of a method... it's just what came to mind.santa_ryan wrote:thats one way falc... but not very good :/
ImageRotate
Rotates an image by the defined number of degrees. Negative numbers rotate counter-clockwise.
Thats what you want to use on images to rotate them. Its in degrees
ImageRotate is definitely a way better idea!
[ Rainmeter 101 | The Manual | Tips and Tricks | My DeviantART ]
-
- Posts: 28
- Joined: April 7th, 2011, 7:20 pm
Re: Drawing oblique lines
Oooh the roundline method could have actually worked well, but I believe imagerotate it's actually quicker :P Thanks both!
But is it right that my code still gives me a completely vertical line?
But is it right that my code still gives me a completely vertical line?
Code: Select all
[MeterExtLine]
Meter=Image
ImageRotate=45
X=10
Y=20
H=40
W=12
SolidColor=#Color1#
-
- Moderator
- Posts: 1931
- Joined: January 29th, 2010, 1:43 am
- Location: Willmar, MN
Re: Drawing oblique lines
I believe that ImageRotate only works on an actual image, by which I mean displaying an image file, not the background or container which is what gets colored by using SolidColor. Your best bet is to use the roundline method described above.
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 . . .
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 . . .
-
- Posts: 397
- Joined: June 22nd, 2010, 4:11 am
Re: Drawing oblique lines
Now that i think about it smurfier your correct
Use the roundline method.
Use the roundline method.
I have three rules when I'm trying to help you.
- Don't get mad when you don't understand something
- Be VERY specific with what you ask for.
The more specific you are, the higher the quality of support you receive. - Do not just copy and paste what I put in examples and come back saying it doesn't work.
It does work, but I purposely left blanks that you need to fill for your specific needs.
-
- Posts: 28
- Joined: April 7th, 2011, 7:20 pm
Re: Drawing oblique lines
Mmh.. Actually maybe just using a .png just got more alluring... I'm making a vertical line and reusing it for all my needs maybe!
-
- Posts: 397
- Joined: June 22nd, 2010, 4:11 am
Re: Drawing oblique lines
just make a 10x10 white square, save it as a png, then use ImageTint and ImageRotate as you see fit.
I have three rules when I'm trying to help you.
- Don't get mad when you don't understand something
- Be VERY specific with what you ask for.
The more specific you are, the higher the quality of support you receive. - Do not just copy and paste what I put in examples and come back saying it doesn't work.
It does work, but I purposely left blanks that you need to fill for your specific needs.