Fix conflicts

This commit is contained in:
Quentin Guidée
2020-02-23 13:27:10 +01:00
23 changed files with 114 additions and 65 deletions

View File

@@ -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