[eog] Fix svg rendering with gtk >= 3.9.2
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] Fix svg rendering with gtk >= 3.9.2
- Date: Sat, 20 Jul 2013 18:19:11 +0000 (UTC)
commit a33950c14d7b8da8e1c6289709022affb910be2a
Author: Sebastian Keller <sebastian-keller gmx de>
Date: Wed Jul 17 02:28:14 2013 +0200
Fix svg rendering with gtk >= 3.9.2
eog was ignoring the matrix set in the cairo context which now in the
new simplified drawing world is supposed to position the widget
src/eog-scroll-view.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/eog-scroll-view.c b/src/eog-scroll-view.c
index f735952..a7c8ee9 100644
--- a/src/eog-scroll-view.c
+++ b/src/eog-scroll-view.c
@@ -1846,7 +1846,7 @@ display_draw (GtkWidget *widget, cairo_t *cr, gpointer data)
#ifdef HAVE_RSVG
if (eog_image_is_svg (view->priv->image)) {
- cairo_matrix_t matrix, translate, scale;
+ cairo_matrix_t matrix, translate, scale, original;
EogTransform *transform = eog_image_get_transform (priv->image);
cairo_matrix_init_identity (&matrix);
if (transform) {
@@ -1883,6 +1883,8 @@ display_draw (GtkWidget *widget, cairo_t *cr, gpointer data)
cairo_matrix_init_translate (&translate, xofs, yofs);
cairo_matrix_multiply (&matrix, &matrix, &translate);
+ cairo_get_matrix (cr, &original);
+ cairo_matrix_multiply (&matrix, &matrix, &original);
cairo_set_matrix (cr, &matrix);
rsvg_handle_render_cairo (eog_image_get_svg (priv->image), cr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]