diff options
author | Thomas White <taw@bitwiz.me.uk> | 2019-05-10 00:08:38 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.me.uk> | 2019-05-10 00:20:30 +0200 |
commit | c3426c404324c2a629fe1403da548699abf9592d (patch) | |
tree | 14593981a2fd719f832c9f993990db17cc2d49c5 /libstorycode/narrative_priv.h | |
parent | e9c36334f53bb6aea931d0ec00e8967ef822c92c (diff) |
Clean up narrative item size arithmetic
Diffstat (limited to 'libstorycode/narrative_priv.h')
-rw-r--r-- | libstorycode/narrative_priv.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/libstorycode/narrative_priv.h b/libstorycode/narrative_priv.h index 7ba7028..cea2a53 100644 --- a/libstorycode/narrative_priv.h +++ b/libstorycode/narrative_priv.h @@ -44,11 +44,19 @@ enum narrative_item_type struct narrative_item { enum narrative_item_type type; - double h; + + /* Space around the thing (PangoLayout, slide, marker etc) */ double space_l; double space_r; - double space_t; /* Already included in "h" */ - double space_b; /* Already included in "h" */ + double space_t; + double space_b; + + /* Size of the thing (PangoLayout, slide, marker etc) */ + double obj_w; + double obj_h; + + /* Total height is obj_h + space_t + space_b. + * obj_w + space_l + space_r might be less than width of rendering surface */ /* For TEXT, BP, PRESTITLE */ char *text; @@ -61,8 +69,6 @@ struct narrative_item /* For SLIDE */ Slide *slide; - double slide_w; - double slide_h; #ifdef HAVE_CAIRO cairo_surface_t *slide_thumbnail; #else |