[Bug 795850] textoverlay: add background-color property
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Mon Sep 10 13:33:53 UTC 2018
https://bugzilla.gnome.org/show_bug.cgi?id=795850
Sebastian Dröge (slomo) <slomo at coaxion.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #371743|none |needs-work
status| |
--- Comment #12 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 371743:
--> (https://bugzilla.gnome.org/review?bug=795850&attachment=371743)
::: ext/pango/gstbasetextoverlay.c
@@ +2020,3 @@
+ cairo_set_source_rgba (cr, r / 255.0, g / 255.0, b / 255.0, a / 255.0);
+ cairo_rectangle (cr, ink_rect.x, ink_rect.y, ink_rect.width,
ink_rect.height);
+ cairo_fill (cr);
It would be better to just do this as part of the clearing of the surface in
the very beginning. Use the SOURCE instead of CLEAR operator for that then.
Also the ink rectangle is suboptimal. See the docs of
pango_layout_get_extents():
> Computes the logical and ink extents of layout . Logical extents are usually what you want for
> positioning things. Note that both extents may have non-zero x and y. You may want to use those to
> offset where you render the layout. Not doing that is a very typical bug that shows up as right-to-
> left layouts not being correctly positioned in a layout with a set width.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list