Skip to contents

d_aabb() is a wrapper around d_rect() to create an axis-aligned bounding box path.

Usage

d_aabb(x, y = NULL, ...)

Arguments

x

If y is NULL will be coerced by affiner::as_coord2d(). Else a numeric vector.

y

Either NULL or a numeric vector.

...

Passed to d_polygon().

Value

A dee() object.

See also

Examples

d_aabb(x = 2:6, y = 4:8)
#> <dee[1]>
#> M 2,4 2,8 6,8 6,4 Z
if (requireNamespace("omsvg", quietly = TRUE) &&
    requireNamespace("nanosvgr", quietly = TRUE)) {
  plot(d_aabb(x = 2:6, y = 4:8),
       height = 10, width = 10,
       fill = "red", stroke = "black", stroke_width = 4)
}