Skip to content

Commit 35e2c68

Browse files
committed
Added color example
1 parent 020b2d8 commit 35e2c68

File tree

1 file changed

+7
-5
lines changed
  • examples/InkplateColor/Basic_Inkplate_Functionality/Color_Basic

1 file changed

+7
-5
lines changed

examples/InkplateColor/Basic_Inkplate_Functionality/Color_Basic/Color_Basic.ino

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ void setup()
2727
display.clearDisplay();
2828
display.display();
2929

30-
//Draw many rectangles
30+
display.fillScreen(INKPLATE_WHITE);
31+
32+
// Draw many rectangles
3133
display.fillRect(0, 0, 50, 50, INKPLATE_BLACK);
3234
display.fillRect(0, 50, 50, 50, INKPLATE_WHITE);
3335
display.fillRect(0, 100, 50, 50, INKPLATE_GREEN);
@@ -44,7 +46,7 @@ void setup()
4446
display.drawRect(55, 250, 50, 50, INKPLATE_YELLOW);
4547
display.drawRect(55, 300, 50, 50, INKPLATE_ORANGE);
4648

47-
//Draw many circles
49+
// Draw many circles
4850
display.fillCircle(135, 25, 24, INKPLATE_BLACK);
4951
display.fillCircle(135, 75, 24, INKPLATE_WHITE);
5052
display.fillCircle(135, 125, 24, INKPLATE_GREEN);
@@ -61,7 +63,7 @@ void setup()
6163
display.drawCircle(190, 275, 24, INKPLATE_YELLOW);
6264
display.drawCircle(190, 325, 24, INKPLATE_ORANGE);
6365

64-
//Draw many triangles
66+
// Draw many triangles
6567
display.fillTriangle(210, 50, 260, 50, 235, 0, INKPLATE_BLACK);
6668
display.fillTriangle(210, 100, 260, 100, 235, 50, INKPLATE_WHITE);
6769
display.fillTriangle(210, 150, 260, 150, 235, 100, INKPLATE_GREEN);
@@ -78,7 +80,7 @@ void setup()
7880
display.drawTriangle(210, 300, 260, 300, 235, 250, INKPLATE_YELLOW);
7981
display.drawTriangle(210, 350, 260, 350, 235, 300, INKPLATE_ORANGE);
8082

81-
//Show some pretty text
83+
// Show some pretty text
8284
display.setTextColor(INKPLATE_BLACK);
8385
display.setCursor(265, 0);
8486
display.setTextSize(2);
@@ -114,7 +116,7 @@ void setup()
114116
display.setTextSize(2);
115117
display.print("Welcome to Inkplate Color!");
116118

117-
//Draw logo
119+
// Draw logo
118120
display.drawBitmap(0, 350, logo, logo_w, logo_h, INKPLATE_BLACK);
119121
display.drawBitmap(100, 350, logo, logo_w, logo_h, INKPLATE_WHITE);
120122
display.drawBitmap(200, 350, logo, logo_w, logo_h, INKPLATE_GREEN);

0 commit comments

Comments
 (0)