draw_ellipse {cursr}R Documentation

Draw Ellipse

Description

Calculate the path of an ellipse within a grid and draw to screen.

Usage

draw_ellipse(yx = c(0, 0), rx = 1, ry = 1, n = 50, text = "x", ...)

Arguments

yx

(row, col) coordinate of the center of the ellipse

rx

radius along the x-axis in grid points

ry

radius along the y-axis in grid points

n

number of points along curve to calculate

text

character value drawn at coordinate

...

parameters that are passed to style(), including the foreground color fg, background color bg, and attribute attr

Value

NULL

See Also

Other drawing functions: box_at(), draw_arc(), draw_bezier(), draw_circle(), 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

draw_ellipse(yx=c(10,10), rx=8, ry = 4)


[Package cursr version 0.1.0 Index]