Function ratatui_canvas_begin

Source
#[no_mangle]
pub extern "C" fn ratatui_canvas_begin(
    handle: *mut c_void,
    area_id: u32,
    x_min: f64,
    x_max: f64,
    y_min: f64,
    y_max: f64,
    marker: u8,
)
Expand description

Starts a Canvas builder.

Builder lifecycle:

  1. ratatui_canvas_begin โ€” open the builder for area_id with the given data-space bounds and marker style.
  2. Zero or more shape calls โ€” ratatui_canvas_map, ratatui_canvas_line, ratatui_canvas_circle, ratatui_canvas_rectangle, ratatui_canvas_text, ratatui_canvas_points, ratatui_canvas_layer.
  3. ratatui_canvas_end โ€” flush the builder into the command queue.

Only one canvas builder may be active at a time per handle.

ยงParameters

  • x_min, x_max, y_min, y_max: data-space bounds mapped onto the area.
  • marker: 0 Dot, 1 Braille, 2 HalfBlock, 3 Block.