[goffice] Fix default ticks position.



commit 670f0f812b34a95009439028fd9c7afab3231e70
Author: Jean Brefort <jean brefort normalesup org>
Date:   Sun Jul 20 20:02:52 2014 +0200

    Fix default ticks position.

 ChangeLog                    |    6 ++++++
 NEWS                         |    1 +
 goffice/graph/gog-axis.c     |    2 +-
 goffice/graph/gog-renderer.c |    3 ++-
 4 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 302e554..8eb470b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-07-20  Jean Brefort  <jean brefort normalesup org>
+
+       * goffice/graph/gog-axis.c (gog_axis_init): center ticks by default.
+       * goffice/graph/gog-renderer.c (_draw_rotated_shape): add a missing
+       cairo_restore() call.
+
 2014-07-19  Jean Brefort  <jean brefort normalesup org>
 
        * goffice/graph/gog-trend-line.c (gog_trend_line_init_style): fix another
diff --git a/NEWS b/NEWS
index a88f4af..f50cfd8 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ goffice 0.10.18:
 
 Jean:
        * Fix grid line theme support. [#733403]
+       * Fix default ticks position.
 
 --------------------------------------------------------------------------
 goffice 0.10.17:
diff --git a/goffice/graph/gog-axis.c b/goffice/graph/gog-axis.c
index d51c62f..607d440 100644
--- a/goffice/graph/gog-axis.c
+++ b/goffice/graph/gog-axis.c
@@ -3530,7 +3530,7 @@ gog_axis_init (GogAxis *axis)
        axis->max_val = -DBL_MAX;
        axis->min_contrib = axis->max_contrib = NULL;
        axis->is_discrete = FALSE;
-       axis->center_on_ticks = FALSE;
+       axis->center_on_ticks = TRUE;
        axis->labels = NULL;
        axis->plot_that_supplied_labels = NULL;
        axis->format = axis->assigned_format = NULL;
diff --git a/goffice/graph/gog-renderer.c b/goffice/graph/gog-renderer.c
index 99bb13b..ec70363 100644
--- a/goffice/graph/gog-renderer.c
+++ b/goffice/graph/gog-renderer.c
@@ -491,7 +491,8 @@ _draw_rotated_shape (GogRenderer *renderer, GOPath const *path, gboolean fill, g
                        cairo_restore (renderer->cairo);
                        emit_fill (renderer, stroke);
                }
-       }
+       } else
+               cairo_restore (renderer->cairo);
 
        if (stroke)
                emit_line (renderer, FALSE, go_path_get_options (path));


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