[kandinsky/context] getPixel only if in the clipping rect

Fixes the redrawing of RoundCursorView when its frame overlaps the
clipping rect.
This commit is contained in:
Ruben Dashyan
2020-01-31 17:18:58 +01:00
committed by Léa Saviot
parent 7b8f7007c4
commit 8d3f86c77f
3 changed files with 6 additions and 8 deletions

View File

@@ -51,7 +51,8 @@ mp_obj_t modkandinsky_color(mp_obj_t red, mp_obj_t green, mp_obj_t blue) {
mp_obj_t modkandinsky_get_pixel(mp_obj_t x, mp_obj_t y) {
KDPoint point(mp_obj_get_int(x), mp_obj_get_int(y));
KDColor c = KDIonContext::sharedContext()->getPixel(point);
KDColor c;
KDIonContext::sharedContext()->getPixel(point, &c);
return TupleForRGB(c.red(), c.green(), c.blue());
}