Page 1 of 1

[bug] Gradient not working on combined shapes

Posted: January 11th, 2017, 5:16 pm
by JorgeSM
When you combine 2 or more shapes with gradients, the gradient origin is reset to 0,0 of the skin. This demonstrates the problem:

Code: Select all

[Rainmeter]
Author=JorgeSM

[MeterGrad]
Meter=Shape
; Full width gradient
Shape=Rectangle 1,1,100,10 | Extend Defs

; 2 small gradients, without combine, render fine
Shape2=Rectangle 51,15,50,10 | Extend Defs
Shape3=Rectangle 60,20,30,10 | Extend Defs

; small gradients combined, gradient X gets reset to 0
Shape4=Rectangle 51,35,50,10 | Extend Defs
Shape5=Rectangle 60,40,30,10 | Extend Defs
Shape6=Combine Shape4 | union Shape5

Defs=Fill LinearGradient MyFG | StrokeWidth 0
MyFG=180 | 0,0,255,255 ; 0.0 | 0,255,255,255 ; 0.33 | 255,255,0,255 ; 0.66 | 255,0,0,255 ; 1.0

LeftMouseUpAction=!Refresh

Re: [bug] Gradient not working on combined shapes

Posted: January 12th, 2017, 10:25 am
by ikarus1969
I know it's not a solution but it's a workaround.

It seems that on combined shapes a StrokeWidth of at least 1 is needed currently.

As a workaround until a solution is provided you can define

Code: Select all

 | StrokeWidth 1 | StrokeColor 00000000
instead of

Code: Select all

 | StrokeWidth 0
on the gradient-definition.

So you define a stroke but with a completely transparent Stroke Color.
Screenshot.jpg

Re: [bug] Gradient not working on combined shapes

Posted: January 12th, 2017, 2:13 pm
by JorgeSM
Works great, thanks :)

Re: [bug] Gradient not working on combined shapes

Posted: January 13th, 2017, 4:36 am
by ikarus1969
JorgeSM wrote:Works great, thanks :)
You're welcome