Convert . to -> mostly

pull/2/head
Phil Howard 2021-01-20 21:31:52 +00:00
rodzic 4f6691be8b
commit 032d509d8e
1 zmienionych plików z 14 dodań i 14 usunięć

Wyświetl plik

@ -103,7 +103,7 @@ mp_obj_t picodisplay_set_pen(mp_uint_t n_args, const mp_obj_t *args) {
if(p < 0 || p > 0xffff)
mp_raise_ValueError("p is not a valid pen.");
else
display.set_pen(p);
display->set_pen(p);
} break;
case 3: {
@ -118,7 +118,7 @@ mp_obj_t picodisplay_set_pen(mp_uint_t n_args, const mp_obj_t *args) {
else if(b < 0 || b > 255)
mp_raise_ValueError("b out of range. Expected 0 to 255");
else
display.set_pen(r, g, b);
display->set_pen(r, g, b);
} break;
default: {
@ -145,7 +145,7 @@ mp_obj_t picodisplay_create_pen(mp_obj_t r_obj, mp_obj_t g_obj, mp_obj_t b_obj)
else if(b < 0 || b > 255)
mp_raise_ValueError("b out of range. Expected 0 to 255");
else
pen = display.create_pen(r, g, b);
pen = display->create_pen(r, g, b);
return mp_obj_new_int(pen);
}
@ -159,18 +159,18 @@ mp_obj_t picodisplay_set_clip(mp_uint_t n_args, const mp_obj_t *args) {
int h = mp_obj_get_int(args[3]);
rect r(x, y, w, h);
display.set_clip(r);
display->set_clip(r);
return mp_const_none;
}
mp_obj_t picodisplay_remove_clip() {
display.remove_clip();
display->remove_clip();
return mp_const_none;
}
mp_obj_t picodisplay_clear() {
display.clear();
display->clear();
return mp_const_none;
}
@ -179,7 +179,7 @@ mp_obj_t picodisplay_pixel(mp_obj_t x_obj, mp_obj_t y_obj) {
int y = mp_obj_get_int(y_obj);
point p(x, y);
display.pixel(p);
display->pixel(p);
return mp_const_none;
}
@ -190,7 +190,7 @@ mp_obj_t picodisplay_pixel_span(mp_obj_t x_obj, mp_obj_t y_obj, mp_obj_t l_obj)
int l = mp_obj_get_int(l_obj);
point p(x, y);
display.pixel_span(p, l);
display->pixel_span(p, l);
return mp_const_none;
}
@ -204,7 +204,7 @@ mp_obj_t picodisplay_rectangle(mp_uint_t n_args, const mp_obj_t *args) {
int h = mp_obj_get_int(args[3]);
rect r(x, y, w, h);
display.rectangle(r);
display->rectangle(r);
return mp_const_none;
}
@ -215,7 +215,7 @@ mp_obj_t picodisplay_circle(mp_obj_t x_obj, mp_obj_t y_obj, mp_obj_t r_obj) {
int r = mp_obj_get_int(r_obj);
point p(x, y);
display.circle(p, r);
display->circle(p, r);
return mp_const_none;
}
@ -229,10 +229,10 @@ mp_obj_t picodisplay_character(mp_uint_t n_args, const mp_obj_t *args) {
point p(x, y);
if(n_args == 4) {
int scale = mp_obj_get_int(args[3]);
display.character((char)c, p, scale);
display->character((char)c, p, scale);
}
else
display.character((char)c, p);
display->character((char)c, p);
return mp_const_none;
}
@ -252,10 +252,10 @@ mp_obj_t picodisplay_text(mp_uint_t n_args, const mp_obj_t *args) {
point p(x, y);
if(n_args == 5) {
int scale = mp_obj_get_int(args[4]);
display.text(t, p, wrap, scale);
display->text(t, p, wrap, scale);
}
else
display.text(t, p, wrap);
display->text(t, p, wrap);
return mp_const_none;
}