canvas_draw_triangle

Function canvas_draw_triangle 

Source
pub unsafe extern "C" fn canvas_draw_triangle(
    canvas: *mut Canvas,
    x: i32,
    y: i32,
    base: usize,
    height: usize,
    dir: CanvasDirection,
)
Expand description

Draw triangle with given base and height lengths and their intersection coordinate

ยงArguments

  • canvas - Canvas instance
  • x - x coordinate of base and height intersection
  • y - y coordinate of base and height intersection
  • base - length of triangle side
  • height - length of triangle height
  • dir - CanvasDirection triangle orientation