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

Luciano Notarfrancesco luchiano at gmail.com
Fri Feb 6 03:08:32 PST 2026


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260206/bfb92dc5/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AbstractVectorCanvas-fillRectanglecolorcornerRadius.st
Type: application/octet-stream
Size: 464 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260206/bfb92dc5/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AbstractVectorCanvas-frameRectangleborderWidthcolorcornerRadius.st
Type: application/octet-stream
Size: 589 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260206/bfb92dc5/attachment-0001.obj>


More information about the Cuis-dev mailing list