AuthorTravis Kirton
Tags shapes, rectangle, corner
It’s easy to round (or sharpen) the corners of a Rectangle, just do this:
Rectangle
rect.corner = Size(10,10)
The default is {8, 8}.
{8, 8}
let dx = Vector(x: canvas.width/4, y: 0) let f = Rect(0, 0, 120, 120) let r1 = Rectangle(frame: f) r1.corner = Size() r1.center = canvas.center - dx let r2 = Rectangle(frame: f) r2.center = canvas.center //default > {8, 8} let r3 = Rectangle(frame: f) r3.corner = Size(30, 30) r3.center = canvas.center + dx canvas.add(r1) canvas.add(r2) canvas.add(r3)