Skip to contents

Renders manimR scenes using the grid graphics package (part of base R). This is the fallback renderer when ragg is not available.

Super class

manimR::AbstractRenderer -> GridRenderer

Public fields

output_path

Current output file path

viewport

The grid viewport

Methods

Inherited methods


Method new()

Create GridRenderer

Usage

GridRenderer$new(...)

Arguments

...

Arguments passed to AbstractRenderer


Method begin_frame()

Begin a new frame using grid graphics

Usage

GridRenderer$begin_frame(output_path = NULL)

Arguments

output_path

Path to save frame (PNG via grDevices)


Method end_frame()

End the current frame

Usage

GridRenderer$end_frame()


Method draw_path()

Draw a path using grid graphics

Usage

GridRenderer$draw_path(
  x,
  y,
  fill_color = NULL,
  fill_opacity = 0,
  stroke_color = "#FFFFFF",
  stroke_opacity = 1,
  stroke_width = 2
)


Method draw_text()

Draw text using grid graphics

Usage

GridRenderer$draw_text(
  text,
  x,
  y,
  color = "#FFFFFF",
  font_size = 24,
  font_family = "sans",
  opacity = 1
)


Method draw_raster()

Draw raster image using grid graphics

Usage

GridRenderer$draw_raster(raster, xleft, ybottom, xright, ytop, opacity = 1)


Method clone()

The objects of this class are cloneable with this method.

Usage

GridRenderer$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.