[goffice] Reversed unwanted changes



commit 5f3a39d5601fe6add9efb1a17d2db6bc4f153898
Author: Jean Brefort <jean brefort normalesup org>
Date:   Fri Oct 19 21:04:22 2012 +0200

    Reversed unwanted changes

 goffice/graph/gog-renderer.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/goffice/graph/gog-renderer.c b/goffice/graph/gog-renderer.c
index a0e8896..ff18391 100644
--- a/goffice/graph/gog-renderer.c
+++ b/goffice/graph/gog-renderer.c
@@ -686,7 +686,7 @@ _draw_rotated_rectangle (GogRenderer *rend, GogViewAllocation const *rect, gbool
 	GOStyle const *style;
 	GOPath *path;
 	gboolean narrow = (rect->w < 3.) || (rect->h < 3.);
-	double o, h, w;
+	double o, o_2;
 
 	g_return_if_fail (GOG_IS_RENDERER (rend));
 	g_return_if_fail (GO_IS_STYLE (rend->cur_style));
@@ -698,16 +698,15 @@ _draw_rotated_rectangle (GogRenderer *rend, GogViewAllocation const *rect, gbool
 	go_path_set_options (path, GO_PATH_OPTIONS_SHARP);
 
 	if (!narrow) {
-		o = gog_renderer_line_size (rend, style->line.width) * 2.;
+		o = gog_renderer_line_size (rend, style->line.width);
+		o_2 = o / 2.;
 	} else
-		o = 0.;
+		o = o_2 = 0.;
 
-	w = (rect->w - o) / 2.;
-	h = (rect->h - o) / 2.;
-	go_path_rectangle (path, -w, -h, rect->w - o, rect->h - o);
+	go_path_rectangle (path, 0., 0., rect->w - o, rect->h - o);
 
 	cairo_save (rend->cairo);
-	cairo_translate (rend->cairo, rect->x + w, rect->y + h);
+	cairo_translate (rend->cairo, rect->x - o_2, rect->y - o_2);
 	_draw_rotated_shape (rend, path, fill, stroke && !narrow, rotate_bg);
 	cairo_restore (rend->cairo);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]