ext/pango/gsttextoverlay.c: Don't strip newlines from the text. Also, center lines within multi-line paragraphs (#339...

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).
This commit is contained in:
Young-Ho Cha 2006-04-28 13:35:34 +00:00 committed by Tim-Philipp Müller
parent b0091828ba
commit 73f5e4fe62
2 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,12 @@
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):

View 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? */