It is currently June 16th, 2021, 11:54 am

[Suggestion]BarImage for Line Meter

Report bugs with the Rainmeter application and suggest features.
User avatar
GamingZacharyC
Posts: 3
Joined: March 4th, 2021, 6:22 pm

[Suggestion]BarImage for Line Meter

Post by GamingZacharyC »

I'm making a network speed skin that uses Speedtest's gradients. Currently, we have BarImage. That's great because I can boot up Photoshop and create an image for what I'm doing. However, no such equivalent exists for the Line meter. This would really pay off in terms of aesthetics.

Examples:
Image Image
User avatar
balala
Rainmeter Sage
Posts: 12782
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [Suggestion]BarImage for Line Meter

Post by balala »

GamingZacharyC wrote: May 28th, 2021, 6:23 pm I'm making a network speed skin that uses Speedtest's gradients. Currently, we have BarImage. That's great because I can boot up Photoshop and create an image for what I'm doing. However, no such equivalent exists for the Line meter. This would really pay off in terms of aesthetics.
Actually it can be doneusing containers. Here is an example: starting from the Example skin posted on the Line meter help page:

Code: Select all

;This is the original code, posted on Line meter's help page
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1

[Metadata]
Name=ExampleMeterLine
Author=The Rainmeter Team
Information=Example of the Line meter
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Version=1.0

[MeterBackground]
Meter=Image
W=220
H=80
SolidColor=150,150,150,255

[MeasureNetIn]
Measure=NetIn

[MeasureNetOut]
Measure=NetOut

[MeterNetworkLine]
Meter=Line
MeasureName=MeasureNetOut
MeasureName2=MeasureNetIn
X=5
Y=5
W=210
H=70
LineCount=2
LineColor=140,252,124,255
LineColor2=254,211,122,255
SolidColor=0,0,0,255
AutoScale=1
AntiAlias=1
Now you have to remove an option from the above Line meter (the SolidColor option) and add an Image meter ([MeterImage]) (I'm posting just the modified [MeterNetworkLine] meter and the newly added [MeterImage]):

Code: Select all

[MeterNetworkLine]
Meter=Line
MeasureName=MeasureNetOut
MeasureName2=MeasureNetIn
X=5
Y=5
W=210
H=70
LineCount=2
LineColor=140,252,124,255
LineColor2=254,211,122,255
;SolidColor=0,0,0,255
AutoScale=1
AntiAlias=1

[MeterImage]
Meter=Image
ImageName=#@#MyImage.png
X=0
Y=0
W=210
H=70
Container=MeterNetworkLine
Make sure you have the MyImage.png image in the @Resource folder, because it is needed by the [MeterImage] meter.
User avatar
SilverAzide
Rainmeter Sage
Posts: 1290
Joined: March 23rd, 2015, 5:26 pm

Re: [Suggestion]BarImage for Line Meter

Post by SilverAzide »

balala wrote: May 28th, 2021, 7:35 pm Actually it can be doneusing containers. Here is an example: starting from the Example skin posted on the Line meter help page:
I don't think that is what the OP is asking for. He wants the LINES to change color, like you can do with the bars on the Bar meter. This would require some sort of masking or XORing drawing magic, so the lines "reveal" the image under the graph. It's a cool idea, but I'm guessing it would be pretty hard to do.
Gadgets Wiki GitHub More Gadgets...
User avatar
jsmorley
Developer
Posts: 21758
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Suggestion]BarImage for Line Meter

Post by jsmorley »

Maybe I'm missing the point as well, but I would think this:

Code: Select all

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

[Variables]

[MeasureValue]
Measure=Loop
StartValue=1
EndValue=100

[MeterImage]
Meter=Image
ImageName=#@#Images\ColorSpectrum.png
Container=MeterLine

[MeterLine]
Meter=Line
MeasureName=MeasureValue
X=5
Y=5
W=210
H=70
LineCount=1
LineColor=140,252,124,255
SolidColor=0,0,0,1
AutoScale=1
AntiAlias=1

1.jpg


ColorSpectrum.png
You do not have the required permissions to view the files attached to this post.
User avatar
SilverAzide
Rainmeter Sage
Posts: 1290
Joined: March 23rd, 2015, 5:26 pm

Re: [Suggestion]BarImage for Line Meter

Post by SilverAzide »

Wow, cool! :)
Gadgets Wiki GitHub More Gadgets...
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4300
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: [Suggestion]BarImage for Line Meter

Post by eclectic-tech »

Building on the image version, you could use a shape meter with the same dimensions as the line meter with a gradient fill that is revealed by the value of the line meter.

Code: Select all

[Rainmeter]
Update=500
DynamicWindowSize=1
AccurateText=1

[Variables]

[MeasureValue]
Measure=Calc
Formula=Random
LowBound=0
HighBound=100
DynamicVariables=1

[MeterGradientShape]
Meter=Shape
Shape=Rectangle 5,5,210,70 | StrokeWidth 0 | Fill LinearGradient MyGradient
MyGradient= 90 | 0,0,200,255 ; 0.1 | 0,255,0,255 ; 0.5 | 255,0,0,255 ; 0.9
Container=MeterLine

[MeterLine]
Meter=Line
MeasureName=MeasureValue
X=5
Y=5
W=210
H=70
LineCount=1
LineColor=255,255,255,255
SolidColor=0,0,0,1
AutoScale=1
AntiAlias=1
gradientline.gif
You do not have the required permissions to view the files attached to this post.
User avatar
SilverAzide
Rainmeter Sage
Posts: 1290
Joined: March 23rd, 2015, 5:26 pm

Re: [Suggestion]BarImage for Line Meter

Post by SilverAzide »

Works for histograms, too!
Histo.png
You do not have the required permissions to view the files attached to this post.
Gadgets Wiki GitHub More Gadgets...
User avatar
balala
Rainmeter Sage
Posts: 12782
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [Suggestion]BarImage for Line Meter

Post by balala »

jsmorley wrote: May 29th, 2021, 12:16 am Maybe I'm missing the point as well, but I would think this:
But yours practically is the same solution as mine, isn't it?
User avatar
jsmorley
Developer
Posts: 21758
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Suggestion]BarImage for Line Meter

Post by jsmorley »

balala wrote: May 29th, 2021, 5:51 pm But yours practically is the same solution as mine, isn't it?
Yep... ;-)
User avatar
GamingZacharyC
Posts: 3
Joined: March 4th, 2021, 6:22 pm

Re: [Suggestion]BarImage for Line Meter

Post by GamingZacharyC »

So the problem with all of these solutions is that all of them require a solid background. Currently, I'm making a suite of skins in the style of the illustro (default) pack. Here's what I currently have, and what I want to have can be found in the original post.
img.png
You do not have the required permissions to view the files attached to this post.