[PD-cvs] pd/src g_canvas.c,1.18.6.2,1.18.6.3
Hans-Christoph Steiner
eighthave at users.sourceforge.net
Sat Nov 10 05:50:19 CET 2007
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15413
Modified Files:
Tag: branch-v0-40-extended
g_canvas.c
Log Message:
found the source of the 2px growing bug, basically, Tk was automatically
drawing a 2px "highlightborder" around the canvas, and would return that value
sometimes, I don't really know the details. But by setting "-highlightborder
0" and then removing the 2px adjustment code, it fixes the bug on my
computer. Now it's time to try it on GNU/Linux, then make a patch.
Index: g_canvas.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_canvas.c,v
retrieving revision 1.18.6.2
retrieving revision 1.18.6.3
diff -C2 -d -r1.18.6.2 -r1.18.6.3
*** g_canvas.c 9 Nov 2007 06:28:44 -0000 1.18.6.2
--- g_canvas.c 10 Nov 2007 04:50:17 -0000 1.18.6.3
***************
*** 1093,1109 ****
}
- /* When you ask a canvas its size the result is 2 pixels more than what
- you gave it to open it; perhaps there's a 1-pixel border all around it
- or something. Anyway, we just add the 2 pixels back here; seems we
- have to do this for linux but not MSW; not sure about MacOS. */
-
- #ifdef MSW
- #define HORIZBORDER 0
- #define VERTBORDER 0
- #else
- #define HORIZBORDER 2
- #define VERTBORDER 2
- #endif
-
static void canvas_relocate(t_canvas *x, t_symbol *canvasgeom,
t_symbol *topgeom)
--- 1093,1096 ----
***************
*** 1118,1122 ****
if (cw > 5 && ch > 5)
canvas_setbounds(x, txpix, typix,
! txpix + cw - HORIZBORDER, typix + ch - VERTBORDER);
}
--- 1105,1109 ----
if (cw > 5 && ch > 5)
canvas_setbounds(x, txpix, typix,
! txpix + cw, typix + ch);
}
More information about the Pd-cvs
mailing list