d_aabb() is a wrapper around d_rect() to create
an axis-aligned bounding box path.
Arguments
- x
If
yisNULLwill be coerced byaffiner::as_coord2d(). Else a numeric vector.- y
Either
NULLor a numeric vector.- ...
Passed to
d_polygon().
Value
A dee() object.
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)
}