Fixed monochrome example 2.
This commit is contained in:
parent
e275a357e8
commit
31a31fb4e8
|
@ -519,7 +519,6 @@ 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;
|
||||
|
@ -583,7 +582,6 @@ 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;
|
||||
|
@ -612,7 +610,6 @@ 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);
|
||||
|
||||
|
@ -628,7 +625,6 @@ 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);
|
||||
}
|
||||
|
|
|
@ -363,7 +363,7 @@ void loop()
|
|||
|
||||
// Draws an elipse with x radius, y radius, center x, center y and color
|
||||
display.clearDisplay();
|
||||
display.drawElipse(100, 200, 400, 300, 0);
|
||||
display.drawElipse(100, 200, 400, 300, BLACK);
|
||||
displayCurrentAction("Drawing an elipse");
|
||||
display.display();
|
||||
|
||||
|
@ -371,7 +371,7 @@ void loop()
|
|||
|
||||
// Fills an elipse with x radius, y radius, center x, center y and color
|
||||
display.clearDisplay();
|
||||
display.fillElipse(100, 200, 400, 300, 0);
|
||||
display.fillElipse(100, 200, 400, 300, BLACK);
|
||||
displayCurrentAction("Drawing a filled elipse");
|
||||
display.display();
|
||||
|
||||
|
@ -398,7 +398,7 @@ void loop()
|
|||
|
||||
// Draws a polygon, from x and y coordinate arrays of n points in color c
|
||||
display.clearDisplay();
|
||||
display.drawPolygon(xt, yt, n, 0);
|
||||
display.drawPolygon(xt, yt, n, BLACK);
|
||||
displayCurrentAction("Drawing a polygon");
|
||||
display.display();
|
||||
|
||||
|
@ -408,7 +408,7 @@ void loop()
|
|||
// Points need to be counter clockwise sorted
|
||||
// Method can be quite slow for now, probably will improve
|
||||
display.clearDisplay();
|
||||
display.fillPolygon(xt, yt, n, 0);
|
||||
display.fillPolygon(xt, yt, n, BLACK);
|
||||
displayCurrentAction("Drawing a filled polygon");
|
||||
display.display();
|
||||
|
||||
|
|
Loading…
Reference in New Issue