juanjqh / lvgl_eve_gpu_test-main

MIT License
1 stars 2 forks source link

eve_scissor negative coordinate bug #6

Open capricorn-one opened 6 months ago

capricorn-one commented 6 months ago

Hey so this one is a legit issue that I think should be fixed. It's minor, but when you draw something outside display, even though you're using vertex2f most of the time, the eve_scissor function only takes uint16_t coordinates and consequently results in some weird behavior.

Here's my fix, which hasn't caused any issues so far, and let's my animations run outside the screen without breaking.

void eve_scissor(int16_t x1, int16_t y1, int16_t x2, int16_t y2) { if(x1 < 0) x1 = 0; if(y1 < 0) y1 = 0; if(x2 < 0) x2 = 0; if(y2 < 0) y2 = 0;

...

}