Display Simple Graphics library  v0.5
Library containing shape, text, and bitmap drawing functions called by various display drivers
Functions
drawTriangle.c File Reference
#include "simplegfx.h"

Functions

void drawTriangle (screen_t *dev, int x0, int y0, int x1, int y1, int x2, int y2, int color)
 Draws a triangle with in the specified color. More...
 

Function Documentation

◆ drawTriangle()

void drawTriangle ( screen_t dev,
int  x0,
int  y0,
int  x1,
int  y1,
int  x2,
int  y2,
int  color 
)

Draws a triangle with in the specified color.

Parameters
devPointer to the display's device structure returned by the initialization function.
x0Horizontal coordinate of the first vertex (corner) of the triangle, counted from the left side of the screen.
y0Vertical coordinate of the first vertex (corner) of the triangle, counted down from the top of the screen.
x1Horizontal coordinate of the second vertex of the triangle.
y1Vertical coordinate of the first vertex of the triangle.
x2Horizontal coordinate of the third vertex of the triangle.
y2Vertical coordinate of the third vertex of the triangle.
colorColor of the shape, in the format native to the display.