Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 1071

Help: Rainmeter Skins • Re: Trying to make a specific shape meter

$
0
0
Yep, you did, I understood what you want. And no, YOU'RE NOT DUMB. It's not obvious I think how can you do this.
There is no simple way to get a sharp corner of a rectangle, while the others to be rounded. To get this, you need a "trick". Here is how can you achieve it.
First you need a rounded rectangle into a Shape meter. For instance this one:

Code:

[MeterButton]Meter=ShapeX=2Y=2Shape=Rectangle 0,0,70,30,10 | Extend MyModifiers1MyModifiers1=Fill Color 191,237,239,255 | StrokeWidth 2 | Stroke Color 46,115,31,255
This creates a 70 x 30 pixels rectangle (second and third parameters of Rectangle), with a corner radius of 10 (last, fifth parameter).
You have to add one more, this time, sharp rectangle, above the first one, which has to be smaller than the original one and has to be well placed. If for example you want to sharp the upper left corner of the rectangle, add the following option to the above [MeterButton] meter: Shape2=Rectangle 0,0,35,15. Note that I omitted the Extend MyModifiers1 parameter from this Shape2 option, because we'll combine these shapes and such in a case, the combined shape is inheriting the modifiers from the first shape.
Finally, to combine these shapes, add a third Shape3 option to the same meter. This one: Shape3=Combine Shape | Union Shape2. This option is combining the first two, which results into a rectangle with rounded corners, except the upper left corner, which is sharp after combining the shapes.
Obviously to get other or more corners sharp, you have to play with the parameters of Shape2 option, to get the proper corners sharp. Hope you got the idea how to do this, but if you didn't, please feel free to come back and ask.
There are other ways to do this as well. This was just an example of how to get what you want.
Yesss,thank you so much! I did scratch my head for a good 20min, but I figured out how to round any corner I want :D
I had some trouble when I overdid size and border thickness my left and top "walls" got cut off.
1.png
I couldn't think of a solution but something in my head said "change XY coords" and it fixed the issue.
I made a cute flower out of buttons, thanks :)
2.png

Statistics: Posted by katt — 58 minutes ago



Viewing all articles
Browse latest Browse all 1071

Trending Articles