You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/docs/ex_02_lines.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -132,7 +132,7 @@ void line_test_vert(void){
132
132
}
133
133
```
134
134
135
-
### Rectangles
135
+
### Rectangles
136
136
137
137
Several rectangle routines are shown in this example. A key test is a fast drawing routine which animates a small rectangle being drawn diagonally across the screen.
138
138
@@ -146,11 +146,11 @@ The animation algorithm:
146
146
for(int i = 0; i < steps; i++){
147
147
148
148
// Draw the rectangle and send it to device
149
-
myOLED.rectangle(x, y, x+side, y+side);
149
+
myOLED.rectangle(x, y, side, side);
150
150
myOLED.display(); // sends erased rect and new rect pixels to device
151
151
152
152
// Erase the that rect, increment and loop
153
-
myOLED.rectangle(x, y, x+side, y+side, 0);
153
+
myOLED.rectangle(x, y, side, side, 0);
154
154
155
155
x += xinc;
156
156
y += yinc;
@@ -166,12 +166,12 @@ Filled rectangles and XOR operations:
0 commit comments