Fixed monochrome example.
This commit is contained in:
parent
1e434d6b60
commit
e275a357e8
|
@ -519,6 +519,7 @@ void Inkplate::drawElipse(int rx, int ry,
|
|||
int xc, int yc,
|
||||
int c)
|
||||
{
|
||||
selectDisplayMode(INKPLATE_3BIT);
|
||||
float dx, dy, d1, d2, x, y;
|
||||
x = 0;
|
||||
y = ry;
|
||||
|
@ -582,6 +583,7 @@ void Inkplate::fillElipse(int rx, int ry,
|
|||
int xc, int yc,
|
||||
int c)
|
||||
{
|
||||
selectDisplayMode(INKPLATE_3BIT);
|
||||
int hh = ry * ry;
|
||||
int ww = rx * rx;
|
||||
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)
|
||||
{
|
||||
selectDisplayMode(INKPLATE_3BIT);
|
||||
int tx[100], ty[100];
|
||||
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)
|
||||
{
|
||||
selectDisplayMode(INKPLATE_3BIT);
|
||||
for (int i = 0; i < n; ++i)
|
||||
drawLine(x[i], y[i], x[(i + 1) % n], y[(i + 1) % n], color);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue