What do the numbers 25 and 45 represent after round Corner? Like what is the range and what do larger numbers mean?

answered Aug 28, 2020 by (60,140 points)

Hello A.,

What do the numbers 25 and 45 represent after round Corner?
Like what is the range and what do larger numbers mean?

That represent the degree or radius of curvature. [Link to Wikipedia: Curvature or Degree of curvature]

See some examples from value 0 to 200...

[Code on PlantUML server]

If that can help,
Regards,
Th.

answered Aug 31, 2020 by Martin

To add to The-Lu's great visual answer with some extra technical detail for SVG format.

Then a modern browser (I tried Edge and Opera) will let you right-click and 'inspect element'.  You can then highlight the different 'rect' components in the text sidebar and it will highlight the rectangle it refers to in the graphic.  You'll see that the rects with rounded corners have parameters 'rx' and 'ry' that are both set to half the roundCorner value.  rx and ry define the radii of an ellipse at the corner - and since both are set the same you get a circle (until you max one out).  The value is an absolute amount (as opposed to being relative to the shape size) and I think the default unit for svg is pixels.  The maximum meaningful size for rx is half the width of the rectangle at which point you get no straight line part.  Similarly for ry and the height.

Take the "roundCorner 50" example:

rect[Attributes Style] {

1. fill: rgb(254, 254, 206);
3. height: 52.5938;
4. rx: 25;
5. ry: 25;
6. width: 132;
7. x: 7;
8. y: 233;

}

rx and ry are set to half of 50.  Since that is almost exactly half the height , you get no perceivable straight line at the sides.

commented Sep 1, 2020 by (60,140 points)
Thanks Martin,

I was not going up to this technical level.
Thanks for your addition which completes well, down to the xml SVG element level.

Regards,
Th.