[goffice] Fix the parameters of the go_data_get_matrix_value call.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: svn-commits-list gnome org
- Subject: [goffice] Fix the parameters of the go_data_get_matrix_value call.
- Date: Thu, 23 Apr 2009 11:07:00 -0400 (EDT)
commit 9aabaa4028e2132a48c067f8b0a1c6f4fd559b10
Author: Emmanuel Pacaud <emmanuel pacaud lapp in2p3 fr>
Date: Tue Apr 21 17:01:27 2009 +0200
Fix the parameters of the go_data_get_matrix_value call.
We probably should avoid the use of get_value in this case, which is
too costly. Why not call get_values and handle the transpose issue
by switching the array indices ?
---
plugins/plot_surface/gog-contour.c | 6 +++---
plugins/plot_surface/gog-surface.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/plugins/plot_surface/gog-contour.c b/plugins/plot_surface/gog-contour.c
index e94e416..54045db 100644
--- a/plugins/plot_surface/gog-contour.c
+++ b/plugins/plot_surface/gog-contour.c
@@ -93,7 +93,7 @@ gog_contour_plot_build_matrix (GogXYZPlot const *plot, gboolean *cardinality_cha
for (i = 0; i < plot->rows; i++)
for (j = 0; j < plot->columns; j++) {
val = gog_axis_map_to_view (map,
- go_data_get_matrix_value (mat, j, i));
+ go_data_get_matrix_value (mat, i, j));
if (fabs (val) == DBL_MAX)
val = go_nan;
else {
@@ -365,8 +365,8 @@ gog_contour_view_render (GogView *view, GogViewAllocation const *bbox)
y0 = gog_axis_map_to_view (y_map, i);
y1 = gog_axis_map_to_view (y_map, i + 1);
} else {
- y0 = gog_axis_map_to_view (y_map, go_data_vector_get_value (y_vec, i - 1));
- y1 = gog_axis_map_to_view (y_map, go_data_vector_get_value (y_vec, i));
+ y0 = gog_axis_map_to_view (y_map, go_data_get_vector_value (y_vec, i - 1));
+ y1 = gog_axis_map_to_view (y_map, go_data_get_vector_value (y_vec, i));
}
nans = 0;
nan = 4;
diff --git a/plugins/plot_surface/gog-surface.c b/plugins/plot_surface/gog-surface.c
index b9fda6e..88cba9b 100644
--- a/plugins/plot_surface/gog-surface.c
+++ b/plugins/plot_surface/gog-surface.c
@@ -50,7 +50,7 @@ gog_surface_plot_build_matrix (GogXYZPlot const *plot, gboolean *cardinality_cha
for (i = 0; i < plot->rows; i++)
for (j = 0; j < plot->columns; j++) {
- val = go_data_get_matrix_value (mat, j, i);
+ val = go_data_get_matrix_value (mat, i, j);
if (plot->transposed)
data[j * plot->rows + i] = val;
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]