libdragon
libdragon copied to clipboard
graphics.c does not clip
graphics.c does not perform any clipping, which means that it's possible to make the application crash by writing outside the target surface.
Following the current libdragon approach, I think it would be useful to implement some clipping on the surface extents. This could be easily done within the __set_pixel
macro at the expense of some performance, or better done function by function before entering the per-pixel loop.