Why have Rectangle, RoundedRectangle and oval objects

Why does Xojo have drawing primitives such as rectangle, rounded rectangles and ovals? Wouldn’t it make more sense from an OOP
Perspective to have say a rectangle that has a corner property that can be rounded so that it becomes a rounded rectangle and rounded so much that it becomes an oval or rounded equally so that it becomes a circle. This means that all drawing primitives that Xojo currently has could be encapsulated into a single class

Legacy ?

I use mostly ‘RoundRectangle’ because it is the most flexible.
you can do anything with ‘RoundRectangle’

besides… who is to say that that isn’t exactly how it is “under the covers”…
That OVAL and RECT are subclasses of ROUNDRECT and that for convience, Xojo decided to not expose it that way? :slight_smile:

Hi Axel,

can you expand your answer a bit ?
(examples of uses)

however… you cannot draw a proper OVAL using ROUNDRECT… a circle, yes, an oval no

Example DL

Thanks Axel.

Because the underlying OS framework have these and so they are mapped directly to them.

Axel: that I can do. What I asked for was how to use in a project. What use can be these Rect, RoundRect and Ovals ?

I do not recall the details, but once upon a long ago I wanted to use a Rect or a RoundRect, but I dropped the idea (and the Rect).