From 5164643aa1cd26dc1be7a7b68ebfb6185f4a338f Mon Sep 17 00:00:00 2001
From: Jonathan Wilkes <jancsika@yahoo.com>
Date: Sat, 23 Aug 2014 12:24:00 -0400
Subject: [PATCH] fixed baseline anchor point for bargraph style garray when
 viewed inside its subpatch

---
 pd/src/g_template.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/pd/src/g_template.c b/pd/src/g_template.c
index adb60b26d..dabe2bfee 100644
--- a/pd/src/g_template.c
+++ b/pd/src/g_template.c
@@ -5779,6 +5779,12 @@ static void old_plot_vis(t_gobj *z, t_glist *glist, t_glist *parentglist,
                             py2 = y2;
                             //border = 1;
                         }
+                        else
+                        {
+                            py2 = (int)(glist_getcanvas(glist)->gl_screeny2
+                             - glist_getcanvas(glist)->gl_screeny1);
+                        }
+
                     }
                 //fprintf(stderr,"%f %f %f %f %f\n", basey, minyval, maxyval,glist->gl_y2,glist->gl_y1);
                 // with the following experimental code we can prevent drawing outside the gop window (preferred but needs to be further tested)
-- 
GitLab