[goffice] Fixed image clipping. [#686490]
- From: Jean BrÃfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Fixed image clipping. [#686490]
- Date: Sat, 20 Oct 2012 11:20:45 +0000 (UTC)
commit eb2886c00d882315888ed106ea08e2ba446c98a1
Author: Jean Brefort <jean brefort normalesup org>
Date: Sat Oct 20 13:20:23 2012 +0200
Fixed image clipping. [#686490]
ChangeLog | 4 ++++
NEWS | 1 +
goffice/canvas/goc-image.c | 4 ++--
3 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5da2100..fd280e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2012-10-20 Jean Brefort <jean brefort normalesup org>
+ * goffice/canvas/goc-image.c (goc_image_draw): fix image clipping. [#686490]
+
+2012-10-20 Jean Brefort <jean brefort normalesup org>
+
* goffice/graph/gog-label.c (gog_text_view_size_request),
(gog_text_view_render): fix rotated frames position.
* goffice/gtk/go-rotation-sel.c (cb_rotate_changed),
diff --git a/NEWS b/NEWS
index 5fcc25c..dd0130f 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,7 @@ Jean:
* Don't draw a marker in the legend when not needed. [#685484]
* Restore pixel aligned lines. [#686476]
* Fixed position of rotated label frame. [#686478]
+ * Fixed image clipping. [#686490]
--------------------------------------------------------------------------
goffice 0.9.6:
diff --git a/goffice/canvas/goc-image.c b/goffice/canvas/goc-image.c
index 2812f6e..9db8516 100644
--- a/goffice/canvas/goc-image.c
+++ b/goffice/canvas/goc-image.c
@@ -238,10 +238,10 @@ goc_image_draw (GocItem const *item, cairo_t *cr)
image->x + image->width: image->x;
goc_group_cairo_transform (item->parent, cr, x, (int) image->y);
cairo_rotate (cr, image->rotation);
- if (scalex != 1. || scaley != 1.)
- cairo_scale (cr, scalex, scaley);
cairo_rectangle (cr, 0, 0, image->width, image->height);
cairo_clip (cr);
+ if (scalex != 1. || scaley != 1.)
+ cairo_scale (cr, scalex, scaley);
cairo_translate (cr, -go_image_get_width (image->image) * image->crop_left,
-go_image_get_height (image->image) * image->crop_top);
cairo_move_to (cr, 0, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]