diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2019-02-06 12:13:17 -0800 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2019-02-11 20:55:05 -0800 |
| commit | c17f147be95e7490e5207c747add2da1cc8b167f (patch) | |
| tree | 90abe0fad90920415ae4f1e118854cf56e8dfe04 /py/objtype.c | |
| parent | 1a6ad209439e0c8b0d01701b76195f9761949e31 (diff) | |
A variety of displayio improvements
This changes a number of things in displayio:
* Introduces BuiltinFont and Glyph so the built in font can be used by libraries. For boards with
a font it is available as board.TERMINAL_FONT. Fixes #1172
* Remove _load_row from Bitmap in favor of bitmap[] access. Index can be x/y tuple or overall index. Fixes #1191
* Add width and height properties to Bitmap.
* Add insert and [] access to Group. Fixes #1518
* Add index param to pop on Group.
* Terminal no longer takes unicode character info. It takes a BuiltinFont instead.
* Fix Terminal's handling of [###D vt100 commands used when up arrowing into repl history.
* Add x and y positions to Group plus scale as well.
* Add bitmap accessor for BuiltinFont
Diffstat (limited to 'py/objtype.c')
| -rw-r--r-- | py/objtype.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/py/objtype.c b/py/objtype.c index fec99da1a..f205c224e 100644 --- a/py/objtype.c +++ b/py/objtype.c @@ -171,6 +171,9 @@ STATIC void mp_obj_class_lookup(struct class_lookup_data *lookup, const mp_obj_ // do a lookup, not a (base) type in which we found the class method. const mp_obj_type_t *org_type = (const mp_obj_type_t*)lookup->obj; mp_convert_member_lookup(MP_OBJ_NULL, org_type, elem->value, lookup->dest); + } else if (MP_OBJ_IS_TYPE(elem->value, &mp_type_property)) { + lookup->dest[0] = elem->value; + return; } else { mp_obj_instance_t *obj = lookup->obj; mp_obj_t obj_obj; |
