Skip to content

Commit 2276254

Browse files
committed
Fix compilation
1 parent 483f14b commit 2276254

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

shared-module/bitmaptools/__init__.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -423,8 +423,8 @@ void common_hal_bitmaptools_draw_line(displayio_bitmap_t *destination,
423423
y0 = y1;
424424
y1 = temp;
425425
}
426-
y0 = max(0, y0); // only draw inside bitmap
427-
y1 = min(y1, destination->height - 1);
426+
y0 = MAX(0, y0); // only draw inside bitmap
427+
y1 = MIN(y1, destination->height - 1);
428428
for (y = y0; y < (y1 + 1); y++) { // write a horizontal line
429429
displayio_bitmap_write_pixel(destination, x0, y, value);
430430
}
@@ -434,8 +434,8 @@ void common_hal_bitmaptools_draw_line(displayio_bitmap_t *destination,
434434
x0 = x1;
435435
x1 = temp;
436436
}
437-
x0 = max(0, x0); // only draw inside bitmap
438-
x1 = min(x1, destination->width - 1);
437+
x0 = MAX(0, x0); // only draw inside bitmap
438+
x1 = MIN(x1, destination->width - 1);
439439
for (x = x0; x < (x1 + 1); x++) { // write a horizontal line
440440
displayio_bitmap_write_pixel(destination, x, y0, value);
441441
}

0 commit comments

Comments
 (0)