textoverlay: First draw outline text and then the real text

Improves the output a bit because no parts of the outline are
overwritten again.
This commit is contained in:
Sebastian Dröge 2009-11-03 08:26:37 +01:00
parent e9d1819fe3
commit 60aa09d28c

View file

@ -1264,6 +1264,12 @@ gst_text_overlay_render_pangocairo (GstTextOverlay * overlay,
pango_cairo_show_layout (cr, overlay->layout); pango_cairo_show_layout (cr, overlay->layout);
cairo_restore (cr); cairo_restore (cr);
/* draw text */
cairo_save (cr);
cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);
pango_cairo_show_layout (cr, overlay->layout);
cairo_restore (cr);
/* draw outline text */ /* draw outline text */
cairo_save (cr); cairo_save (cr);
cairo_set_source_rgb (cr, 0.0, 0.0, 0.0); cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
@ -1272,12 +1278,6 @@ gst_text_overlay_render_pangocairo (GstTextOverlay * overlay,
cairo_stroke (cr); cairo_stroke (cr);
cairo_restore (cr); cairo_restore (cr);
/* draw text */
cairo_save (cr);
cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);
pango_cairo_show_layout (cr, overlay->layout);
cairo_restore (cr);
cairo_destroy (cr); cairo_destroy (cr);
cairo_surface_destroy (surface); cairo_surface_destroy (surface);
overlay->image_width = width; overlay->image_width = width;