Skip to main content

rounded_rectangle_styled

Function rounded_rectangle_styled 

Source
pub fn rounded_rectangle_styled(radius: f64, continuous: bool) -> ViewHandle
Expand description

RoundedRectangle(cornerRadius:style:).

The layout is a CGSize of corner radii followed by the corner style, so the radius is written into both the width and height slots.

The style is not optional here the way it reads as optional in Swift. Source that writes RoundedRectangle(cornerRadius: 10) gets .continuous, not .circular — the two round the corners differently enough to disagree on a couple of hundred pixels — so a binding that always wrote case 0 quietly built the other shape. Callers say which one they mean.