Fixed monochrome example.

This commit is contained in:
nitko12 2020-08-26 09:25:10 +02:00
parent 1e434d6b60
commit e275a357e8
1 changed files with 4 additions and 0 deletions

View File

@ -519,6 +519,7 @@ void Inkplate::drawElipse(int rx, int ry,
int xc, int yc, int xc, int yc,
int c) int c)
{ {
selectDisplayMode(INKPLATE_3BIT);
float dx, dy, d1, d2, x, y; float dx, dy, d1, d2, x, y;
x = 0; x = 0;
y = ry; y = ry;
@ -582,6 +583,7 @@ void Inkplate::fillElipse(int rx, int ry,
int xc, int yc, int xc, int yc,
int c) int c)
{ {
selectDisplayMode(INKPLATE_3BIT);
int hh = ry * ry; int hh = ry * ry;
int ww = rx * rx; int ww = rx * rx;
int hhww = hh * ww; int hhww = hh * ww;
@ -610,6 +612,7 @@ void Inkplate::fillElipse(int rx, int ry,
void Inkplate::fillPolygon(int *x, int *y, int n, int color) void Inkplate::fillPolygon(int *x, int *y, int n, int color)
{ {
selectDisplayMode(INKPLATE_3BIT);
int tx[100], ty[100]; int tx[100], ty[100];
triangulate.triangulate(x, y, n, tx, ty); triangulate.triangulate(x, y, n, tx, ty);
@ -625,6 +628,7 @@ void Inkplate::fillPolygon(int *x, int *y, int n, int color)
void Inkplate::drawPolygon(int *x, int *y, int n, int color) void Inkplate::drawPolygon(int *x, int *y, int n, int color)
{ {
selectDisplayMode(INKPLATE_3BIT);
for (int i = 0; i < n; ++i) for (int i = 0; i < n; ++i)
drawLine(x[i], y[i], x[(i + 1) % n], y[(i + 1) % n], color); drawLine(x[i], y[i], x[(i + 1) % n], y[(i + 1) % n], color);
} }