Re: Thread for help with the new Shape meter
Posted: August 22nd, 2017, 6:25 am
Then not this is the problem.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.prince1142003 wrote:Should've posted that. I'm using 4.1.0 beta r2824 64-bit (Jul 7 2017).
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.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%?
Code: Select all
[BackgroundCircle]
Meter=Shape
Shape=Ellipse 100, 50, 46, 46 | Fill LinearGradient LinearGrad | StrokeWidth 0
Shape2=Ellipse 100, 50, 50, 50 | Fill RadialGradient ShadowGrad | 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
Code: Select all
[BackgroundCircle]
Meter=Shape
Shape=Rectangle 52, 0, 100, 100, 50 | Fill RadialGradient ShadowGrad | StrokeWidth 0
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
Code: Select all
[MeterLine]
Meter=Shape
Shape=Line 50,0,50,420 | StrokeWidth 2 | Fill LinearGradient1 LinearGrad
LinearGrad=0 | 0,0,255,128 ; 0 | 0,255,0,128 ; 1
Code: Select all
[MeterLine2]
Meter=Image
SolidColor=255,255,255,200
W=2
H=420
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.kyriakos876 wrote:I wanna make a line that goes from fully transparent to white and fully transparent again.
Code: Select all
[MeterLine]
Meter=Shape
Shape=Rectangle 50,0,2,420 | StrokeWidth 0 | Fill LinearGradient LinearGrad
LinearGrad=90 | 0,0,255,128 ; 0 | 0,255,0,128 ; 1
Never read your answer so I don't know what you said, but this is correct Thanks.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: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.Code: Select all
[MeterLine] Meter=Shape Shape=Rectangle 50,0,2,420 | StrokeWidth 0 | Fill LinearGradient LinearGrad LinearGrad=90 | 0,0,255,128 ; 0 | 0,255,0,128 ; 1
Code: Select all
[MeterLine]
Meter=Shape
Shape=Rectangle 50,0,2,420 | StrokeWidth 0 | Fill LinearGradient LinearGrad
LinearGrad=90 | 255,255,255,0 ; 0 | 255,255,255,255 ; 0.5 | 255,255,255,0 ; 1
That's good, because as I said, initially I've strongly misunderstood your request. I'm glad if it's working well.kyriakos876 wrote:Never read your answer
@ balalabalala 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.
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
Shape=Line 50,0,50,420 | StrokeWidth 2 | Stroke LinearGradient MyGrad
Yeah, you're right (again!). I didn't think to this possibility.eclectic-tech wrote:@ balala
I think you overlooked that the Stroke parameter in any shape CAN use a defined gradient as the stroke parameter.
It is easy to understand how this could be overlooked... the Shape meter is, by far, the most complicated and powerful meter in Rainmeter.balala wrote:Yeah, you're right (again!). I didn't think to this possibility.