diff options
author | Thomas White <taw@bitwiz.me.uk> | 2019-02-22 22:03:22 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.me.uk> | 2019-02-22 22:03:22 +0100 |
commit | 3ff425d840876c0db965b23826998161ee87c1fd (patch) | |
tree | 982ff6ad78cee6dbbac278df4b67f8642d1b11f5 /libstorycode/slide.c | |
parent | cce16c01a4ef4280b260b72e9bbf9cb4a400d122 (diff) |
Rendering stuff
Diffstat (limited to 'libstorycode/slide.c')
-rw-r--r-- | libstorycode/slide.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libstorycode/slide.c b/libstorycode/slide.c index 3f65ca8..400b614 100644 --- a/libstorycode/slide.c +++ b/libstorycode/slide.c @@ -62,6 +62,8 @@ struct slide_item struct _slide { + double logical_w; + double logical_h; int n_items; struct slide_item *items; }; @@ -74,6 +76,8 @@ Slide *slide_new() if ( s == NULL ) return NULL; s->n_items = 0; s->items = NULL; + s->logical_w = 1024.0; + s->logical_h = 768.0; return s; } @@ -184,3 +188,21 @@ void describe_slide(Slide *s) printf("item %i: %i\n", i, s->items[i].type); } } + + +int slide_set_logical_size(Slide *s, double w, double h) +{ + if ( s == NULL ) return 1; + s->logical_w = w; + s->logical_h = h; + return 0; +} + + +int slide_get_logical_size(Slide *s, double *w, double *h) +{ + if ( s == NULL ) return 1; + *w = s->logical_w; + *h = s->logical_h; + return 0; +} |