Skip to contents

d_arc1() d_arc2(), d_arc3(), d_arc4(), d_arc12(), d_arc23(), d_arc34(), d_arc41(), d_arc123(), d_arc234(), d_arc341(), and d_arc412() are wrappers to create elliptical arc paths. They are vectorized in their y_top, x_right, y_bottom, x_left, and w arguments. The numbers after d_arc refer to the quadrants of a unit circle (in counterclockwise order). and give an indication of what the shape of the arc looks like.

Usage

d_arc1(
  y_top,
  x_right,
  y_bottom,
  x_left,
  w,
  ...,
  origin_at_bottom = getOption("dee.origin_at_bottom", FALSE),
  height = getOption("dee.height", NULL)
)

d_arc2(
  y_top,
  x_right,
  y_bottom,
  x_left,
  w,
  ...,
  origin_at_bottom = getOption("dee.origin_at_bottom", FALSE),
  height = getOption("dee.height", NULL)
)

d_arc3(
  y_top,
  x_right,
  y_bottom,
  x_left,
  w,
  ...,
  origin_at_bottom = getOption("dee.origin_at_bottom", FALSE),
  height = getOption("dee.height", NULL)
)

d_arc4(
  y_top,
  x_right,
  y_bottom,
  x_left,
  w,
  ...,
  origin_at_bottom = getOption("dee.origin_at_bottom", FALSE),
  height = getOption("dee.height", NULL)
)

d_arc12(
  y_top,
  x_right,
  y_bottom,
  x_left,
  w,
  ...,
  origin_at_bottom = getOption("dee.origin_at_bottom", FALSE),
  height = getOption("dee.height", NULL)
)

d_arc23(
  y_top,
  x_right,
  y_bottom,
  x_left,
  w,
  ...,
  origin_at_bottom = getOption("dee.origin_at_bottom", FALSE),
  height = getOption("dee.height", NULL)
)

d_arc34(
  y_top,
  x_right,
  y_bottom,
  x_left,
  w,
  ...,
  origin_at_bottom = getOption("dee.origin_at_bottom", FALSE),
  height = getOption("dee.height", NULL)
)

d_arc41(
  y_top,
  x_right,
  y_bottom,
  x_left,
  w,
  ...,
  origin_at_bottom = getOption("dee.origin_at_bottom", FALSE),
  height = getOption("dee.height", NULL)
)

d_arc123(
  y_top,
  x_right,
  y_bottom,
  x_left,
  w,
  ...,
  origin_at_bottom = getOption("dee.origin_at_bottom", FALSE),
  height = getOption("dee.height", NULL)
)

d_arc234(
  y_top,
  x_right,
  y_bottom,
  x_left,
  w,
  ...,
  origin_at_bottom = getOption("dee.origin_at_bottom", FALSE),
  height = getOption("dee.height", NULL)
)

d_arc341(
  y_top,
  x_right,
  y_bottom,
  x_left,
  w,
  ...,
  origin_at_bottom = getOption("dee.origin_at_bottom", FALSE),
  height = getOption("dee.height", NULL)
)

d_arc412(
  y_top,
  x_right,
  y_bottom,
  x_left,
  w,
  ...,
  origin_at_bottom = getOption("dee.origin_at_bottom", FALSE),
  height = getOption("dee.height", NULL)
)

Arguments

y_top, x_right, y_bottom, x_left

The most extreme x and y values of the quarter circular arc shape.

w

The (stroke) width of the arc "line".

...

Passed to M(), A(), and L().

origin_at_bottom, height

If origin_at_bottom is TRUE then y (and any y1 and y2) coordinates is transformed by height - y for absolute coordinates and -y for relative coordinates.

Value

A dee() object.

See also

Examples

d_1 <- d_arc1(2, 8, 8, 2, 1)
if (requireNamespace("omsvg", quietly = TRUE) &&
    requireNamespace("nanosvgr", quietly = TRUE)) {
  plot(d_1, height = 10, width = 10,
       fill = "red", stroke = "black", stroke_width = 4)
}

d_2 <- d_arc2(2, 8, 8, 2, 1)
if (requireNamespace("omsvg", quietly = TRUE) &&
    requireNamespace("nanosvgr", quietly = TRUE)) {
  plot(d_2, height = 10, width = 10,
       fill = "red", stroke = "black", stroke_width = 4)
}

d_34 <- d_arc34(2, 8, 8, 2, 1)
if (requireNamespace("omsvg", quietly = TRUE) &&
    requireNamespace("nanosvgr", quietly = TRUE)) {
  plot(d_34, height = 10, width = 10,
       fill = "red", stroke = "black", stroke_width = 4)
}

d_412 <- d_arc412(2, 8, 8, 2, 1)
if (requireNamespace("omsvg", quietly = TRUE) &&
    requireNamespace("nanosvgr", quietly = TRUE)) {
  plot(d_412, height = 10, width = 10,
       fill = "red", stroke = "black", stroke_width = 4)
}