It is currently March 28th, 2024, 7:57 pm

[bug] Gradient not working on combined shapes

Report bugs with the Rainmeter application and suggest features.
JorgeSM
Posts: 5
Joined: January 9th, 2017, 5:03 pm

[bug] Gradient not working on combined shapes

Post 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
User avatar
ikarus1969
Posts: 571
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: [bug] Gradient not working on combined shapes

Post 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
You do not have the required permissions to view the files attached to this post.
JorgeSM
Posts: 5
Joined: January 9th, 2017, 5:03 pm

Re: [bug] Gradient not working on combined shapes

Post by JorgeSM »

Works great, thanks :)
User avatar
ikarus1969
Posts: 571
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: [bug] Gradient not working on combined shapes

Post by ikarus1969 »

JorgeSM wrote:Works great, thanks :)
You're welcome