natiny_render_triangle_outline

C
void natiny_render_triangle_outline(
    float x0, float y0, float x1, float y1, float x2, float y2,
    float thickness
);

Draws a triangle outline on the currently bound render target, using the current drawing color set by natiny_render_set_color().

Parameters

Name Type Description
x0 float First vertex X position
y0 float First vertex Y position
x1 float Second vertex X position
y1 float Second vertex Y position
x2 float Third vertex X position
y2 float Third vertex Y position
thickness float Outline thickness

Example

C
natiny_window_bind(win);
natiny_render_set_color(0.0f, 1.0f, 1.0f, 1.0f);
natiny_render_triangle_outline(160.0f, 40.0f, 100.0f, 160.0f, 220.0f, 160.0f, 2.0f);
natiny_window_unbind();

Notes

  • Uses the color previously set by natiny_render_set_color(). The default is opaque white.
  • Draws to the render target most recently bound with natiny_window_bind() or natiny_surface_bind().