It is currently March 28th, 2024, 11:58 pm

Thread for help with the Shape meter

Get help with creating, editing & fixing problems with skins
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Thread for help with the new Shape meter

Post by kyriakos876 »

For some reason, this:

Code: Select all

[Example]
Meter=Shape
X=100
Y=100
Shape=Arc -50,0,50,0,40,40,0,0,0,0 | Fill LinearGradient MyGradient
MyGradient=180 | 52,168,83 ; 0.5 | 234,67,53 ; 1.0 
doesn't create an Arc filled with the specified gradient, rather I only see a stroke with transparent fill... Is it not possible to have Linear/Radial gradients on arcs? I didn't see anything relevant mentioned here
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Thread for help with the new Shape meter

Post by balala »

kyriakos876 wrote:doesn't create an Arc filled with the specified gradient, rather I only see a stroke with transparent fill... Is it not possible to have Linear/Radial gradients on arcs? I didn't see anything relevant mentioned here
I think in order to use a gradient a shape has to be closed. Gradient can't be applied on open shapes. Yours is open, that's why the gradient isn't applied. Try to close it: Shape=Arc -50,0,50,0,40,40,0,0,0,[color=#FF0000]1[/color] | Fill LinearGradient MyGradient
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Thread for help with the new Shape meter

Post by kyriakos876 »

balala wrote:I think in order to use a gradient a shape has to be closed. Gradient can't be applied on open shapes. Yours is open, that's why the gradient isn't applied. Try to close it: Shape=Arc -50,0,50,0,40,40,0,0,0,[color=#FF0000]1[/color] | Fill LinearGradient MyGradient
Yea, closing the shape does it but not realy... I don't want to have the line that's created by closing the shape... it's just a line there floating in my shape... There isn't by any chance a way to make it the closing transparent now is it?
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Thread for help with the new Shape meter

Post by balala »

kyriakos876 wrote:There isn't by any chance a way to make it the closing transparent now is it?
No, at least as far as I can tell, there isn't. Sorry...
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Thread for help with the new Shape meter

Post by jsmorley »

Yes, while Fill Color can be used to fill even an open shape with a solid color, Fill LinearGradient requires that the shape be closed.

You would probably have to create a second arc, with a transparent stroke color, that is closed, and has the gradient.

Code: Select all

[Example]
Meter=Shape
X=100
Y=100
Shape=Arc -50,0,50,0,40,40,0,0,0,1 | Fill LinearGradient MyGradient | Stroke Color 0,0,0,0
MyGradient=180 | 52,168,83 ; 0.5 | 234,67,53 ; 1.0
Shape2=Arc -50,0,50,0,40,40,0,0,0,0
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Thread for help with the new Shape meter

Post by balala »

jsmorley wrote:You would probably have to create a second arc, with a transparent stroke color, that is closed, and has the gradient.
I also had a such idea, but didn't work. Or at least I couldn't make it to.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Thread for help with the new Shape meter

Post by jsmorley »

balala wrote:I also had a such idea, but didn't work. Or at least I couldn't make it to.

Code: Select all

[Example]
Meter=Shape
X=100
Y=100
Shape=Arc -50,0,50,0,40,40,0,0,0,1 | Fill LinearGradient MyGradient | Stroke Color 0,0,0,0
MyGradient=180 | 52,168,83 ; 0.5 | 234,67,53 ; 1.0
Shape2=Arc -50,0,50,0,40,40,0,0,0,0
1.png
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Thread for help with the new Shape meter

Post by jsmorley »

Each drawing object, like a Rectangle, or Ellipse, or Arc, or Curve are a single object, that can't have separate elements of them treated differently. You can't have part of a rectangle have a stroke and part not. To obtain that, you would need to use a Path shape, which has the ability to turn stroke on and off for the various "segments" of the path.

So in theory you could draw a Path that consists of the arc, with a solid stroke, and a Line that connects the ends, with SetNoStroke. Then you close the path, and it should give you the same effect as I did above.

Not sure there is any great advantage to this in the very simple example we are working with, but SetNoStroke can be very useful in more complex paths, where you want to "pick up" and "put down" the pen at various points in the path. That is the point of, and how to visualize, SetNotStroke.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Thread for help with the new Shape meter

Post by jsmorley »

It's a bug in my view, or at least a logical inconsistency, that Fill Color works to fill an open shape, but Fill LinearGradient doesn't... Time to call the 'sterminator.
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Thread for help with the new Shape meter

Post by kyriakos876 »

Yea I did the double arc as well but I felt stupid having to draw 2 arcs, one for the stroke and one for the fill... What's next? drawing a circle pixel by pixel? Anyway... That whole open shape sounds weird to me to begin with but whatever. I ended up drawing the thing in Photoshop and using the image.