*** grid.c.orig Sun May 23 09:27:37 1999 --- grid.c Sun May 23 09:27:37 1999 *************** *** 122,160 **** static ! void DoDrawGridLines(Win, LtX, LtY, W, H, WithRestriction) ! Window Win; ! int LtX, LtY, W, H; /* screen offsets */ ! int WithRestriction; { - int i, inc=0, abs_grid=0, step=ENGLISH_GRID_STEP; - int x_start, y_start, x_end, y_end, x_grid_start, y_grid_start; - - if (!gridShown || (inSlideShow && !visibleGridInSlideShow)) return; - switch (gridSystem) { case ENGLISH_GRID: ! inc = HALF_INCH; ! step = ENGLISH_GRID_STEP; break; case METRIC_GRID: if (zoomedIn && zoomScale > 1) { ! inc = (FAKE_CM>>1); } else { ! inc = ONE_CM; } ! step = METRIC_GRID_STEP; break; } ! abs_grid = ABS_SIZE(inc); ! if (drawOrigX % abs_grid == 0) { x_start = 0; } else { ! x_start = OFFSET_X(((int)(drawOrigX / abs_grid) + 1) * abs_grid); } ! if (drawOrigY % abs_grid == 0) { y_start = 0; } else { ! y_start = OFFSET_Y(((int)(drawOrigY / abs_grid) + 1) * abs_grid); } x_end = min(OFFSET_X(paperWidth), OFFSET_X(drawOrigX+drawWinW)); --- 122,164 ---- static ! void DrawGridLinesSetVars(pn_inc, pn_step, pn_abs_inc) ! int *pn_inc, *pn_step, *pn_abs_inc; { switch (gridSystem) { case ENGLISH_GRID: ! *pn_inc = HALF_INCH; ! *pn_step = ENGLISH_GRID_STEP; break; case METRIC_GRID: if (zoomedIn && zoomScale > 1) { ! *pn_inc = (FAKE_CM>>1); } else { ! *pn_inc = ONE_CM; } ! *pn_step = METRIC_GRID_STEP; break; } ! *pn_abs_inc = ABS_SIZE(*pn_inc); ! } ! void RedrawGridLines(Win) ! Window Win; ! { ! int i, inc=0, abs_inc=0, step=ENGLISH_GRID_STEP; ! int x_start, y_start, x_end, y_end, x_grid_start, y_grid_start; ! ! if (!gridShown || (inSlideShow && !visibleGridInSlideShow)) return; ! ! DrawGridLinesSetVars(&inc, &step, &abs_inc); ! ! if (drawOrigX % abs_inc == 0) { x_start = 0; } else { ! x_start = OFFSET_X(((int)(drawOrigX / abs_inc) + 1) * abs_inc); } ! if (drawOrigY % abs_inc == 0) { y_start = 0; } else { ! y_start = OFFSET_Y(((int)(drawOrigY / abs_inc) + 1) * abs_inc); } x_end = min(OFFSET_X(paperWidth), OFFSET_X(drawOrigX+drawWinW)); *************** *** 173,184 **** ZOOMED_SIZE(drawOrigY); } - if (WithRestriction) { - int rbx=LtX+W+1, rby=LtY+H+1; - - while (x_start+inc+1 < LtX) x_start += inc; - while (y_start+inc+1 < LtY) y_start += inc; - while (x_end-inc > rbx) x_end -= inc; - while (y_end-inc > rby) y_end -= inc; - } for (i=x_start; i < x_end; i += inc) { MyVDotLine(Win, i, y_grid_start, y_end); --- 177,180 ---- *************** *** 189,198 **** } - void RedrawGridLines(Win) - Window Win; - { - DoDrawGridLines(Win, 0, 0, 0, 0, FALSE); - } - void DrawGridLines(Win, LtX, LtY, W, H) Window Win; --- 185,188 ---- *************** *** 199,203 **** int LtX, LtY, W, H; /* screen offsets */ { ! DoDrawGridLines(Win, LtX, LtY, W, H, TRUE); } --- 189,249 ---- int LtX, LtY, W, H; /* screen offsets */ { ! int i, inc=0, abs_inc=0, step=ENGLISH_GRID_STEP; ! int x_start, y_start, x_end, y_end, x_grid_start, y_grid_start; ! int x_grid_end=0, y_grid_end=0, rbx=0, rby=0, x_max=0, y_max=0; ! ! if (!gridShown || (inSlideShow && !visibleGridInSlideShow)) return; ! ! DrawGridLinesSetVars(&inc, &step, &abs_inc); ! ! /* large divisions - use 'inc' */ ! if (drawOrigX % abs_inc == 0) { ! x_start = 0; ! } else { ! x_start = OFFSET_X(((int)(drawOrigX / abs_inc) + 1) * abs_inc); ! } ! if (drawOrigY % abs_inc == 0) { ! y_start = 0; ! } else { ! y_start = OFFSET_Y(((int)(drawOrigY / abs_inc) + 1) * abs_inc); ! } ! x_max = min(OFFSET_X(paperWidth), OFFSET_X(drawOrigX+drawWinW)); ! y_max = min(OFFSET_Y(paperHeight), OFFSET_Y(drawOrigY+drawWinH)); ! while (x_start+1 < LtX) x_start += inc; ! while (y_start+1 < LtY) y_start += inc; ! for (x_end=x_start; x_end < LtX+W+1; x_end += inc) { ! if (x_end >= x_max) { ! break; ! } ! } ! x_end -= inc; ! for (y_end=y_start; y_end < LtY+H+1; y_end += inc) { ! if (y_end >= y_max) { ! break; ! } ! } ! y_end -= inc; ! /* small divisions - use 'step' */ ! x_grid_start = x_start-inc; ! y_grid_start = y_start-inc; ! while (x_grid_start+1 < LtX) x_grid_start += step; ! while (y_grid_start+1 < LtY) y_grid_start += step; ! for (x_grid_end=x_end+step; x_grid_end < LtX+W+1; x_grid_end += step) { ! if (x_grid_end >= x_max) { ! break; ! } ! } ! for (y_grid_end=y_end+step; y_grid_end < LtY+H+1; y_grid_end += step) { ! if (y_grid_end >= y_max) { ! break; ! } ! } ! ! for (i=x_start; i <= x_end; i += inc) { ! MyVDotLine(Win, i, y_grid_start, y_grid_end); ! } ! for (i=y_start; i <= y_end; i += inc) { ! MyHDotLine(Win, i, x_grid_start, x_grid_end); ! } } *** stretch.c.orig Sun May 23 09:27:38 1999 --- stretch.c Sun May 23 09:27:38 1999 *************** *** 3359,3362 **** --- 3359,3364 ---- } UtilTrimBlanks(spec); + if (*spec == '\0') return; + if (sscanf(spec, "%f", &fval) != 1) { sprintf(gszMsgBox, "Cannot parse '%s'.\n\nPlease enter a numeric value!", *************** *** 3396,3399 **** --- 3398,3403 ---- } UtilTrimBlanks(spec); + if (*spec == '\0') return; + if (sscanf(spec, "%f", &fval) != 1) { sprintf(gszMsgBox, "Cannot parse '%s'.\n\nPlease enter a numeric value!", *** text.c.orig Sun May 23 09:27:40 1999 --- text.c Sun May 23 09:27:41 1999 *************** *** 863,867 **** SetBBRec(&bbox, ltx1, lty1, rbx1, rby1); ! UnionRect(&bbox, &curTextObj->bbox, &bbox); RedrawAreas(botObj, bbox.ltx-GRID_ABS_SIZE(2), bbox.lty-GRID_ABS_SIZE(2), bbox.rbx+GRID_ABS_SIZE(2), bbox.rby+GRID_ABS_SIZE(2), --- 863,869 ---- SetBBRec(&bbox, ltx1, lty1, rbx1, rby1); ! if (curTextObj != NULL) { ! UnionRect(&bbox, &curTextObj->bbox, &bbox); ! } RedrawAreas(botObj, bbox.ltx-GRID_ABS_SIZE(2), bbox.lty-GRID_ABS_SIZE(2), bbox.rbx+GRID_ABS_SIZE(2), bbox.rby+GRID_ABS_SIZE(2), *** patchlvl.h.orig Sun May 23 09:27:43 1999 --- patchlvl.h Sun May 23 09:27:43 1999 *************** *** 35,39 **** #define _TGIF_PATCHLEVEL_H_ ! #define TGIF_PATCHLEVEL 11 #endif /*_TGIF_PATCHLEVEL_H_*/ --- 35,39 ---- #define _TGIF_PATCHLEVEL_H_ ! #define TGIF_PATCHLEVEL 12 #endif /*_TGIF_PATCHLEVEL_H_*/ *** Imakefile.orig Sun May 23 09:27:44 1999 --- Imakefile Sun May 23 09:27:44 1999 *************** *** 53,57 **** $(MOREDEFINES) ! TGIFVERSION = 4.1.11 XCOMM Things to try to add to the DEFINES line above: --- 53,57 ---- $(MOREDEFINES) ! TGIFVERSION = 4.1.12 XCOMM Things to try to add to the DEFINES line above: *** HISTORY.orig Sun May 23 09:27:45 1999 --- HISTORY Sun May 23 09:27:45 1999 *************** *** 1,2 **** --- 1,9 ---- + -----------------------> tgif-4.1.11 => tgif-4.1.12 <----------------------- + Here's a short list of added features/bug fixes. + + 1) Fix a seg fault bug with creating a rotated text. Thanks to Ralphe Neill + for pointing out the problem. + 2) Fix some grid lines redraw problems. + -----------------------> tgif-4.1.10 => tgif-4.1.11 <----------------------- Here's a short list of added features/bug fixes.