box_at {cursr}R Documentation

Draw Box

Description

Draws a box of size dim=c(height, width) at yx=c(row,col).

Usage

box_at(
  yx = c(1, 1),
  dim = NULL,
  text = c("|", "|", "-", "-", rep("+", 4)),
  fg = NA,
  bg = NA,
  attr = NA,
  fill = NA,
  fill.bg = NA,
  fill.fg = NA,
  fill.attr = NA
)

Arguments

yx

starting console row and column of top-left corner of box

dim

box dimensions in c(height, width). If NA, defaults to the terminal's screen width.

text

repeated character used for box. text can either be a single character or a vector of 8 characters (left side, right side, top, bottom, 4 corners: upper left, upper right, lower left, lower right).

fg

foreground color. See fg_on for more details.

bg

background color. See bg_on for more details.

attr

border text attributes. See attr_on for details.

fill

character object to fill box. Only the first character in the first element is used. If NA (the default), the box is not filled.

fill.bg

background color of the fill character.

fill.fg

foreground color of the fill character.

fill.attr

text attributes of the fill character.

Value

NULL

See Also

Other drawing functions: draw_arc(), draw_bezier(), draw_circle(), draw_ellipse(), draw_fn(), draw_lerp(), draw_path(), draw_ray(), draw_rect(), draw_shape(), fill_circle(), fill_ellipse(), fill_rect(), fill_shape(), grid_at(), grid_mat(), hline_at(), hline(), vline_at(), vline()

Examples

box_at(yx=c(4,4), dim=c(5,10), text="X")


[Package cursr version 0.1.0 Index]