MLXXXp/Arduboy2

drawbitmap just offscreen issue

MrBlinky opened this issue · 1 comments

When a bitmap is just off screen (x+w == 0) || (y+h == 0) bitmap code is unnecessarily executed.

if (x+w < 0 || x > WIDTH-1 || y+h < 0 || y > HEIGHT-1)

should be:

if (x+w <= 0 || x > WIDTH-1 || y+h <= 0 || y > HEIGHT-1)

if (x+w < 0 || x > WIDTH-1 || y+h < 0 || y > HEIGHT-1)

This fix has been implemented for the next release. The same for drawSlowXYBitmap() and drawCompressed().