mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
Fix conflicts
This commit is contained in:
@@ -86,13 +86,21 @@ mp_obj_t modkandinsky_draw_string(size_t n_args, const mp_obj_t * args) {
|
||||
}
|
||||
|
||||
mp_obj_t modkandinsky_fill_rect(size_t n_args, const mp_obj_t * args) {
|
||||
KDRect rect(
|
||||
mp_obj_get_int(args[0]),
|
||||
mp_obj_get_int(args[1]),
|
||||
mp_obj_get_int(args[2]),
|
||||
mp_obj_get_int(args[3])
|
||||
);
|
||||
mp_int_t x = mp_obj_get_int(args[0]);
|
||||
mp_int_t y = mp_obj_get_int(args[1]);
|
||||
mp_int_t width = mp_obj_get_int(args[2]);
|
||||
mp_int_t height = mp_obj_get_int(args[3]);
|
||||
if (width < 0) {
|
||||
width = -width;
|
||||
x = x - width;
|
||||
}
|
||||
if (height < 0) {
|
||||
height = -height;
|
||||
y = y - height;
|
||||
}
|
||||
KDRect rect(x, y, width, height);
|
||||
KDColor color = ColorForTuple(args[4]);
|
||||
|
||||
MicroPython::ExecutionEnvironment::currentExecutionEnvironment()->displaySandbox();
|
||||
KDIonContext::sharedContext()->fillRect(rect, color);
|
||||
// Cf comment on modkandinsky_draw_string
|
||||
|
||||
Reference in New Issue
Block a user