Commit 56e38d5a authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

Death to tcl Part 2: clean up or annotate the "quick-n-dirty" commented code.

"Quick-n-dirty" means the "//" comment itself isn't indented.
parent fba83c7c
...@@ -806,8 +806,10 @@ void array_getcoordinate(t_glist *glist, ...@@ -806,8 +806,10 @@ void array_getcoordinate(t_glist *glist,
if (yonset >= 0) if (yonset >= 0)
yval = *(t_float *)(elem + yonset); yval = *(t_float *)(elem + yonset);
else yval = 0; else yval = 0;
// ypix = glist_ytopixels(glist, basey + /* This is from the old API. Now we group drawing instructions in
// fielddesc_cvttocoord(yfielddesc, yval)); a hierarchy so we can do glist_ytopixels math on the GUI side */
//ypix = glist_ytopixels(glist, basey +
// fielddesc_cvttocoord(yfielddesc, yval));
ypix = basey + fielddesc_cvttocoord(yfielddesc, yval); ypix = basey + fielddesc_cvttocoord(yfielddesc, yval);
if (glist_topixels) if (glist_topixels)
ypix = glist_ytopixels(glist, ypix); ypix = glist_ytopixels(glist, ypix);
...@@ -815,9 +817,10 @@ void array_getcoordinate(t_glist *glist, ...@@ -815,9 +817,10 @@ void array_getcoordinate(t_glist *glist,
{ {
/* found "w" field which controls linewidth. */ /* found "w" field which controls linewidth. */
t_float wval = *(t_float *)(elem + wonset); t_float wval = *(t_float *)(elem + wonset);
// wpix = glist_ytopixels(glist, basey + /* ytopixels is now done GUI-side */
// fielddesc_cvttocoord(yfielddesc, yval) + //wpix = glist_ytopixels(glist, basey +
// fielddesc_cvttocoord(wfielddesc, wval)) - ypix; // fielddesc_cvttocoord(yfielddesc, yval) +
// fielddesc_cvttocoord(wfielddesc, wval)) - ypix;
wpix = basey + fielddesc_cvttocoord(yfielddesc, yval) + wpix = basey + fielddesc_cvttocoord(yfielddesc, yval) +
fielddesc_cvttocoord(wfielddesc, wval); fielddesc_cvttocoord(wfielddesc, wval);
if (glist_topixels) if (glist_topixels)
...@@ -1482,7 +1485,9 @@ static void garray_doredraw(t_gobj *client, t_glist *glist) ...@@ -1482,7 +1485,9 @@ static void garray_doredraw(t_gobj *client, t_glist *glist)
//fprintf(stderr,"check if we need to reselect %lx %lx %lx\n", //fprintf(stderr,"check if we need to reselect %lx %lx %lx\n",
// glist_getcanvas(glist), (t_gobj *)glist, glist->gl_owner); // glist_getcanvas(glist), (t_gobj *)glist, glist->gl_owner);
int selected = 0; int selected = 0;
// t_glist *sel = glist->gl_owner; /* Unfortunately I forget to comment this. I can't remember why I
use glist instead of glist->gl_owner (quick bugfix maybe?) */
//t_glist *sel = glist->gl_owner;
t_glist *sel = glist; t_glist *sel = glist;
while (sel && sel != glist_getcanvas(glist)) while (sel && sel != glist_getcanvas(glist))
{ {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment