diff options
| author | Scott Shawcroft <scott@adafruit.com> | 2019-08-21 23:48:21 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-21 23:48:21 -0700 |
| commit | 6aa311aabd8372a69361f23f4de07dae16145c18 (patch) | |
| tree | dc327ebb615ac841dfe5d7e4a39ff652624e1bdb /shared-module | |
| parent | 524fa8209282cd727c01c32ccd85ee14f12623af (diff) | |
| parent | 99a3da3b60d518ee3b590fb6c693c1e189e3bb30 (diff) | |
Merge pull request #2027 from dastels/displayio_fill_area
To displayio.Display: expose fill_area and add a property for rotation
Diffstat (limited to 'shared-module')
| -rw-r--r-- | shared-module/displayio/Display.c | 6 | ||||
| -rw-r--r-- | shared-module/displayio/Display.h | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/shared-module/displayio/Display.c b/shared-module/displayio/Display.c index c23c66b8b..d11813b8c 100644 --- a/shared-module/displayio/Display.c +++ b/shared-module/displayio/Display.c @@ -119,7 +119,7 @@ void common_hal_displayio_display_construct(displayio_display_obj_t* self, self->width = width; self->height = height; - rotation = rotation % 360; + self->rotation = rotation % 360; self->transform.x = 0; self->transform.y = 0; self->transform.scale = 1; @@ -257,6 +257,10 @@ uint16_t common_hal_displayio_display_get_height(displayio_display_obj_t* self){ return self->height; } +uint16_t common_hal_displayio_display_get_rotation(displayio_display_obj_t* self){ + return self->rotation; +} + void common_hal_displayio_display_set_auto_brightness(displayio_display_obj_t* self, bool auto_brightness) { self->auto_brightness = auto_brightness; } diff --git a/shared-module/displayio/Display.h b/shared-module/displayio/Display.h index 96d1c06d5..74ae175b1 100644 --- a/shared-module/displayio/Display.h +++ b/shared-module/displayio/Display.h @@ -55,6 +55,7 @@ typedef struct { mp_float_t current_brightness; uint16_t width; uint16_t height; + uint16_t rotation; _displayio_colorspace_t colorspace; int16_t colstart; int16_t rowstart; |
