diff options
author | Thomas White <taw@bitwiz.me.uk> | 2019-02-22 23:24:22 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.me.uk> | 2019-02-22 23:24:22 +0100 |
commit | e38820b6adb2be0dafabd517026fd7f8571107b2 (patch) | |
tree | fea9d8327e7994bce988648e76a2e59942ec40c7 /libstorycode/slide.c | |
parent | aee387068f5b9013687250e8d655b56a0c5776f2 (diff) |
Fundamentals of rendering
Diffstat (limited to 'libstorycode/slide.c')
-rw-r--r-- | libstorycode/slide.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libstorycode/slide.c b/libstorycode/slide.c index 4e98ba2..9ce0930 100644 --- a/libstorycode/slide.c +++ b/libstorycode/slide.c @@ -143,6 +143,14 @@ int slide_add_slidetitle(Slide *s, char *slidetitle) } +static char units(enum length_unit u) +{ + if ( u == LENGTH_UNIT ) return 'u'; + if ( u == LENGTH_FRAC ) return 'f'; + return '?'; +} + + void describe_slide(Slide *s) { int i; @@ -150,6 +158,11 @@ void describe_slide(Slide *s) printf(" %i items\n", s->n_items); for ( i=0; i<s->n_items; i++ ) { printf("item %i: %i\n", i, s->items[i].type); + printf("geom %f %c x %f %c + %f %c + %f %c\n", + s->items[i].geom.x.len, units(s->items[i].geom.x.unit), + s->items[i].geom.y.len, units(s->items[i].geom.y.unit), + s->items[i].geom.w.len, units(s->items[i].geom.w.unit), + s->items[i].geom.h.len, units(s->items[i].geom.h.unit)); } } |