diff options
author | Thomas White <taw@bitwiz.me.uk> | 2019-04-28 22:24:34 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.me.uk> | 2019-04-28 22:24:34 +0200 |
commit | 516191143294dce6f373819422b9672dc630dca1 (patch) | |
tree | d131478df05771e161bd60b551ded12427713d94 /libstorycode | |
parent | d5741922971cf9dbb72346e6a43aae75b23dfea0 (diff) |
Use geometry from stylesheet for items other than TEXT and IMAGE
Diffstat (limited to 'libstorycode')
-rw-r--r-- | libstorycode/slide_render_cairo.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libstorycode/slide_render_cairo.c b/libstorycode/slide_render_cairo.c index 1c1a4f9..76184c4 100644 --- a/libstorycode/slide_render_cairo.c +++ b/libstorycode/slide_render_cairo.c @@ -105,10 +105,16 @@ static void render_text(SlideItem *item, cairo_t *cr, PangoContext *pc, PangoFontDescription *fontdesc; PangoAlignment palignment; size_t sel_s, sel_e; + struct frame_geom geom; - x = lcalc(item->geom.x, parent_w); - y = lcalc(item->geom.y, parent_h); - w = lcalc(item->geom.w, parent_w); + if ( (item->type == SLIDE_ITEM_TEXT) || (item->type == SLIDE_ITEM_IMAGE) ) { + geom = item->geom; + } else { + stylesheet_get_geometry(ss, stn, &geom); + } + x = lcalc(geom.x, parent_w); + y = lcalc(geom.y, parent_h); + w = lcalc(geom.w, parent_w); if ( stylesheet_get_padding(ss, stn, pad) ) return; pad_l = lcalc(pad[0], parent_w); |