summaryrefslogtreecommitdiff
path: root/shared-module
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2019-08-22 15:20:23 -0400
committerDan Halbert <halbert@halwitz.org>2019-08-22 15:20:23 -0400
commit7cc15e56c831e302db2c61ac4fb4f8bc9b1bfe8f (patch)
treea1c11233deacc8777395009072dba6de8d60df5a /shared-module
parent95d728faf0c87b011b9ab13ad67f26820bb6401f (diff)
parent18f441ae3519899fbdff5afc2d2e47a94cb36a73 (diff)
make translate
Diffstat (limited to 'shared-module')
-rw-r--r--shared-module/displayio/Display.c6
-rw-r--r--shared-module/displayio/Display.h1
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;