aboutsummaryrefslogtreecommitdiff
path: root/libstorycode/narrative_render_cairo.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.me.uk>2020-01-13 00:06:05 +0100
committerThomas White <taw@bitwiz.me.uk>2020-01-13 00:17:50 +0100
commit1f2629403b9d62ecf44420f789b5c679a8ae1c98 (patch)
tree42f9c50056c089f9d70554dcdae626ffd8f552f1 /libstorycode/narrative_render_cairo.c
parent7304e278ced9adee5884482bbf3223f8ba1ccfde (diff)
Add segment start/end markers
Diffstat (limited to 'libstorycode/narrative_render_cairo.c')
-rw-r--r--libstorycode/narrative_render_cairo.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libstorycode/narrative_render_cairo.c b/libstorycode/narrative_render_cairo.c
index 68531c9..0a188f4 100644
--- a/libstorycode/narrative_render_cairo.c
+++ b/libstorycode/narrative_render_cairo.c
@@ -313,6 +313,10 @@ int narrative_wrap_range(Narrative *n, Stylesheet *stylesheet, PangoLanguage *la
stn = "NARRATIVE.SLIDE";
break;
+ case NARRATIVE_ITEM_SEGSTART :
+ stn = "NARRATIVE.SEGSTART";
+ break;
+
case NARRATIVE_ITEM_EOP :
stn = "NARRATIVE.EOP";
break;
@@ -334,6 +338,7 @@ int narrative_wrap_range(Narrative *n, Stylesheet *stylesheet, PangoLanguage *la
case NARRATIVE_ITEM_TEXT :
case NARRATIVE_ITEM_BP :
case NARRATIVE_ITEM_PRESTITLE :
+ case NARRATIVE_ITEM_SEGSTART :
wrap_text(&n->items[i], pc, stylesheet,
stn, w, srt, end);
break;
@@ -343,6 +348,7 @@ int narrative_wrap_range(Narrative *n, Stylesheet *stylesheet, PangoLanguage *la
break;
case NARRATIVE_ITEM_EOP :
+ case NARRATIVE_ITEM_SEGEND :
wrap_marker(&n->items[i], pc, w, sel_block);
break;
}
@@ -471,6 +477,7 @@ int narrative_render_item_cairo(Narrative*n, cairo_t *cr, int i)
case NARRATIVE_ITEM_TEXT :
case NARRATIVE_ITEM_PRESTITLE :
+ case NARRATIVE_ITEM_SEGSTART :
draw_text(&n->items[i], cr);
break;
@@ -487,6 +494,11 @@ int narrative_render_item_cairo(Narrative*n, cairo_t *cr, int i)
_("End of presentation"));
break;
+ case NARRATIVE_ITEM_SEGEND :
+ draw_marker(&n->items[i], cr, 0.3, 0.3, 0.3,
+ _("Segment end"));
+ break;
+
}
return 0;