aboutsummaryrefslogtreecommitdiff
path: root/libstorycode/render_cairo_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'libstorycode/render_cairo_common.c')
-rw-r--r--libstorycode/render_cairo_common.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libstorycode/render_cairo_common.c b/libstorycode/render_cairo_common.c
index b3883c9..d2b3338 100644
--- a/libstorycode/render_cairo_common.c
+++ b/libstorycode/render_cairo_common.c
@@ -95,3 +95,14 @@ int runs_to_pangolayout(PangoLayout *layout, struct text_run *runs, int n_runs)
return 0;
}
+
+
+PangoAlignment to_pangoalignment(enum alignment align)
+{
+ switch ( align ) {
+ case ALIGN_LEFT : return PANGO_ALIGN_LEFT;
+ case ALIGN_RIGHT : return PANGO_ALIGN_RIGHT;
+ case ALIGN_CENTER : return PANGO_ALIGN_CENTER;
+ default: return PANGO_ALIGN_LEFT;
+ }
+}