[goffice] Cleaned GOPath from unneeded stuff.
- From: Jean BrÃfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Cleaned GOPath from unneeded stuff.
- Date: Sun, 2 Sep 2012 07:07:10 +0000 (UTC)
commit 448e2748bc8a231ede98e07868dd1495e134146a
Author: Jean Brefort <jean brefort normalesup org>
Date: Sun Sep 2 09:04:30 2012 +0200
Cleaned GOPath from unneeded stuff.
ChangeLog | 7 +++++++
goffice/graph/gog-axis.c | 7 ++++---
goffice/utils/go-path.c | 14 +++-----------
goffice/utils/go-path.h | 6 +-----
4 files changed, 15 insertions(+), 19 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 00fa187..71b3224 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-09-02 Jean Brefort <jean brefort normalesup org>
+
+ * goffice/graph/gog-axis.c (gog_axis_view_padding_request): accept an
+ axis which parent is not a chart.
+ * goffice/utils/go-path.c (go_path_new_from_odf_enhanced_path): commented.
+ * goffice/utils/go-path.h: removed unused diirections.
+
2012-08-28 Jean Brefort <jean brefort normalesup org>
* goffice/canvas/goc-path.c (goc_path_prepare_draw),
diff --git a/goffice/graph/gog-axis.c b/goffice/graph/gog-axis.c
index 48ed61b..5871d7b 100644
--- a/goffice/graph/gog-axis.c
+++ b/goffice/graph/gog-axis.c
@@ -3400,7 +3400,8 @@ gog_axis_view_padding_request (GogView *view,
GogViewAllocation tmp = *bbox;
GogViewRequisition req, available;
GogViewPadding label_padding, child_padding;
- GogChart *chart = GOG_CHART (gog_object_get_parent (view->model));
+ GogObject *parent = gog_object_get_parent (view->model);
+ gboolean is_3d = GOG_IS_CHART (parent) && gog_chart_is_3d (GOG_CHART (parent));
GSList *ptr;
double const pad_h = gog_renderer_pt2r_y (view->renderer, PAD_HACK);
double const pad_w = gog_renderer_pt2r_x (view->renderer, PAD_HACK);
@@ -3413,7 +3414,7 @@ gog_axis_view_padding_request (GogView *view,
child = ptr->data;
pos = child->model->position;
if (GOG_IS_LABEL (child->model) && !(pos & GOG_POSITION_MANUAL)) {
- if (gog_chart_is_3d (chart)) {
+ if (is_3d) {
gog_axis_view_padding_request_3d (view, child,
bbox, &label_padding);
} else {
@@ -3444,7 +3445,7 @@ gog_axis_view_padding_request (GogView *view,
}
}
- if (gog_chart_is_3d (chart)) {
+ if (is_3d) {
/* For 3d chart we have to calculate how much more padding
* is needed for the axis itself */
tmp.x -= label_padding.wl;
diff --git a/goffice/utils/go-path.c b/goffice/utils/go-path.c
index 6bb2eb2..6cba6bd 100644
--- a/goffice/utils/go-path.c
+++ b/goffice/utils/go-path.c
@@ -109,14 +109,6 @@
* GOPathDirection:
* @GO_PATH_DIRECTION_FORWARD: go through the pass from start to end.
* @GO_PATH_DIRECTION_BACKWARD: go through the pass from end to start.
- * @GO_PATH_DIRECTION_FORWARD_SKIP_NO_FILL: go through the pass from start to end,
- * skipping segments markes as no-fill.
- * @GO_PATH_DIRECTION_BACKWARD_SKIP_NO_FILL: go through the pass from end to start,
- * skipping segments markes as no-fill.
- * @GO_PATH_DIRECTION_FORWARD_SKIP_NO_STROKE: go through the pass from start to end,
- * skipping segments markes as no-stroke.
- * @GO_PATH_DIRECTION_BACKWARD_SKIP_NO_STROKE: go through the pass from end to start,
- * skipping segments markes as no-stroke.
**/
#define GO_PATH_DEFAULT_BUFFER_SIZE 64
@@ -1429,7 +1421,7 @@ go_path_new_from_odf_enhanced_path (char const *src, GHashTable const *variables
emit_function_6 (&state, go_path_curve_to);
break;
case 'F':
- state.src++;
+ state.src++; /* ignore */
break;
case 'L':
state.src++;
@@ -1439,7 +1431,7 @@ go_path_new_from_odf_enhanced_path (char const *src, GHashTable const *variables
state.src++;
emit_function_2 (&state, go_path_move_to);
break;
- case 'N': /* new sub path */
+ case 'N': /* new sub path, just ignore */
state.src++;
break;
case 'Q':
@@ -1447,7 +1439,7 @@ go_path_new_from_odf_enhanced_path (char const *src, GHashTable const *variables
emit_quadratic (&state);
break;
case 'S':
- state.src++;
+ state.src++; /* ignore */
break;
case 'T':
state.src++;
diff --git a/goffice/utils/go-path.h b/goffice/utils/go-path.h
index 8bfc926..fe0f5f1 100644
--- a/goffice/utils/go-path.h
+++ b/goffice/utils/go-path.h
@@ -37,11 +37,7 @@ G_BEGIN_DECLS
typedef enum {
GO_PATH_DIRECTION_FORWARD,
- GO_PATH_DIRECTION_BACKWARD,
- GO_PATH_DIRECTION_FORWARD_SKIP_NO_FILL,
- GO_PATH_DIRECTION_BACKWARD_SKIP_NO_FILL,
- GO_PATH_DIRECTION_FORWARD_SKIP_NO_STROKE,
- GO_PATH_DIRECTION_BACKWARD_SKIP_NO_STROKE
+ GO_PATH_DIRECTION_BACKWARD
} GOPathDirection;
typedef enum {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]