textoverlay: Do shading as first operation

This commit is contained in:
Sebastian Dröge 2009-10-22 09:31:34 +02:00
parent eccd28d7b0
commit 21ad7547a0

View file

@ -1239,6 +1239,9 @@ gst_text_overlay_render_pangocairo (GstTextOverlay * overlay,
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
if (overlay->want_shading)
cairo_paint_with_alpha (cr, overlay->shading_value);
/* apply transformations */
cairo_set_matrix (cr, &cairo_matrix);
@ -1259,10 +1262,6 @@ gst_text_overlay_render_pangocairo (GstTextOverlay * overlay,
cairo_stroke_preserve (cr);
cairo_restore (cr);
if (overlay->want_shading) {
cairo_paint_with_alpha (cr, overlay->shading_value);
}
/* draw text */
cairo_save (cr);
cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);