It is currently May 5th, 2024, 12:15 am

Rendering rounded rectangle without an image... possible?

Get help with creating, editing & fixing problems with skins
csm725
Posts: 46
Joined: August 16th, 2010, 4:29 pm

Rendering rounded rectangle without an image... possible?

Post by csm725 »

The title says it all...
Can I render a rounded rectangle (as a background, as an image...) without just drawing one in Paint.NET?
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Rendering rounded rectangle without an image... possible?

Post by jsmorley »

csm725 wrote:The title says it all...
Can I render a rounded rectangle (as a background, as an image...) without just drawing one in Paint.NET?
No, you can't make a rectangle with rounded corners, you will need to create an external image.
csm725
Posts: 46
Joined: August 16th, 2010, 4:29 pm

Re: Rendering rounded rectangle without an image... possible?

Post by csm725 »

Is this feature coming any time soon?
User avatar
limpet
Posts: 34
Joined: April 21st, 2009, 5:25 pm
Location: NC, USA

Re: Rendering rounded rectangle without an image... possible?

Post by limpet »

Well, I went ahead and got this going.

It's not pretty, but here's a rectangle with with rounded corners.

Code: Select all

[roundcontrol]
Measure = Calc
Formula = 2*PI

[cornerTL]
Meter=ROUNDLINE
MeasureName=roundcontrol
X=0
Y=200
W=50
H=50
StartAngle=4.712
RotationAngle=6.283
LineLength=10
LineColor=0,0,0,255
Solid=1
AntiAlias=1

[cornerTR]
Meter=ROUNDLINE
MeasureName=roundcontrol
X=100
Y=200
W=50
H=50
StartAngle=4.712
RotationAngle=6.283
LineLength=10
LineColor=0,0,0,255
Solid=1
AntiAlias=1

[cornerBL]
Meter=ROUNDLINE
MeasureName=roundcontrol
X=0
Y=250
W=50
H=50
StartAngle=4.712
RotationAngle=6.283
LineLength=10
LineColor=0,0,0,255
Solid=1
AntiAlias=1

[cornerBR]
Meter=ROUNDLINE
MeasureName=roundcontrol
X=100
Y=250
W=50
H=50
StartAngle=4.712
RotationAngle=6.283
LineLength=10
LineColor=0,0,0,255
Solid=1
AntiAlias=1

[RectFill1]
Meter=Image
SolidColor=0,0,0,255
X=15
Y=225
W=120
H=50

[RectFill2]
Meter=Image
SolidColor=0,0,0,255
X=25
Y=215
W=100
H=70
Limpet makes music: [Soundcloud][Reverbnation][Myspace (ick)][Uvumi][Electronic/Dance]
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Rendering rounded rectangle without an image... possible?

Post by jsmorley »

limpet wrote:Well, I went ahead and got this going.

It's not pretty, but here's a rectangle with with rounded corners.

Code: Select all

[roundcontrol]
Measure = Calc
Formula = 2*PI

[cornerTL]
Meter=ROUNDLINE
MeasureName=roundcontrol
X=0
Y=200
W=50
H=50
StartAngle=4.712
RotationAngle=6.283
LineLength=10
LineColor=0,0,0,255
Solid=1
AntiAlias=1

[cornerTR]
Meter=ROUNDLINE
MeasureName=roundcontrol
X=100
Y=200
W=50
H=50
StartAngle=4.712
RotationAngle=6.283
LineLength=10
LineColor=0,0,0,255
Solid=1
AntiAlias=1

[cornerBL]
Meter=ROUNDLINE
MeasureName=roundcontrol
X=0
Y=250
W=50
H=50
StartAngle=4.712
RotationAngle=6.283
LineLength=10
LineColor=0,0,0,255
Solid=1
AntiAlias=1

[cornerBR]
Meter=ROUNDLINE
MeasureName=roundcontrol
X=100
Y=250
W=50
H=50
StartAngle=4.712
RotationAngle=6.283
LineLength=10
LineColor=0,0,0,255
Solid=1
AntiAlias=1

[RectFill1]
Meter=Image
SolidColor=0,0,0,255
X=15
Y=225
W=120
H=50

[RectFill2]
Meter=Image
SolidColor=0,0,0,255
X=25
Y=215
W=100
H=70
Actually does work. Nice. A lot of code to avoid a simple external image, but I stand corrected.
csm725
Posts: 46
Joined: August 16th, 2010, 4:29 pm

Re: Rendering rounded rectangle without an image... possible?

Post by csm725 »

Wow. Thank you so much!
User avatar
limpet
Posts: 34
Joined: April 21st, 2009, 5:25 pm
Location: NC, USA

Re: Rendering rounded rectangle without an image... possible?

Post by limpet »

jsmorley wrote:
Actually does work. Nice. A lot of code to avoid a simple external image, but I stand corrected.
Indeed. Very cumbersome and more of a proof of concept than an actual solution.
Limpet makes music: [Soundcloud][Reverbnation][Myspace (ick)][Uvumi][Electronic/Dance]
csm725
Posts: 46
Joined: August 16th, 2010, 4:29 pm

Re: Rendering rounded rectangle without an image... possible?

Post by csm725 »

Doesn't play well with transparency... :P

As I was saying, does any RM developer know if this feature will be avail in the near future?
You do not have the required permissions to view the files attached to this post.
User avatar
limpet
Posts: 34
Joined: April 21st, 2009, 5:25 pm
Location: NC, USA

Re: Rendering rounded rectangle without an image... possible?

Post by limpet »

csm725 wrote:Doesn't play well with transparency... :P

As I was saying, does any RM developer know if this feature will be avail in the near future?
Haha, no unfortunately that's the downside to this method. There is always the possibility of using multiple roundline meters that only make up one quarter of a circle, but then you'll have to use 5 "fill" rectangles in the middle (one for each side and one in the middle).
Limpet makes music: [Soundcloud][Reverbnation][Myspace (ick)][Uvumi][Electronic/Dance]
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Rendering rounded rectangle without an image... possible?

Post by jsmorley »

csm725 wrote:Doesn't play well with transparency... :P

As I was saying, does any RM developer know if this feature will be avail in the near future?
There is no current intention to add this capability. You never know what the future might bring, but this would not be terribly high on the priority list as it is so easy to create an external image that can look any way you want.