It is currently February 3rd, 2023, 5:05 am

Trying to make a cut rounded rectangular shape

Get help with creating, editing & fixing problems with skins
User avatar
Rafamear
Posts: 98
Joined: November 15th, 2021, 1:47 am
Location: Brazil

Trying to make a cut rounded rectangular shape

Post by Rafamear »

I was trying to make a new skin and I wanted to make a different style, with a shape that has a cut in one of the parts of it and the cut area is rounded
like in this example:

any help are wellcome. :D
You do not have the required permissions to view the files attached to this post.
;===========================================Rafamear=================================================
;=============== :welcome: ========== https://www.deviantart.com/rafamear ========== :Whistle ==================
User avatar
jsmorley
Developer
Posts: 22558
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Trying to make a cut rounded rectangular shape

Post by jsmorley »

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]

[MeterShape]
Meter=Shape
X=10
Y=10
Shape=Path MyPath | StrokeWidth 15 | Stroke Color 0,0,0,255 | StrokeStartCap Round | StrokeEndCap Round | StrokeLineJoin Round
MyPath=30,50 | LineTo 0,50 | LineTo 0,0 | LineTo 100,0 | LineTo 100,50 | LineTo 70,50
1.png


https://docs.rainmeter.net/manual/meters/shape/
https://docs.rainmeter.net/manual/meters/shape/#Path
https://docs.rainmeter.net/manual/meters/shape/#AttributeModifiers
https://docs.rainmeter.net/manual/meters/shape/#StrokeStartCap
https://docs.rainmeter.net/manual/meters/shape/#StrokeEndCap
https://docs.rainmeter.net/manual/meters/shape/#StrokeLineJoin
You do not have the required permissions to view the files attached to this post.
User avatar
Rafamear
Posts: 98
Joined: November 15th, 2021, 1:47 am
Location: Brazil

Re: Trying to make a cut rounded rectangular shape

Post by Rafamear »

jsmorley wrote: October 24th, 2022, 1:49 am

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]

[MeterShape]
Meter=Shape
X=10
Y=10
Shape=Path MyPath | StrokeWidth 15 | Stroke Color 0,0,0,255 | StrokeStartCap Round | StrokeEndCap Round | StrokeLineJoin Round
MyPath=30,50 | LineTo 0,50 | LineTo 0,0 | LineTo 100,0 | LineTo 100,50 | LineTo 70,50

1.png



https://docs.rainmeter.net/manual/meters/shape/
https://docs.rainmeter.net/manual/meters/shape/#Path
https://docs.rainmeter.net/manual/meters/shape/#AttributeModifiers
https://docs.rainmeter.net/manual/meters/shape/#StrokeStartCap
https://docs.rainmeter.net/manual/meters/shape/#StrokeEndCap
https://docs.rainmeter.net/manual/meters/shape/#StrokeLineJoin
Can't the inside be rounded too?
;===========================================Rafamear=================================================
;=============== :welcome: ========== https://www.deviantart.com/rafamear ========== :Whistle ==================
User avatar
jsmorley
Developer
Posts: 22558
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Trying to make a cut rounded rectangular shape

Post by jsmorley »

Not sure. Not by using Path and LineTo you can't. I'm sure there is a more complex drawing primitive using Beizer curves or arcs that might work for that, but that would be outside my wheelhouse I'm afraid.
User avatar
ikarus1969
Posts: 542
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: Trying to make a cut rounded rectangular shape

Post by ikarus1969 »

You can use the following code. But please read and use the links jsmorley posted also.
Screenshot.png

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]

[MeterShape]
Meter=Shape
X=10
Y=10
Shape=Path MyPath | StrokeWidth 15 | Stroke Color 0,0,0,255 | StrokeStartCap Round | StrokeEndCap Round | StrokeLineJoin Round
MyPath=80, 100 | LineTo 40, 100 | ArcTo 20, 80, 20, 20 | LineTo 20, 40 | ArcTo 40, 20, 20, 20 | LineTo 140, 20 | ArcTo 160, 40, 20, 20 | LineTo 160, 80 | ArcTo 140, 100, 20, 20 | LineTo 120, 100
You do not have the required permissions to view the files attached to this post.