lcars_elbow: LCARS corner elbow

View source: R/shapes.R

lcars_elbowR Documentation

LCARS corner elbow

Description

Draw a, LCARS elbow polygon. This is a 90-degree rounded corner bend for top left, top right, bottom right and bottom left LCARS corner panels.

Usage

lcars_elbow(
  xmin,
  xmax,
  ymin,
  ymax,
  corner,
  width,
  height,
  ro = width/2,
  ri = height/2,
  n = 20,
  color = "atomic-tangerine",
  draw = TRUE
)

Arguments

xmin

numeric, scalar left x position.

xmax

numeric, scalar right x position.

ymin

numeric, scalar bottom y position.

ymax

numeric, scalar top y position.

corner

integer 1:4 or character: topleft, topright, bottomleft, bottomright. May be abbreviated as tl, tr, br, bl.

width

numeric, the width of the vertical segment of the bend.

height

numeric, the height of the horizontal segment of the bend.

ro

radius of the outer rounded corner.

ri

radius of the inner rounded corner.

n

number of points to define the curve of the inner radial quarter circle. The number of points then used to define the outer curve and extensions of the segments are scaled respectively based on this.

color

ignored if draw = FALSE. Can be any color given in hex format. Named colors must be LCARS colors. See lcarsdata for options.

draw

draw the corner. Return values if FALSE.

Value

draws a polygon

Examples

plot(0:1, 0:1)
lcars_elbow(0.1, 0.9, 0.6, 0.9, "tl", 0.2, 0.05)

lcars documentation built on Sept. 10, 2023, 9:07 a.m.