Glcd fillTriangle()

Draws a solid triangle between the three points provided, in the colour chosen.

#include "GLCD_ST7565.h"
#include <Ports.h>
#include <RF12.h> // needed to avoid a linker error :(

GLCD_ST7565 glcd;
glcd.fillTriangle(byte x1, byte y1, byte x2, byte y2, byte x3, byte y3, byte colour)

Parameters

x1,y1

The x coordinate (0-127) and y coordinate (0-63) of the first corner.

x2,y2

The x coordinate (0-127) and y coordinate (0-63) of the second corner.

x3,y3

The x coordinate (0-127) and y coordinate (0-63) of the third corner.

colour

0 or 1, BLACK or WHITE. The colour you wish to set the pixels.

Notes

Due to the complexities involved in drawing a solid triangle, this routine will use an additional 64 bytes of storage when called. Please ensure this is available.