rive-app / rive-cpp-legacy

C++ runtime for Rive
MIT License
287 stars 43 forks source link

Improved corner radius logic #340

Closed luigi-rosso closed 2 years ago

luigi-rosso commented 2 years ago

Clamps radius distance to half available length (from/to current corner) and also uses a better heuristic for guessing the distance of the control point from the through point instead of just blindly using the arc constant regardless of angle.

luigi-rosso commented 2 years ago

It's a draft as I'm waiting to see how designers feel about making this "the way". https://2dimensions.slack.com/archives/CHTMQJAJZ/p1655166724192089

csmartdalton commented 2 years ago

Clamps radius distance to half available length

Just curious why we chose that limit, instead of, say, lowering the radii on both sides until they don't overlap?

I really like how predictable and consistent this rule is, but I'm just wondering if someone would ever want a valid rounded corner that takes up more that half of the available length (and whose neighbor then takes up less than half).