powered by
Calculate the path of a rectangle in a grid and draw to screen.
draw_rect(yx1, yx2, text = "x", ...)
upper-left (row, col) coordinate
(row, col)
lower-right (row, col) coordinate
character value drawn at coordinate
parameters that are passed to style(), including the foreground color fg, background color bg, and attribute attr
style()
fg
bg
attr
NULL
Other drawing functions: box_at(), draw_arc(), draw_bezier(), draw_circle(), draw_ellipse(), draw_fn(), draw_lerp(), draw_path(), draw_ray(), draw_shape(), fill_circle(), fill_ellipse(), fill_rect(), fill_shape(), grid_at(), grid_mat(), hline_at(), hline(), vline_at(), vline()
box_at()
draw_arc()
draw_bezier()
draw_circle()
draw_ellipse()
draw_fn()
draw_lerp()
draw_path()
draw_ray()
draw_shape()
fill_circle()
fill_ellipse()
fill_rect()
fill_shape()
grid_at()
grid_mat()
hline_at()
hline()
vline_at()
vline()
# NOT RUN { draw_rect(c(5,5), c(9,9)) # }
Run the code above in your browser using DataLab