[Cuis-dev] two methods to draw rectangles with rounded corners

Juan Vuletich juan at cuis.st
Fri Feb 6 12:51:58 PST 2026


Hi Luciano,

Just pushed your new methods to VectorCanvas.

WRT BoxMorph and rounded corners, there are 70 subclasses in the base 
image, and none needs rounded corners. I prefer having a separate 
subclass until we see good reasons to add this behavior to the whole 
hierarchy.

Thanks,

On 2026-02-06 8:08 AM, Luciano Notarfrancesco via Cuis-dev wrote:
> These two methods are analogous to the existing fillRectangle:color: 
> and frameRectangle:borderWidth:color:, but with an extra argument for 
> the corner radius. I needed them in order to draw morphs with rounded 
> corners. If the radius is not > 0, they fallback to normal rectangles.
>
> Also, I've been wondering if we should add a cornerRadius instance 
> variable to BoxMorph, and give them all the option to use rounded 
> corners. What do you think? I needed this for a LinearLayoutMorph and 
> I had to make a subclass in order to implement it.
>
> Cheers,
> Luciano
>
-- 
Juan Vuletich
www.cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich



More information about the Cuis-dev mailing list