From b59f40f5fd2efe7453718ef1492514be0219cb97 Mon Sep 17 00:00:00 2001 From: Jonathan Wilkes <jon.w.wilkes@gmail.com> Date: Mon, 5 Dec 2016 18:12:11 -0500 Subject: [PATCH] fix #182: new [table] don't display a graph by default. Ensure that "stroke-width" is positive --- pd/src/g_template.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pd/src/g_template.c b/pd/src/g_template.c index 6a7defc09..81d080ffe 100644 --- a/pd/src/g_template.c +++ b/pd/src/g_template.c @@ -5861,7 +5861,8 @@ static void plot_vis(t_gobj *z, t_glist *glist, t_glist *parentglist, gui_s(symoutline->s_name); gui_s("stroke-width"); - gui_f(style == PLOTSTYLE_POINTS ? 0 : y_inverse); + gui_f(style == PLOTSTYLE_POINTS ? 0 : + y_inverse * (y_inverse >= 0 ? 1 : -1)); gui_end_array(); /* tags */ @@ -5973,7 +5974,7 @@ static void plot_vis(t_gobj *z, t_glist *glist, t_glist *parentglist, gui_start_array(); gui_s("stroke-width"); - gui_f(y_inverse); + gui_f(y_inverse * (y_inverse >= 0 ? 1 : -1)); gui_s("stroke"); gui_s(symoutline->s_name); gui_s("fill"); @@ -6052,7 +6053,7 @@ static void plot_vis(t_gobj *z, t_glist *glist, t_glist *parentglist, gui_start_array(); gui_s("stroke-width"); - gui_f(linewidth * y_inverse); + gui_f(linewidth * (y_inverse * (y_inverse >= 0 ? 1 : -1))); gui_s("stroke"); gui_s(symoutline->s_name); gui_s("fill"); -- GitLab