goffice r2280 - trunk/goffice/graph
- From: jbrefort svn gnome org
- To: svn-commits-list gnome org
- Subject: goffice r2280 - trunk/goffice/graph
- Date: Mon, 24 Nov 2008 17:52:24 +0000 (UTC)
Author: jbrefort
Date: Mon Nov 24 17:52:24 2008
New Revision: 2280
URL: http://svn.gnome.org/viewvc/goffice?rev=2280&view=rev
Log:
Commited the wrong version. This one is correct.
Modified:
trunk/goffice/graph/gog-chart-map.c
Modified: trunk/goffice/graph/gog-chart-map.c
==============================================================================
--- trunk/goffice/graph/gog-chart-map.c (original)
+++ trunk/goffice/graph/gog-chart-map.c Mon Nov 24 17:52:24 2008
@@ -328,7 +328,7 @@
GOPath *path;
int i, n_valid_points = 0;
double *uu, *vv, u, v;
- double p0, p1; /* clamped derivatives */
+ double p0 = 0., p1 = 0.; /* clamped derivatives */
struct GOCSpline *spline;
path = go_path_new ();
@@ -339,16 +339,6 @@
vv = g_new (double, n_points);
n_valid_points = 0;
- if (type == GO_CSPLINE_CLAMPED && data != NULL) {
- p0 = gog_chart_map_2D_derivative_to_view (map, ((double*) data)[0],
- x != NULL ? x[i] : i + 1,
- y != NULL ? y[i] : i + 1);
- p1 = gog_chart_map_2D_derivative_to_view (map, ((double*) data)[1],
- x != NULL ? x[i] : i + 1,
- y != NULL ? y[i] : i + 1);
- } else
- p0 = p1 = 0.;
-
for (i = 0; i < n_points; i++) {
gog_chart_map_2D_to_view (map,
x != NULL ? x[i] : i + 1, y != NULL ? y[i] : i + 1,
@@ -394,6 +384,11 @@
go_path_move_to (path, uu[0], vv[0]);
go_path_line_to (path, uu[1], vv[1]);
} else if (n_valid_points > 2) {
+ if (type == GO_CSPLINE_CLAMPED && data != NULL) {
+ p0 = gog_chart_map_2D_derivative_to_view (map, ((double*) data)[0], uu[0], vv[0]);
+ p1 = gog_chart_map_2D_derivative_to_view (map, ((double*) data)[1],
+ uu[n_valid_points - 1], vv[n_valid_points - 1]);
+ }
spline = go_cspline_init (uu, vv, n_valid_points, type, p0, p1);
if (spline) {
double x0, x1, x2, x3, y0, y1, y2, y3;
@@ -911,7 +906,7 @@
/**
- * gog_chart_map_2D_to_view:
+ * gog_chart_map_2D_derivative_to_view:
* @map: a #GogChartMap
* @deriv: the slope in data space
* @x: data x value
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]