mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
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:
parent
e9d1819fe3
commit
60aa09d28c
1 changed files with 6 additions and 6 deletions
|
@ -1264,6 +1264,12 @@ gst_text_overlay_render_pangocairo (GstTextOverlay * overlay,
|
|||
pango_cairo_show_layout (cr, overlay->layout);
|
||||
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 */
|
||||
cairo_save (cr);
|
||||
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_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_surface_destroy (surface);
|
||||
overlay->image_width = width;
|
||||
|
|
Loading…
Reference in a new issue