GNOME Bugzilla – Bug 735879
basetetxtoverlay: make shading_value a property
Last modified: 2014-09-08 20:28:30 UTC
Created attachment 285129 [details] [review] make shading_value a property shading_value is hardcoded to 80 (1-255 range), this patch make it configurable. I don't understand this code: http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/ext/pango/gstbasetextoverlay.c#n1554 cairo_paint_with_alpha require a double while shading_value is an integer however background shading is done in methods like these: http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/ext/pango/gstbasetextoverlay.c#n1633 http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/ext/pango/gstbasetextoverlay.c#n1652
One makes the subpicture (that is overlayed) transparent with that value, the other darkens it. commit ad16f15ee420ed32cf436efc309b2ae08d78fa2f Author: Nicola Murino <nicola.murino@gmail.com> Date: Tue Sep 2 13:10:34 2014 +0200 basetextoverlay: Make shading_value a property https://bugzilla.gnome.org/show_bug.cgi?id=735879
ok but from cairo docs: " void cairo_paint_with_alpha (cairo_t *cr, double alpha); alpha : alpha value, between 0 (transparent) and 1 (opaque) " we now pass a negative integer between -1 and -255 (before this patch we passed -80), maybe we should do something like this (not tested): cairo_paint_with_alpha (cr, overlay->shading_value/255.0); instead of: cairo_paint_with_alpha (cr, -overlay->shading_value);
Can you create a new bug for that?
ok, if you confirm that I'm right I'll attach a patch to the new bug too
can you please push to 1.4 please?