[vte/vte-0-56] widget: Avoid double painting of letters
- From: Egmont Koblinger <egmontkob src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/vte-0-56] widget: Avoid double painting of letters
- Date: Mon, 6 May 2019 18:03:10 +0000 (UTC)
commit 14fac9f56d923cbb23b0c114ddf630fe36c5163c
Author: Egmont Koblinger <egmont gmail com>
Date: Mon May 6 19:57:35 2019 +0200
widget: Avoid double painting of letters
In some cases a piece of text was overstriked with itself,
resulting in bolder look at antialiased edges.
https://gitlab.gnome.org/GNOME/vte/issues/4
(cherry picked from commit 1867af10ea314dc3ab4fb7f7093a8882a2fd3f77)
src/vte.cc | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/src/vte.cc b/src/vte.cc
index 55cab374..0e799cef 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -9365,7 +9365,17 @@ Terminal::widget_draw(cairo_t *cr)
/* and now paint them */
for (n = 0; n < n_rectangles; n++) {
+ /* paint_area() paints more than asked to (entire rows). Without an individual
+ * cropping rectangle around each invocation we might end up with text getting
+ * overstriked with itself, thus appearing bolder. See vte#4.
+ * TODO: refactor so that paint_area() is called at most once for each row, see vte#56. */
+ cairo_save(cr);
+ cairo_rectangle(cr, rectangles[n].x, rectangles[n].y, rectangles[n].width,
rectangles[n].height);
+ cairo_clip(cr);
+
paint_area(&rectangles[n]);
+
+ cairo_restore(cr);
}
g_free (rectangles);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]