// Generated by mix skia.codegen. Do not edit by hand.
fn draw_command(canvas: &skia_safe::Canvas, command: Term) -> NifResult<()> {
let value = command.map_get(atoms::op())?.decode::<Atom>()?;
match value {
value if value == atoms::arc() => draw_arc(canvas, command),
value if value == atoms::circle() => draw_circle(canvas, command),
value if value == atoms::clear() => draw_clear(canvas, command),
value if value == atoms::clip_circle() => clip_circle(canvas, command),
value if value == atoms::clip_path() => clip_path(canvas, command),
value if value == atoms::clip_rect() => clip_rect(canvas, command),
value if value == atoms::concat() => draw_concat(canvas, command),
value if value == atoms::image() => draw_image(canvas, command),
value if value == atoms::line() => draw_line(canvas, command),
value if value == atoms::oval() => draw_oval(canvas, command),
value if value == atoms::path() => draw_path(canvas, command),
value if value == atoms::path_op() => draw_path_op(canvas, command),
value if value == atoms::path_outline() => draw_path_outline(canvas, command),
value if value == atoms::picture() => draw_picture(canvas, command),
value if value == atoms::rect() => draw_rect(canvas, command),
value if value == atoms::restore() => draw_restore(canvas, command),
value if value == atoms::rotate() => draw_rotate(canvas, command),
value if value == atoms::rotate_at() => draw_rotate_at(canvas, command),
value if value == atoms::save() => draw_save(canvas, command),
value if value == atoms::save_layer() => draw_save_layer(canvas, command),
value if value == atoms::scale() => draw_scale(canvas, command),
value if value == atoms::text() => draw_text(canvas, command),
value if value == atoms::text_blob() => draw_text_blob(canvas, command),
value if value == atoms::translate() => draw_translate(canvas, command),
value if value == atoms::vertices() => draw_vertices(canvas, command),
_ => Err(rustler::Error::BadArg),
}
}
fn compact_op_atom(id: i64) -> NifResult<Atom> {
match id {
1 => Ok(atoms::clear()),
2 => Ok(atoms::rect()),
3 => Ok(atoms::oval()),
4 => Ok(atoms::arc()),
5 => Ok(atoms::circle()),
6 => Ok(atoms::vertices()),
7 => Ok(atoms::line()),
8 => Ok(atoms::text_blob()),
9 => Ok(atoms::text()),
10 => Ok(atoms::image()),
11 => Ok(atoms::picture()),
12 => Ok(atoms::save()),
13 => Ok(atoms::save_layer()),
14 => Ok(atoms::restore()),
15 => Ok(atoms::push_style()),
16 => Ok(atoms::pop_style()),
17 => Ok(atoms::translate()),
18 => Ok(atoms::scale()),
19 => Ok(atoms::rotate()),
20 => Ok(atoms::rotate_at()),
21 => Ok(atoms::concat()),
22 => Ok(atoms::path()),
23 => Ok(atoms::path_op()),
24 => Ok(atoms::path_outline()),
25 => Ok(atoms::clip_rect()),
26 => Ok(atoms::clip_circle()),
27 => Ok(atoms::clip_path()),
_ => Err(rustler::Error::BadArg),
}
}