ext/pango/gsttextoverlay.c: Don't strip newlines from the text. Also, center lines...
authorYoung-Ho Cha <ganadist@chollian.net>
Fri, 28 Apr 2006 13:35:34 +0000 (13:35 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Fri, 28 Apr 2006 13:35:34 +0000 (13:35 +0000)
Original commit message from CVS:
Patch by: Young-Ho Cha  <ganadist at chollian net>
* ext/pango/gsttextoverlay.c: (gst_text_overlay_init),
(gst_text_overlay_render_text):
Don't strip newlines from the text. Also, center lines
within multi-line paragraphs (#339405).

ChangeLog
ext/pango/gsttextoverlay.c

index e553bf6..163def2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2006-04-28  Tim-Philipp Müller  <tim at centricular dot net>
 
+       Patch by: Young-Ho Cha  <ganadist at chollian net>
+
+       * ext/pango/gsttextoverlay.c: (gst_text_overlay_init),
+       (gst_text_overlay_render_text):
+         Don't strip newlines from the text. Also, center lines
+         within multi-line paragraphs (#339405).
+
+2006-04-28  Tim-Philipp Müller  <tim at centricular dot net>
+
        * gst/typefind/gsttypefindfunctions.c: (wavpack_type_find):
          Fix wavpack typefinding to work in more cases (don't peek
          for chunks of multiple hundred kBs at once, but process
index 5cc4c6f..7738b7f 100644 (file)
@@ -436,6 +436,7 @@ gst_text_overlay_init (GstTextOverlay * overlay, GstTextOverlayClass * klass)
 
   overlay->layout =
       pango_layout_new (GST_TEXT_OVERLAY_GET_CLASS (overlay)->pango_context);
+  pango_layout_set_alignment (overlay->layout, PANGO_ALIGN_CENTER);
   memset (&overlay->bitmap, 0, sizeof (overlay->bitmap));
 
   overlay->halign = DEFAULT_PROP_HALIGNMENT;
@@ -950,7 +951,7 @@ gst_text_overlay_render_text (GstTextOverlay * overlay,
   } else {                      /* empty string */
     string = g_strdup (" ");
   }
-  g_strdelimit (string, "\n\r\t", ' ');
+  g_strdelimit (string, "\r\t", ' ');
   textlen = strlen (string);
 
   /* FIXME: should we check for UTF-8 here? */