draw-rounded-rectangle in dc<%>
Draws a rectangle with rounded corners. The current pen is used for the outline and the current brush for filling the shape.
If both the pen and brush are non-transparent, the rectangle is filled with the brush before the outline is drawn with the pen. The filling and outline meet so that no space is left between them, but the precise overlap between the filling and outline is platform- and size-specific. Thus, the regions drawn by the brush and pen may partially overlap. More generally, the pen is centered over the outline of the rounded rectangle, rounding toward the center in unsmoothed mode.
See also
set-smoothing for information on the 'aligned smoothing mode.
(-> voidsenda-dcdraw-rounded-rectanglexywidthheightradius)
x: real number
y: real number
width: non-negative real number
height: non-negative real number
radius=-0.25: real numberDraws a rectangle with the given top-left corner, and with the given size. The corners are quarter-circles using the given radius.
If
radiusis positive, the value is used as the radius of the rounded corner. Ifradiusis negative, the absolute value is used as the the proportion of the smallest dimension of the rectangle.If
radiusis less than-0.5or more than half ofwidthorheight, anexn:fail:contractexception is raised.Restrictions on the magnitude of drawing coordinates are described with
dc<%>.