It is currently November 18th, 2018, 11:40 pm

## Thread for help with the new Shape meter

Help with creating, editing & fixing problems with skins
balala
Rainmeter Sage
Posts: 7014
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

### Re: Thread for help with the new Shape meter

prince1142003 wrote:Should've posted that. I'm using 4.1.0 beta r2824 64-bit (Jul 7 2017).
Then not this is the problem.
eclectic-tech
Rainmeter Sage
Posts: 3025
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

### Re: Thread for help with the new Shape meter

prince1142003 wrote:I'm basically trying to achieve a shadow/glow effect around the circle.

I played with the stroke idea, but the problem is that the stroke is half inside the shape and half outside. If the interior of the shape is semitransparent, and the stroke is also semitransparent, they overlap in the interior region and it doesn't look good.

...

How do I fill the ring shape radially, fading from solid red at 92% to solid black at 100%?
The radial gradient on your ellipse is behaving a bit strange, but by including the optional settings for offset and radius at zero levels, it seems to behave as expected. Try this code for the ellipse shapes; I modified the radial gradient definition and extended the 'black' out to 1.25 percent so the 'red' is the dominant color of the radial ring.

Code: Select all

``````[BackgroundCircle]
Meter=Shape
Shape=Ellipse 100, 50, 46, 46 | Fill LinearGradient LinearGrad | StrokeWidth 0
Shape3=Ellipse 100, 50, 46, 46 | Fill Color 0,0,0,0 | StrokeWidth 0
Shape4=Combine Shape2 | Exclude Shape3
LinearGrad=0 | 0,0,255,128 ; 0 | 0,255,0,128 ; 1
ShadowGrad=100, 50, 0, 0, 0, 0 | 0,0,0,0 ; 0.0 | 0,0,0,0 ; 0.91 | 255,0,0,255 ; 0.92 | 0,0,0,64 ; 1.25
DynamicVariables=1
UpdateDivider=-1
Group=PanelBG``````
You could achieve a similar effect using rounded rectangle shapes:

Code: Select all

``````[BackgroundCircle]
Meter=Shape
Shape2=Rectangle 54, 4, 92, 92, 46 | Fill LinearGradient1 LinearGrad | StrokeWidth 0
LinearGrad=0 | 0,0,255,128 ; 0 | 0,255,0,128 ; 1
ShadowGrad=100,50 | 0,0,0,0 ; 0.0 | 0,0,0,0 ; 0.91 | 255,0,0,255 ; 0.92 | 0,0,0,64 ; 1.25
DynamicVariables=1
UpdateDivider=-1
Group=PanelBG``````
Not sure why adding the optional settings to the radial gradient matter, but they do... a bug?
Hope this helps.
kyriakos876
Posts: 814
Joined: January 30th, 2017, 2:01 am
Location: Greece

### Re: Thread for help with the new Shape meter

Pretty basic question. I wanna make a line that goes from fully transparent to white and fully transparent again.

Code: Select all

``````[MeterLine]
Meter=Shape
LinearGrad=0 | 0,0,255,128 ; 0 | 0,255,0,128 ; 1``````
I'm trying this but I don't think the syntax is correct. I searched in the docs for gradients in the line shape but I didn't find anything.
Also, is it possible to add a gradient in an image meter? If so, what would the syntax be again?

Code: Select all

``````[MeterLine2]
Meter=Image
SolidColor=255,255,255,200
W=2
H=420
``````
balala
Rainmeter Sage
Posts: 7014
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

### Re: Thread for help with the new Shape meter

kyriakos876 wrote:I wanna make a line that goes from fully transparent to white and fully transparent again.
EDIT: Sorry if you've read my reply, I just realized I've misunderstood your question: what you've tried to do, I think is not possible. The gradient aren't related to the stroke, but to the fill color. But a Line shape doesn't has a fill color, just a Stroke color.
balala
Rainmeter Sage
Posts: 7014
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

### Re: Thread for help with the new Shape meter

But you can simulate something similar: create a Rectangle shape, instead of a Line one, without a Stroke and use the gradient on its Fill Color option:

Code: Select all

``````[MeterLine]
Meter=Shape
LinearGrad=90 | 0,0,255,128 ; 0 | 0,255,0,128 ; 1``````
I've replaced the first value of the LinearGrad option with 90, because with 0 (as you had it) on the 2 pixels wide "line" (rectangle) shape, the gradient wouldn't be properly visible.
kyriakos876
Posts: 814
Joined: January 30th, 2017, 2:01 am
Location: Greece

### Re: Thread for help with the new Shape meter

balala wrote:But you can simulate something similar: create a Rectangle shape, instead of a Line one, without a Stroke and use the gradient on its Fill Color option:

Code: Select all

``````[MeterLine]
Meter=Shape
LinearGrad=90 | 0,0,255,128 ; 0 | 0,255,0,128 ; 1``````
I've replaced the first value of the LinearGrad option with 90, because with 0 (as you had it) on the 2 pixels wide "line" (rectangle) shape, the gradient wouldn't be properly visible.
Final code:

Code: Select all

``````[MeterLine]
Meter=Shape
LinearGrad=90 | 255,255,255,0 ; 0 | 255,255,255,255 ; 0.5 | 255,255,255,0 ; 1``````
balala
Rainmeter Sage
Posts: 7014
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

### Re: Thread for help with the new Shape meter

That's good, because as I said, initially I've strongly misunderstood your request. I'm glad if it's working well.
eclectic-tech
Rainmeter Sage
Posts: 3025
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

### Re: Thread for help with the new Shape meter

balala wrote:EDIT: Sorry if you've read my reply, I just realized I've misunderstood your question: what you've tried to do, I think is not possible. The gradient aren't related to the stroke, but to the fill color. But a Line shape doesn't has a fill color, just a Stroke color.
@ balala
I think you overlooked that the Stroke parameter in any shape CAN use a defined gradient as the stroke parameter.
Here is code for what kyriakos876 requested.

Code: Select all

``````[MeterShapeLine]
Meter=Shape
X=0
Y=0
MyGrad=90 | 0,0,0,1 ; 0.0 | 255,255,255,255 ; 0.5 | 0,0,0,1 ; 1.0
; Shape=Line StartX, StartY, EndX, EndY
``````
Generates a line with a gradient stroke:
Sorry for the 2 month delayed reply... 'tis the busy season
You do not have the required permissions to view the files attached to this post.
balala
Rainmeter Sage
Posts: 7014
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

### Re: Thread for help with the new Shape meter

eclectic-tech wrote:@ balala
I think you overlooked that the Stroke parameter in any shape CAN use a defined gradient as the stroke parameter.
Yeah, you're right (again!). I didn't think to this possibility.
eclectic-tech
Rainmeter Sage
Posts: 3025
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

### Re: Thread for help with the new Shape meter

balala wrote:Yeah, you're right (again!). I didn't think to this possibility.
It is easy to understand how this could be overlooked... the Shape meter is, by far, the most complicated and powerful meter in Rainmeter.

I am still discovering new possibilities a year after it's introduction.