Fix compilation

This commit is contained in:
Maciej Sokołowski 2023-01-19 21:50:59 +01:00
parent 483f14b73f
commit 2276254f6c

View File

@ -423,8 +423,8 @@ void common_hal_bitmaptools_draw_line(displayio_bitmap_t *destination,
y0 = y1;
y1 = temp;
}
y0 = max(0, y0); // only draw inside bitmap
y1 = min(y1, destination->height - 1);
y0 = MAX(0, y0); // only draw inside bitmap
y1 = MIN(y1, destination->height - 1);
for (y = y0; y < (y1 + 1); y++) { // write a horizontal line
displayio_bitmap_write_pixel(destination, x0, y, value);
}
@ -434,8 +434,8 @@ void common_hal_bitmaptools_draw_line(displayio_bitmap_t *destination,
x0 = x1;
x1 = temp;
}
x0 = max(0, x0); // only draw inside bitmap
x1 = min(x1, destination->width - 1);
x0 = MAX(0, x0); // only draw inside bitmap
x1 = MIN(x1, destination->width - 1);
for (x = x0; x < (x1 + 1); x++) { // write a horizontal line
displayio_bitmap_write_pixel(destination, x, y0, value);
}