aboutsummaryrefslogtreecommitdiff
path: root/libstorycode
diff options
context:
space:
mode:
Diffstat (limited to 'libstorycode')
-rw-r--r--libstorycode/slide_render_cairo.c12
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);