summaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-01-04 11:54:38 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-01-04 11:54:38 -0800
commit65c85b39ea8bd6cfcb1ab8a7b70726872bad461a (patch)
treec4d0036a0db48887f250705bdf7fc6a59516882c /profile.c
parent6dc247ff784d5fae6ba5721ff4c9683c1749999a (diff)
downloadsubsurface-65c85b39ea8bd6cfcb1ab8a7b70726872bad461a.tar.gz
Make sure that the calculated deco ends at 0
Without this the cairo_close_path call could do silly looking things (intersecting polygons...). Reported-by: "Robert C. Helling" <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile.c')
-rw-r--r--profile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/profile.c b/profile.c
index 6de888607..cabf49162 100644
--- a/profile.c
+++ b/profile.c
@@ -824,6 +824,7 @@ static void plot_depth_profile(struct graphics_context *gc, struct plot_info *pi
else
line_to(gc, entry->sec, 0);
}
+ line_to(gc, (entry-1)->sec, 0); /* make sure we end at 0 */
cairo_close_path(gc->cr);
cairo_fill(gc->cr);
}