RoundingRadius
Details
- The radius specification can have the following forms:
-
r apply radius r to all corners {rx,ry} specify different rounding radii in the
and
directions{spec,rules} use rules to override the default specification spec for specific corners - rules can be used to specify different radii for specific corners. A rule specification can be of the form {sidex,sidey}spec, where sidex can be Left or Right, and sidey can be Top or Bottom. A rule can also be specified as sidespec, which will set the radii for both corners of the given side.
- In graphics, the radius can be specified as follows:
-
r distance r in ordinary graphics coordinates Scaled[s], ImageScaled[s] fraction s of the size of the graphic Offset[d] d printer's points - For constructs such as Framed, RoundingRadius->r always specifies the radius in absolute printer's points.
- RoundingRadius->0 specifies non-rounded corners.
- The effective radius used for any corner is limited to the half-length of each adjacent side.
Examples
open all close allBasic Examples (2)
Scope (10)
Table[Graphics[Rectangle[{0, 0}, {2, 1}, RoundingRadius -> m], PlotLabel -> m], {m, {0, .1, 2, .5}}]Table[Framed[Graphics3D[Sphere[{0, 0, 0}], ImageSize -> Tiny, PlotLabel -> m], RoundingRadius -> m], {m, {0, 10, 20, 50}}]Differently styled round rectangle edges:
{Graphics[{Pink, Rectangle[{0, 0}, {1, 1}, RoundingRadius -> 0.3]}], Graphics[{EdgeForm[Thick], Pink, Rectangle[{0, 0}, {1, 1}, RoundingRadius -> 0.3]}], Graphics[{EdgeForm[Dashed], Pink, Rectangle[{0, 0}, {1, 1}, RoundingRadius -> 0.3]}], Graphics[{EdgeForm[Directive[Thick, Dashed, Blue]], Pink, Rectangle[{0, 0}, {1, 1}, RoundingRadius -> 0.3]}]} Specify different rounding radii in the
and
directions:
Graphics[Rectangle[{0, 0}, {1, 1}, RoundingRadius -> {0.3, 0.5}]]Specify different rounding values for different corners:
Graphics[Rectangle[{0, 0}, {1, 1}, RoundingRadius -> {0, {Left, Top} -> .1}]]Framed["abc", RoundingRadius -> {0, {Left, Top} -> 15, {Right, Bottom} -> 5}]Override both corners on the left side:
Graphics[Rectangle[{0, 0}, {1, 1}, RoundingRadius -> {0, Left -> .1}]]Framed["abc", RoundingRadius -> {0, Left -> 10}]The effective radius used for any corner is limited to the half-length of each adjacent side:
Graphics[Rectangle[{0, 0}, {1, 1}, RoundingRadius -> 1]]For Framed, RoundingRadius->r always specifies the radius in absolute printer's points:
Framed[Graphics3D[Sphere[{0, 0, 0}], ImageSize -> Tiny], RoundingRadius -> {50, 10}]Use Scaled coordinates and Scaled rounding radius:
Graphics[Rectangle[Scaled[{0, .4}], Scaled[{1, .6}], RoundingRadius -> Scaled[.1]], Frame -> True, PlotRange -> {{0, 10}, {0, 10}}]Use ImageScaled coordinates and ImageScaled rounding radius:
Graphics[Rectangle[ImageScaled[{0, .4}], ImageScaled[{1, .6}], RoundingRadius -> ImageScaled[.1]], Frame -> True, PlotRange -> {{0, 10}, {0, 10}}]Use Offset coordinates and Offset rounding radius:
Graphics[Rectangle[Offset[{10, 20}, {0, 0}], Offset[{-10, -20}, {1, 1}], RoundingRadius -> Offset[{50, 10}]], Frame -> True]See Also
Text
Wolfram Research (2008), RoundingRadius, Wolfram Language function, https://reference.wolfram.com/language/ref/RoundingRadius.html (updated 2024).
CMS
Wolfram Language. 2008. "RoundingRadius." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/RoundingRadius.html.
APA
Wolfram Language. (2008). RoundingRadius. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RoundingRadius.html
BibTeX
@misc{reference.wolfram_2026_roundingradius, author="Wolfram Research", title="{RoundingRadius}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/RoundingRadius.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_roundingradius, organization={Wolfram Research}, title={RoundingRadius}, year={2024}, url={https://reference.wolfram.com/language/ref/RoundingRadius.html}, note=[Accessed: 13-June-2026]}