123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|613|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> Fatbox rectangle with rounded corners

Tue, 16 Sep 2008, 23:49
LostUser
I'd like to create a fatBox rectangle with rounded corners (fill should be optional).

The following 2 functions are fatBox and RoundedRect.

The fatBox gives me a fat border around a rectangle, and RoundedRect gives me rounded corners but with a thin border.

I'm intending to use fatBoxs for buttons, or for display purposes.

Any help on combining fatBox and RoundedRect would be appreciated.


Wed, 17 Sep 2008, 05:28
Jayenkai
I gave up trying to add rotation, but here's a rough rounded rectangle thick edge box..
In classic JNK rounded rectangle thick edge box colours!



-=-=-
''Load, Next List!''
Wed, 17 Sep 2008, 05:34
LostUser
Hey Jayenkai, that's great! Thanks a lot.

I never used the rotation feature anyway.

I'm currently programming a Commodore 64-styled management game similar to the GUI style of "Tracksuit Manager" (https://c64s.com/game/2002/tracksuit_manager/).

I liked how they laid out their boxes, so I'm trying to replicate a similar setup.

Thanks again.
Wed, 17 Sep 2008, 05:40
Jayenkai
Probably best to draw what you need, grab to an image buffer, then redraw that instead of the constant pixel/line stuff..

-=-=-
''Load, Next List!''
Wed, 17 Sep 2008, 05:59
Andy_A
Seems like you should be using "fatSuperEllipse" which will produce the rounded rects using "fat lines"

https://blitzmax.com/codearcs/codearcs.php?code=803
Wed, 17 Sep 2008, 12:09
Phoenix
Another approach:


Wed, 17 Sep 2008, 14:51
Jayenkai
Yeah, that too

I was trying for ages to get those outer lines to rotate right, and failing miserably...

Jay relearns the shroom's teachings..
Keep things simple!

-=-=-
''Load, Next List!''
Wed, 17 Sep 2008, 21:22
Andy_A
Here's a way to make the filled rounded rects using the 'fatSuperEllipse' function.


Mon, 22 Sep 2008, 09:02
LostUser
Many thanks Andy_A... I could never get the fatSuperEllipse to do the rounded rectangle thing.

Thanks for your help!
Fri, 26 Sep 2008, 14:24
Andy_A
Just saw this post.

Glad it's gonna work for you.

Cheers,

Andy