*** auxtext.c.orig Sat Jun 1 00:13:40 1996 --- auxtext.c Sat Jun 1 00:13:41 1996 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/auxtext.c,v 3.0 1996/05/06 16:03:49 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/auxtext.c,v 3.1 1996/05/31 20:02:50 william Exp $"; #endif *************** *** 1163,1171 **** DumpRGBColorLine(FP, color_index, 0, TRUE); ! ltx = ObjPtr->bbox.ltx; ! lty = ObjPtr->bbox.lty; ! rbx = ObjPtr->bbox.rbx-1; ! rby = ObjPtr->bbox.rby-1; switch (fill) { --- 1163,1192 ---- DumpRGBColorLine(FP, color_index, 0, TRUE); ! if (ObjPtr->ctm == NULL) { ! ltx = ObjPtr->bbox.ltx; ! lty = ObjPtr->bbox.lty; ! rbx = ObjPtr->bbox.rbx-1; ! rby = ObjPtr->bbox.rby-1; ! } else { ! ltx = ObjPtr->detail.t->orig_bbox.ltx; ! lty = ObjPtr->detail.t->orig_bbox.lty; ! rbx = ObjPtr->detail.t->orig_bbox.rbx-1; ! rby = ObjPtr->detail.t->orig_bbox.rby-1; ! } ! if (ObjPtr->ctm != NULL) { ! float m[6]; + fprintf(FP, "gsave\n"); + m[CTM_SX] = ((float)ObjPtr->ctm->m[CTM_SX])/((float)1000.0); + m[CTM_SY] = ((float)ObjPtr->ctm->m[CTM_SY])/((float)1000.0); + m[CTM_SIN] = ((float)ObjPtr->ctm->m[CTM_SIN])/((float)1000.0); + m[CTM_MSIN] = ((float)ObjPtr->ctm->m[CTM_MSIN])/((float)1000.0); + fprintf (FP, " %1d %1d translate\n", ObjPtr->x, ObjPtr->y); + fprintf (FP, " [%.3f %.3f %.3f %.3f %1d %1d] concat\n", + m[CTM_SX], m[CTM_SIN], m[CTM_MSIN], m[CTM_SY], + ObjPtr->ctm->m[CTM_TX], ObjPtr->ctm->m[CTM_TY]); + fprintf (FP, " %1d neg %1d neg translate\n", ObjPtr->x, ObjPtr->y); + } + switch (fill) { *************** *** 1222,1225 **** --- 1243,1248 ---- break; } + if (ObjPtr->ctm != NULL) fprintf(FP, "grestore\n"); + if (penPat == NONEPAT) { *** drawing.c.orig Sat Jun 1 00:13:44 1996 --- drawing.c Sat Jun 1 00:13:45 1996 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/drawing.c,v 3.2 1996/05/15 17:33:08 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/drawing.c,v 3.3 1996/05/30 14:29:43 william Exp $"; #endif *************** *** 90,93 **** --- 90,94 ---- #include "select.e" #include "setup.e" + #include "shape.e" #include "shortcut.e" #include "special.e" *************** *** 1723,1726 **** --- 1724,1729 ---- } else if (strcmp(name, "ToggleShowCrossHair()") == 0) { ToggleShowCrossHair(); + } else if (strcmp(name, "SetShapeShadow()") == 0) { + SetShapeShadow(); } } *** edit.c.orig Sat Jun 1 00:13:49 1996 --- edit.c Sat Jun 1 00:13:50 1996 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/edit.c,v 3.2 1996/05/24 19:55:04 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/edit.c,v 3.3 1996/05/30 14:29:30 william Exp $"; #endif *************** *** 77,80 **** --- 77,81 ---- #include "select.e" #include "setup.e" + #include "shape.e" #include "special.e" #include "spline.e" *************** *** 120,123 **** --- 121,125 ---- "CutPoly ", "GetBoundingBox ", + "SetShapeShadow ", NULL }; *************** *** 158,161 **** --- 160,164 ---- "Cut a poly/polygon at a vertex into two pieces", "Get polygonal bounding boxes of selected objects", + "Specify the shadow of shapes", NULL }; *************** *** 3074,3077 **** --- 3077,3081 ---- case EDIT_CUT_POLY: CutPoly (); break; case EDIT_GET_BBOX: GetBoundingBox (); break; + case EDIT_SET_SHAPE_SHADOW: SetShapeShadow (); break; } } *** file.c.orig Sat Jun 1 00:13:55 1996 --- file.c Sat Jun 1 00:13:56 1996 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/file.c,v 3.2 1996/05/24 19:55:09 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/file.c,v 3.3 1996/05/30 14:29:35 william Exp $"; #endif *************** *** 125,128 **** --- 125,129 ---- #include "select.e" #include "setup.e" + #include "shape.e" #include "special.e" #include "stk.e" *************** *** 427,432 **** } GetUnitSpec(gszMsgBox); ! if (fprintf(FP, "unit(\"%s\").\n", gszMsgBox) == EOF) { ! writeFileFailed = TRUE; } } --- 428,439 ---- } GetUnitSpec(gszMsgBox); ! if (fprintf(FP, "unit(\"") == EOF) writeFileFailed = TRUE; ! SaveString(FP, gszMsgBox); ! if (fprintf(FP, "\").\n") == EOF) writeFileFailed = TRUE; ! if (shapeShadowInResource || shapeShadowDx != 0 || shapeShadowDy != 0) { ! if (fprintf(FP, "shapeshadow(%1d,%1d).\n", shapeShadowDx, ! shapeShadowDy) == EOF) { ! writeFileFailed = TRUE; ! } } } *************** *** 2001,2005 **** --- 2008,2034 ---- } + #define GETSSVALUE(val,name) ScanValue("%d", &(val), name, "shapeshadow") + static + int ReadShapeShadowObj(Inbuf) + char *Inbuf; + { + if (!importingFile) { + char *s=FindChar((int)'(', Inbuf), *c_ptr; + int dx=0, dy=0; + + InitScan(s, "\t\n, "); + + if (GETSSVALUE(dx, "dx") == INVALID || + GETSSVALUE(dy, "dy") == INVALID) { + return FALSE; + } + shapeShadowDx = dx; + shapeShadowDy = dy; + } + return TRUE; + } + + static int FreeBufAndReturn(buf, rc) char *buf; *************** *** 2224,2227 **** --- 2253,2263 ---- { int ok=ReadUnitObj(line); + + *ObjPtr = NULL; + return FreeBufAndReturn(line, ok); + } + else if (strcmp(obj_name, "shapeshadow") == 0) + { + int ok=ReadShapeShadowObj(line); *ObjPtr = NULL; *** grid.c.orig Sat Jun 1 00:14:00 1996 --- grid.c Sat Jun 1 00:14:01 1996 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/grid.c,v 3.1 1996/05/24 19:55:13 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/grid.c,v 3.3 1996/05/31 14:49:14 william Exp $"; #endif *************** *** 574,582 **** void SetMeasureUnit() { ! char spec[MAXSTRING+1]; sprintf(gszMsgBox, "Please enter '%s' (%s):", " {pixel|cm|in}/", "e.g., 36 in/yd or 0.1 in/mil"); ! Dialog(gszMsgBox, "( : accept, : cancel )", spec); UtilTrimBlanks(spec); if (*spec == '\0') return; --- 574,584 ---- void SetMeasureUnit() { ! char buf[MAXSTRING+1], spec[MAXSTRING+1]; + GetUnitSpec(gszMsgBox); + sprintf(buf, "( current spec: '%s' )", gszMsgBox); sprintf(gszMsgBox, "Please enter '%s' (%s):", " {pixel|cm|in}/", "e.g., 36 in/yd or 0.1 in/mil"); ! Dialog(gszMsgBox, buf, spec); UtilTrimBlanks(spec); if (*spec == '\0') return; *************** *** 943,982 **** } ! void ZoomOut () { ! int xc, yc; ! if (paperWidth <= drawWinW && paperHeight <= drawWinH) ! { ! Msg ("Already at paper boundaries, can no longer zoom out."); return; } ! if (curChoice==DRAWTEXT && textCursorShown) ! PrepareZoomCurText (&xc, &yc); ! else ! { xc = (topSel==NULL) ? ((drawOrigX<<1)+drawWinW)>>1 : (selLtX+selRbX)>>1; yc = (topSel==NULL) ? ((drawOrigY<<1)+drawWinH)>>1 : (selLtY+selRbY)>>1; } ! ! if (curChoice == VERTEXMODE) ! { ! TieLooseEnds (); ! SetCurChoice (NOTHING); } ! ! if (!zoomedIn) zoomScale++; ! else if (zoomScale == 1) ! { zoomedIn = FALSE; zoomScale--; ! } ! else zoomScale--; ! ! PostZoom (xc, yc); ! if (curChoice==DRAWTEXT && textCursorShown) PostZoomCurText (xc, yc); } --- 945,986 ---- } ! void ZoomOut() { ! int xc, yc; ! if (paperWidth <= drawWinW && paperHeight <= drawWinH) { ! strcpy(gszMsgBox, "Already at paper boundaries, can no longer zoom out."); ! MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); return; } + if (curChoice==DRAWTEXT && textCursorShown) { + PrepareZoomCurText(&xc, &yc); + } else if (queryZoomInPoint==BAD) { + Window root_win, child_win; + int root_x, root_y; + unsigned int status; ! XQueryPointer(mainDisplay, drawWindow, &root_win, &child_win, ! &root_x, &root_y, &xc, &yc, &status); ! xc = ABS_X(xc); ! yc = ABS_Y(yc); ! } else { xc = (topSel==NULL) ? ((drawOrigX<<1)+drawWinW)>>1 : (selLtX+selRbX)>>1; yc = (topSel==NULL) ? ((drawOrigY<<1)+drawWinH)>>1 : (selLtY+selRbY)>>1; } ! if (curChoice == VERTEXMODE) { ! TieLooseEnds(); ! SetCurChoice(NOTHING); } ! if (!zoomedIn) { zoomScale++; ! } else if (zoomScale == 1) { zoomedIn = FALSE; zoomScale--; ! } else { zoomScale--; ! } ! PostZoom(xc, yc); ! if (curChoice==DRAWTEXT && textCursorShown) PostZoomCurText(xc, yc); } *** pattern.c.orig Sat Jun 1 00:14:04 1996 --- pattern.c Sat Jun 1 00:14:05 1996 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/pattern.c,v 3.0 1996/05/06 16:06:39 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/pattern.c,v 3.1 1996/05/30 14:29:53 william Exp $"; #endif *************** *** 219,223 **** } - static int ChangeObjFill(ObjPtr, FillIndex) struct ObjRec *ObjPtr; --- 219,222 ---- *************** *** 1053,1057 **** } - static int ChangeObjPen(ObjPtr, PenIndex) struct ObjRec *ObjPtr; --- 1052,1055 ---- *** poly.c.orig Sat Jun 1 00:14:10 1996 --- poly.c Sat Jun 1 00:14:11 1996 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/poly.c,v 3.1 1996/05/24 19:54:44 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/poly.c,v 3.2 1996/05/30 14:29:59 william Exp $"; #endif *************** *** 3203,3207 **** } c_ptr++; ! for (j = 0; j < num_nibbles; j++) { int data=0; --- 3203,3207 ---- } c_ptr++; ! for (j = 0; *c_ptr != '"' && j < num_nibbles; j++) { int data=0; *** ruler.c.orig Sat Jun 1 00:14:15 1996 --- ruler.c Sat Jun 1 00:14:15 1996 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/ruler.c,v 3.1 1996/05/24 19:54:32 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/ruler.c,v 3.3 1996/05/31 12:47:51 william Exp $"; #endif *************** *** 75,82 **** char *buf; { ! sprintf(buf, "%s %s/%s", ! (*numUnitStr)=='\0' ? "1" : numUnitStr, ! (*baseUnitStr)=='\0' ? "pixel" : baseUnitStr, ! (*unitStr)=='\0' ? "pixel" : unitStr); } --- 75,92 ---- char *buf; { ! if (*formatUnitStr == '\0') { ! sprintf(buf, "%s %s/%s", ! (*numUnitStr)=='\0' ? "1" : numUnitStr, ! (*baseUnitStr)=='\0' ? "pixel" : baseUnitStr, ! (*unitStr)=='\0' ? "pixel" : unitStr); ! } else { ! char buf1[80]; ! ! FormatFloat(&gfNumFracUnits, buf1); ! sprintf(buf, "%s %s/%s;%s;%s", ! (*numUnitStr)=='\0' ? "1" : numUnitStr, ! (*baseUnitStr)=='\0' ? "pixel" : baseUnitStr, ! (*unitStr)=='\0' ? "pixel" : unitStr, formatUnitStr, buf1); ! } } *************** *** 122,126 **** gfNumFracUnits = fval; } ! for (c_ptr=format_unit_str; *c_ptr != NULL; c_ptr++) { if (seek_percent) { if (*c_ptr == '%') { --- 132,136 ---- gfNumFracUnits = fval; } ! for (c_ptr=format_unit_str; *c_ptr != '\0'; c_ptr++) { if (seek_percent) { if (*c_ptr == '%') { *************** *** 528,532 **** RedrawCrossHair(); ! showCrossHair = !showCrossHair; RedrawRulers(); if (showCrossHair) { --- 538,543 ---- RedrawCrossHair(); ! /* showCrossHair = !showCrossHair; */ ! showCrossHair = FALSE; RedrawRulers(); if (showCrossHair) { *************** *** 682,686 **** frac = ((ival >= 0) ? fval-((float)ival) : ((float)ival)-fval); fval = (float)ival; ! sprintf(Buf, formatUnitStr, fval, frac); } } --- 693,697 ---- frac = ((ival >= 0) ? fval-((float)ival) : ((float)ival)-fval); fval = (float)ival; ! sprintf(Buf, formatUnitStr, fval, frac*gfNumFracUnits); } } *** shape.c.orig Sat Jun 1 00:14:19 1996 --- shape.c Sat Jun 1 00:14:20 1996 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/shape.c,v 3.1 1996/05/24 19:54:38 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/shape.c,v 3.2 1996/05/30 14:29:56 william Exp $"; #endif *************** *** 44,47 **** --- 44,48 ---- #include "arc.e" #include "attr.e" + #include "box.e" #include "cmd.e" #include "color.e" *************** *** 93,96 **** --- 94,100 ---- int numShapes=MAXSHAPES; int curShape=(-1); + int shapeShadowInResource=FALSE; + int shapeShadowDx=0; + int shapeShadowDy=0; static char *shapeMenuDesc[] = { *************** *** 719,722 **** --- 723,727 ---- { int w, h, saved_text_just=textJust, attr_w, attr_h, attr_ltx, attr_lty; + int saved_fill=objFill; struct BBRec bbox; struct BoxRec *box_ptr; *************** *** 777,780 **** --- 782,786 ---- box_ptr->fill = NONEPAT; box_ptr->pen = NONEPAT; + objFill = NONEPAT; AddAttrByNameAndValue(topObj, "", "auto_center_attr"); attr_ptr = topObj->fattr; *************** *** 791,794 **** --- 797,801 ---- } AddAttrByNameAndValue(topObj, "label=", ""); + objFill = saved_fill; label_attr = FindAttrWithName(topObj, "label=", NULL); if (label_attr != NULL) { *************** *** 810,813 **** --- 817,865 ---- static + void GenerateShadow() + { + struct ObjRec *obj_ptr; + struct SelRec *sel_ptr, *tmp_top_sel=NULL, *tmp_bot_sel=NULL; + + SelAllObj(FALSE); + + JustDupSelObj(&tmp_top_sel, &tmp_bot_sel); + /* + * At this point, the objects pointed by tmp_top_sel and + * tmp_bot_sel are dangling. + */ + if (tmp_top_sel != tmp_bot_sel) { + CreateGroupObj(tmp_top_sel->obj, tmp_bot_sel->obj); + } else { + obj_ptr = tmp_top_sel->obj; + obj_ptr->next = topObj; + obj_ptr->prev = NULL; + if (topObj == NULL) { + botObj = obj_ptr; + } else { + topObj->prev = obj_ptr; + } + topObj = obj_ptr; + } + RemoveAllSel(); + UpdSelBBox(); + + /* move the new object to the bottom */ + obj_ptr = topObj; + UnlinkObj(topObj); + obj_ptr->next = NULL; + obj_ptr->prev = botObj; + if (botObj == NULL) { + topObj = obj_ptr; + } else { + botObj->next = obj_ptr; + } + botObj = obj_ptr; + + ChangeObjFill(obj_ptr, SOLIDPAT); + MoveObj(obj_ptr, shapeShadowDx, shapeShadowDy); + } + + static struct AttrRec *GenerateShape() { *************** *** 836,839 **** --- 888,899 ---- diam_y = (radius_y<<1); side_h = h-diam_y; + if (penPat != NONEPAT) { + int saved_pen=penPat; + + penPat = NONEPAT; + CreateBoxObj(gShapeBBox.ltx, gShapeBBox.lty+radius_y, + gShapeBBox.rbx, gShapeBBox.rby-radius_y, FALSE); + penPat = saved_pen; + } bbox.ltx = gShapeBBox.ltx; bbox.lty = gShapeBBox.lty; *************** *** 889,892 **** --- 949,955 ---- break; } + if (shapeShadowDx != 0 || shapeShadowDy != 0) { + GenerateShadow(); + } label_attr = GenerateInvisibleBox(); *************** *** 1049,1052 **** --- 1112,1131 ---- void CreateShape() { + int force_no_shadow=FALSE, saved_dx=shapeShadowDx, saved_dy=shapeShadowDy; + + if (objFill == NONEPAT && (shapeShadowDx != 0 || shapeShadowDy != 0)) { + sprintf(gszMsgBox, "%s %s.\n\n%s?", + "You are attempting to create a shadowed shape", + "but the shape has no fill (the shadow will show through)", + "Would you like to create such a shape without a shadow"); + switch (MsgBox(gszMsgBox, TOOL_NAME, YNC_MB)) { + case MB_ID_YES: force_no_shadow = TRUE; break; + case MB_ID_NO: break; + default: return; + } + } + if (force_no_shadow) { + shapeShadowDx = shapeShadowDy = 0; + } MakeQuiescent(); SaveStatusStrings(); *************** *** 1053,1056 **** --- 1132,1139 ---- DoCreateShape(); RestoreStatusStrings(); + if (force_no_shadow) { + shapeShadowDx = saved_dx; + shapeShadowDy = saved_dy; + } } *************** *** 1061,1066 **** --- 1144,1194 ---- } + static + int ParseShapeShadowSpec(spec) + char *spec; + { + char *psz_dx=NULL, *psz_dy=NULL, *psz_dup_spec=NULL; + int dx, dy; + + UtilTrimBlanks(spec); + if (*spec == '\0') return FALSE; + if ((psz_dup_spec=UtilStrDup(spec)) == NULL) return FailAllocMessage(); + + if ((psz_dx=strtok(psz_dup_spec, " ,\t\n\r")) == NULL || + sscanf(psz_dx, "%d", &dx) != 1) { + sprintf(gszMsgBox, "Error in parsing '%s' for 2 values.", spec); + MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); + free(psz_dup_spec); + return FALSE; + } + psz_dy = strtok(NULL, " ,\t\n\r"); + if (psz_dy == NULL) { + dy = dx; + } else { + if (sscanf(psz_dy, "%d", &dy) != 1) { + sprintf(gszMsgBox, "Error in parsing '%s' for 2 values.", spec); + MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); + free(psz_dup_spec); + return FALSE; + } + } + shapeShadowDx = dx; + shapeShadowDy = dy; + + free(psz_dup_spec); + return TRUE; + } + void InitShape() { + char *c_ptr; + + shapeShadowInResource = FALSE; + shapeShadowDx = shapeShadowDy = 0; + if ((c_ptr=XGetDefault(mainDisplay,TOOL_NAME,"ShapeShadowSpec")) != NULL) { + if (ParseShapeShadowSpec(c_ptr)) { + shapeShadowInResource = TRUE; + } + } } *************** *** 1089,1092 **** --- 1217,1237 ---- if (index >= 0) ShapeSubMenu(index); return index; + } + + /* ----------------------- Public Functions ----------------------- */ + + void SetShapeShadow() + { + char spec[MAXSTRING+1]; + + *spec = '\0'; + sprintf(gszMsgBox, "%s: [current: %1d,%1d]", + "Please specify X and Y offsets", shapeShadowDx, shapeShadowDy); + Dialog(gszMsgBox, NULL, spec); + if (ParseShapeShadowSpec(spec, FALSE)) { + sprintf(gszMsgBox, "Shape shadow offsets set to %1d and %1d.", + shapeShadowDx, shapeShadowDy); + Msg(gszMsgBox); + } } *** shortcut.c.orig Sat Jun 1 00:14:23 1996 --- shortcut.c Sat Jun 1 00:14:24 1996 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/shortcut.c,v 3.2 1996/05/15 17:33:12 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/shortcut.c,v 3.3 1996/05/30 14:29:46 william Exp $"; #endif *************** *** 283,286 **** --- 283,287 ---- { '\0', 0, "BrowseOtherType()", 1, }, { '\0', 0, "ToggleShowCrossHair()", 0, }, + { '\0', 0, "SetShapeShadow()", 0, }, { '\0', 0, "", 0 } }; *** stretch.c.orig Sat Jun 1 00:14:28 1996 --- stretch.c Sat Jun 1 00:14:30 1996 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/stretch.c,v 3.5 1996/05/24 20:20:48 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/stretch.c,v 3.7 1996/05/31 04:38:01 william Exp $"; #endif *************** *** 73,76 **** --- 73,77 ---- #endif #include "text.e" + #include "util.e" #include "xbitmap.e" #include "xpixmap.e" *************** *** 1573,1577 **** PixelToMeasurementUnit(x_buf, abs(real_rbx-real_ltx)); PixelToMeasurementUnit(y_buf, abs(real_rby-real_lty)); ! sprintf(buf, "x=%s\ny=%s", x_buf, y_buf); dx = real_rbx-real_ltx; dy = real_rby-real_lty; --- 1574,1578 ---- PixelToMeasurementUnit(x_buf, abs(real_rbx-real_ltx)); PixelToMeasurementUnit(y_buf, abs(real_rby-real_lty)); ! sprintf(buf, "w=%s\nh=%s", x_buf, y_buf); dx = real_rbx-real_ltx; dy = real_rby-real_lty; *************** *** 1846,1857 **** static - char * FindColon(s) - register char * s; - { - while (*s!=':' && *s!='x' && *s!='X' && *s!=' ' && *s!='\0') s++; - return ((*s==':' || *s=='x' || *s=='X' || *s==' ') ? (s) : (char *)NULL); - } - - static void ScaleAllSelObjects (Corner, XScale, YScale) int Corner, XScale, YScale; --- 1847,1850 ---- *************** *** 1967,2030 **** } ! void ScaleAllSelObj () { ! char spec[MAXSTRING], * y_spec; ! int corner=INVALID; ! struct BBRec obbox; if (topSel == NULL) return; ! if (numObjSelected == numObjLocked) ! { ! Msg ("Locked objects can not be scaled."); return; } ! ! Dialog ("Please enter scaling factor: [X:Y] or [Scale]", ! "( : accept, : cancel )", spec); if (*spec == '\0') return; ! switch (horiAlign) ! { ! case ALIGN_N: ! case ALIGN_S: ! switch (vertAlign) ! { ! case ALIGN_N: corner = CORNER_NONE; break; ! case ALIGN_S: corner = CORNER_NONE; break; ! case ALIGN_T: corner = CORNER_BOTTOM; break; ! case ALIGN_M: corner = CORNER_NONE; break; ! case ALIGN_B: corner = CORNER_TOP; break; ! } ! break; ! case ALIGN_L: ! switch (vertAlign) ! { ! case ALIGN_N: corner = CORNER_RIGHT; break; ! case ALIGN_S: corner = CORNER_RIGHT; break; ! case ALIGN_T: corner = CORNER_RB; break; ! case ALIGN_M: corner = CORNER_RIGHT; break; ! case ALIGN_B: corner = CORNER_RT; break; ! } ! break; ! case ALIGN_C: ! switch (vertAlign) ! { ! case ALIGN_N: corner = CORNER_NONE; break; ! case ALIGN_S: corner = CORNER_NONE; break; ! case ALIGN_T: corner = CORNER_BOTTOM; break; ! case ALIGN_M: corner = CORNER_NONE; break; ! case ALIGN_B: corner = CORNER_TOP; break; ! } ! break; ! case ALIGN_R: ! switch (vertAlign) ! { ! case ALIGN_N: corner = CORNER_LEFT; break; ! case ALIGN_S: corner = CORNER_LEFT; break; ! case ALIGN_T: corner = CORNER_LB; break; ! case ALIGN_M: corner = CORNER_LEFT; break; ! case ALIGN_B: corner = CORNER_LT; break; ! } ! break; } obbox.ltx = selObjLtX; obbox.lty = selObjLtY; --- 1960,2026 ---- } ! static ! char * FindColon(s) ! register char * s; { ! while (*s!=':' && *s!='x' && *s!='X' && *s!=' ' && *s!='\0') s++; ! return ((*s==':' || *s=='x' || *s=='X' || *s==' ') ? (s) : (char *)NULL); ! } + void ScaleAllSelObj() + { + char spec[MAXSTRING], *y_spec; + int corner=INVALID, saved_h_align=horiAlign, saved_v_align=vertAlign; + struct BBRec obbox; + if (topSel == NULL) return; ! if (numObjSelected == numObjLocked) { ! MsgBox("Locked objects can not be scaled.", TOOL_NAME, INFO_MB); return; } ! Dialog("Please enter scaling factor: [X:Y] or [Scale]", NULL, spec); ! UtilTrimBlanks(spec); if (*spec == '\0') return; ! horiAlign = ALIGN_L; ! vertAlign = ALIGN_T; ! switch (horiAlign) { ! case ALIGN_N: ! case ALIGN_S: ! switch (vertAlign) { ! case ALIGN_N: corner = CORNER_NONE; break; ! case ALIGN_S: corner = CORNER_NONE; break; ! case ALIGN_T: corner = CORNER_BOTTOM; break; ! case ALIGN_M: corner = CORNER_NONE; break; ! case ALIGN_B: corner = CORNER_TOP; break; ! } ! break; ! case ALIGN_L: ! switch (vertAlign) { ! case ALIGN_N: corner = CORNER_RIGHT; break; ! case ALIGN_S: corner = CORNER_RIGHT; break; ! case ALIGN_T: corner = CORNER_RB; break; ! case ALIGN_M: corner = CORNER_RIGHT; break; ! case ALIGN_B: corner = CORNER_RT; break; ! } ! break; ! case ALIGN_C: ! switch (vertAlign) { ! case ALIGN_N: corner = CORNER_NONE; break; ! case ALIGN_S: corner = CORNER_NONE; break; ! case ALIGN_T: corner = CORNER_BOTTOM; break; ! case ALIGN_M: corner = CORNER_NONE; break; ! case ALIGN_B: corner = CORNER_TOP; break; ! } ! break; ! case ALIGN_R: ! switch (vertAlign) { ! case ALIGN_N: corner = CORNER_LEFT; break; ! case ALIGN_S: corner = CORNER_LEFT; break; ! case ALIGN_T: corner = CORNER_LB; break; ! case ALIGN_M: corner = CORNER_LEFT; break; ! case ALIGN_B: corner = CORNER_LT; break; ! } ! break; } obbox.ltx = selObjLtX; obbox.lty = selObjLtY; *************** *** 2031,2053 **** obbox.rbx = selObjRbX; obbox.rby = selObjRbY; SetPivot(corner, obbox); ! ! if ((y_spec = FindColon (spec)) == NULL) ! { ! sscanf (spec, "%lf", &multX); ! if (multX <= 0.0) ! { ! Msg ("Invalid scaling specification."); return; } multY = multX; ! } ! else ! { *y_spec++ = '\0'; ! sscanf (spec, "%lf", &multX); ! sscanf (y_spec, "%lf", &multY); ! if (multX <= 0.0 || multY <= 0.0) ! { ! Msg ("Invalid scaling specification."); return; } --- 2027,2047 ---- obbox.rbx = selObjRbX; obbox.rby = selObjRbY; SetPivot(corner, obbox); ! horiAlign = saved_h_align; ! vertAlign = saved_v_align; ! if ((y_spec=FindColon(spec)) == NULL) { ! sscanf(spec, "%lf", &multX); ! if (multX <= 0.0) { ! sprintf(gszMsgBox, "Invalid scaling specification: '%s'.", spec); ! MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); return; } multY = multX; ! } else { *y_spec++ = '\0'; ! sscanf(spec, "%lf", &multX); ! sscanf(y_spec, "%lf", &multY); ! if (multX <= 0.0 || multY <= 0.0) { ! sprintf(gszMsgBox, "Invalid scaling specification: '%s'.", spec); ! MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); return; } *************** *** 2057,2065 **** if (!changeX && !changeY) return; ! HighLightReverse (); ! ScaleAllSel (corner, (int)(multX * 1000.0), (int)(multY * 1000.0)); ! HighLightForward (); ! SetFileModified (TRUE); justDupped = FALSE; } --- 2051,2063 ---- if (!changeX && !changeY) return; ! horiAlign = ALIGN_L; ! vertAlign = ALIGN_T; ! HighLightReverse(); ! ScaleAllSel(corner, (int)(multX * 1000.0), (int)(multY * 1000.0)); ! HighLightForward(); ! SetFileModified(TRUE); justDupped = FALSE; + horiAlign = saved_h_align; + vertAlign = saved_v_align; } *** text.c.orig Sat Jun 1 00:14:34 1996 --- text.c Sat Jun 1 00:14:35 1996 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/text.c,v 3.2 1996/05/24 02:16:53 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/text.c,v 3.3 1996/05/30 14:29:50 william Exp $"; #endif *************** *** 3579,3582 **** --- 3579,3588 ---- (*ObjPtr)->x = real_x; (*ObjPtr)->y = real_y; + if (orig_obbox.ltx == 0 && orig_obbox.lty == 0 && + orig_obbox.rbx == 0 && orig_obbox.rby == 0) { + SetTextOrigBBoxes(*ObjPtr, text_just, max_len, + num_lines*textCursorH+(num_lines-1)*textVSpace, + min_lbearing, max_rextra, rotate); + } GetTransformedOBBoxOffsetVs(*ObjPtr, (*ObjPtr)->rotated_obbox); } *** xbitmap.c.orig Sat Jun 1 00:14:41 1996 --- xbitmap.c Sat Jun 1 00:14:42 1996 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/xbitmap.c,v 3.2 1996/05/12 08:08:26 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/xbitmap.c,v 3.3 1996/05/31 14:49:59 william Exp $"; #endif *************** *** 3217,3221 **** } if (fileVersion < 33 && (rotate != ROTATE0 || flip != NO_FLIP)) { ! int ltx, lty; if (rotate == ROTATE90 || rotate == ROTATE270) { --- 3217,3221 ---- } if (fileVersion < 33 && (rotate != ROTATE0 || flip != NO_FLIP)) { ! int ltx, lty, rbx, rby; if (rotate == ROTATE90 || rotate == ROTATE270) { *************** *** 3226,3233 **** (*ObjPtr)->obbox.rbx = (*ObjPtr)->obbox.ltx + w; } ! ltx = ((*ObjPtr)->obbox.ltx); ! lty = ((*ObjPtr)->obbox.lty); SetRotatePivotByObject(*ObjPtr); if (flip & HORI_EVEN) { ShearObj(*ObjPtr, CORNER_LEFT, 0, 0, -1000, 1000, <x, <y); --- 3226,3258 ---- (*ObjPtr)->obbox.rbx = (*ObjPtr)->obbox.ltx + w; } ! ltx = ((*ObjPtr)->obbox.ltx); lty = ((*ObjPtr)->obbox.lty); ! rbx = ((*ObjPtr)->obbox.rbx); rby = ((*ObjPtr)->obbox.rby); SetRotatePivotByObject(*ObjPtr); + if ((*ObjPtr)->ctm == NULL) { + int image_w=0, image_h=0; + + if (xbm_ptr->bitmap == None) { + image_w = xbm_ptr->eps_w; + image_h = xbm_ptr->eps_h; + } else { + image_w = xbm_ptr->image_w; + image_h = xbm_ptr->image_h; + } + if (image_w != rbx-ltx || image_h != rby-lty) { + float fval; + int x_scale, y_scale; + struct XfrmMtrxRec ctm; + + memset(&ctm, 0, sizeof(struct XfrmMtrxRec)); + fval = ((float)(rbx-ltx))/((float)image_w)*((float)1000.0); + x_scale = round(fval); + fval = ((float)(rby-lty))/((float)image_h)*((float)1000.0); + y_scale = round(fval); + (*ObjPtr)->obbox.rbx = ltx+image_w; + (*ObjPtr)->obbox.rby = lty+image_h; + ShearObj(*ObjPtr, CORNER_RB, 0, 0, x_scale, y_scale, NULL, NULL); + } + } if (flip & HORI_EVEN) { ShearObj(*ObjPtr, CORNER_LEFT, 0, 0, -1000, 1000, <x, <y); *************** *** 3296,3300 **** int ltx, lty, rbx, rby, i, j, k, data=0, color_index; int nibble_count, bit_count, num_nibbles, fill; ! int rotation=0, new_alloc, id=0, image_w, image_h; int rotate=ROTATE0, flip=NO_FLIP, real_type=XBM_XBM, len; int no_bitmap=FALSE, llx=0, lly=0, urx=0, ury=0; --- 3321,3325 ---- int ltx, lty, rbx, rby, i, j, k, data=0, color_index; int nibble_count, bit_count, num_nibbles, fill; ! int rotation=0, new_alloc, id=0, image_w=0, image_h=0; int rotate=ROTATE0, flip=NO_FLIP, real_type=XBM_XBM, len; int no_bitmap=FALSE, llx=0, lly=0, urx=0, ury=0; *************** *** 3760,3763 **** --- 3785,3810 ---- transformed, rotate, flip)) { return; + } + if (!PRTGIF && (*ObjPtr)->ctm == NULL && xbm_ptr->rotate == ROTATE0) { + if (xbm_ptr->bitmap == None) { + image_w = xbm_ptr->eps_w; + image_h = xbm_ptr->eps_h; + } else { + image_w = xbm_ptr->image_w; + image_h = xbm_ptr->image_h; + } + if (image_w != rbx-ltx || image_h != rby-lty) { + float fval; + struct XfrmMtrxRec ctm; + + memset(&ctm, 0, sizeof(struct XfrmMtrxRec)); + fval = ((float)(rbx-ltx))/((float)image_w)*((float)1000.0); + ctm.m[CTM_SX] = round(fval); + fval = ((float)(rby-lty))/((float)image_h)*((float)1000.0); + ctm.m[CTM_SY] = round(fval); + (*ObjPtr)->obbox.rbx = (*ObjPtr)->bbox.rbx = ltx+image_w; + (*ObjPtr)->obbox.rby = (*ObjPtr)->bbox.rby = lty+image_h; + SetCTM(*ObjPtr, &ctm); + } } if (xbm_ptr->rotate != ROTATE0) { *** pattern.e.orig Sat Jun 1 00:14:46 1996 --- pattern.e Sat Jun 1 00:14:46 1996 *************** *** 28,32 **** * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/pattern.e,v 3.0 1996/05/06 16:06:41 william Exp $ */ --- 28,32 ---- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/pattern.e,v 3.1 1996/05/30 14:29:55 william Exp $ */ *************** *** 52,55 **** --- 52,56 ---- extern int ModeMenu ARGS_DECL((int X, int Y, int TrackMenubar)); + extern int ChangeObjFill ARGS_DECL((struct ObjRec *, int FillIndex)); extern void ChangeAllSelFill ARGS_DECL((int Index, int HighLight)); extern int FillMenu ARGS_DECL((int X, int Y, int TrackMenubar)); *************** *** 62,65 **** --- 63,67 ---- extern int LineTypeMenu ARGS_DECL((int X, int Y, int TrackMenubar)); extern int LineDashMenu ARGS_DECL((int X, int Y, int TrackMenubar)); + extern int ChangeObjPen ARGS_DECL((struct ObjRec *, int PenIndex)); extern void ChangeAllSelPen ARGS_DECL((int Index, int HighLight)); extern int PenMenu ARGS_DECL((int X, int Y, int TrackMenubar)); *** shape.e.orig Sat Jun 1 00:14:50 1996 --- shape.e Sat Jun 1 00:14:50 1996 *************** *** 28,32 **** * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/shape.e,v 3.0 1996/05/06 16:07:37 william Exp $ */ --- 28,32 ---- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/shape.e,v 3.1 1996/05/30 14:29:33 william Exp $ */ *************** *** 42,45 **** --- 42,48 ---- extern int numShapes; extern int curShape; + extern int shapeShadowInResource; + extern int shapeShadowDx; + extern int shapeShadowDy; extern void CleanUpShape ARGS_DECL((void)); *************** *** 47,50 **** --- 50,54 ---- extern void ShapeSubMenu ARGS_DECL((int Index)); extern int ShapeMenu ARGS_DECL((int X, int Y, int TrackMenubar)); + extern void SetShapeShadow ARGS_DECL((void)); #endif /*_SHAPE_E_*/ *** const.h.orig Sat Jun 1 00:14:53 1996 --- const.h Sat Jun 1 00:14:53 1996 *************** *** 28,32 **** * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/const.h,v 3.0 1996/05/06 16:04:17 william Exp $ */ --- 28,32 ---- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/const.h,v 3.1 1996/05/30 14:29:39 william Exp $ */ *************** *** 471,476 **** #define EDIT_CUT_POLY 32 #define EDIT_GET_BBOX 33 ! #define MAXEDITMENUS 34 /* layout menu */ --- 471,477 ---- #define EDIT_CUT_POLY 32 #define EDIT_GET_BBOX 33 + #define EDIT_SET_SHAPE_SHADOW 34 ! #define MAXEDITMENUS 35 /* layout menu */ *************** *** 800,803 **** --- 801,812 ---- #define MAXCHOICEWINDOWCOLS 13 + + /* generic object stuff */ + + #define TGO_STRING 0 + #define TGO_VISUAL 1 + #define TGO_MATH 2 + #define TGO_DATE 3 + #define TGO_USER 4 #endif /*_TGIF_CONST_H_*/ *** patchlvl.h.orig Sat Jun 1 00:14:57 1996 --- patchlvl.h Sat Jun 1 00:14:57 1996 *************** *** 28,32 **** * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/patchlvl.h,v 3.6 1996/05/24 02:16:57 william Exp $ */ --- 28,32 ---- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/patchlvl.h,v 3.7 1996/05/30 14:29:26 william Exp $ */ *************** *** 34,38 **** #define _TGIF_PATCHLEVEL_H_ ! #define TGIF_PATCHLEVEL 6 #endif /*_TGIF_PATCHLEVEL_H_*/ --- 34,38 ---- #define _TGIF_PATCHLEVEL_H_ ! #define TGIF_PATCHLEVEL 7 #endif /*_TGIF_PATCHLEVEL_H_*/ *** types.h.orig Sat Jun 1 00:15:02 1996 --- types.h Sat Jun 1 00:15:03 1996 *************** *** 28,32 **** * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/types.h,v 3.1 1996/05/24 19:55:15 william Exp $ */ --- 28,32 ---- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/types.h,v 3.2 1996/05/30 14:29:41 william Exp $ */ *************** *** 96,99 **** --- 96,101 ---- struct AttrRec * next, * prev; /* next and prev attributes */ void * userdata; + int tgo_type; /* default to be TGO_STRING */ + void * tgo_data; } * AttrRecPtr; *** Makefile.noimake.orig Sat Jun 1 00:15:05 1996 --- Makefile.noimake Sat Jun 1 00:15:06 1996 *************** *** 24,28 **** # PERFORMANCE OF THIS SOFTWARE. # ! # @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/Makefile.noimake,v 3.2 1996/05/24 20:43:45 william Exp $ # --- 24,28 ---- # PERFORMANCE OF THIS SOFTWARE. # ! # @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/Makefile.noimake,v 3.3 1996/05/30 14:33:49 william Exp $ # *************** *** 310,315 **** msg.e navigate.e names.e obj.e oval.e page.e pattern.e poly.e \ polygon.e raster.e rcbox.e rect.e remote.e ruler.e scroll.e \ ! select.e setup.e shortcut.e special.e stk.e stretch.e text.e \ ! xbitmap.e xpixmap.e xbm/intr.xbm xbm/trek.xbm dup.o: const.h tgif_dbg.h types.h attr.e auxtext.e choice.e cmd.e \ drawing.e dup.e grid.e mark.e move.e msg.e obj.e page.e \ --- 310,315 ---- msg.e navigate.e names.e obj.e oval.e page.e pattern.e poly.e \ polygon.e raster.e rcbox.e rect.e remote.e ruler.e scroll.e \ ! select.e setup.e shape.e shortcut.e special.e stk.e stretch.e \ ! text.e xbitmap.e xpixmap.e xbm/intr.xbm xbm/trek.xbm dup.o: const.h tgif_dbg.h types.h attr.e auxtext.e choice.e cmd.e \ drawing.e dup.e grid.e mark.e move.e msg.e obj.e page.e \ *************** *** 319,324 **** drawing.e dup.e edit.e eps.e font.e grid.e group.e mainloop.e \ mark.e menu.e move.e msg.e names.e obj.e page.e pattern.e \ ! poly.e raster.e ruler.e select.e setup.e special.e spline.e \ ! stretch.e text.e util.e xbitmap.e xpixmap.e eps.o: const.h tgif_dbg.h types.h cmd.e color.e cursor.e dialog.e \ drawing.e dup.e eps.e file.e grid.e mark.e msg.e obj.e \ --- 319,324 ---- drawing.e dup.e edit.e eps.e font.e grid.e group.e mainloop.e \ mark.e menu.e move.e msg.e names.e obj.e page.e pattern.e \ ! poly.e raster.e ruler.e select.e setup.e shape.e special.e \ ! spline.e stretch.e text.e util.e xbitmap.e xpixmap.e eps.o: const.h tgif_dbg.h types.h cmd.e color.e cursor.e dialog.e \ drawing.e dup.e eps.e file.e grid.e mark.e msg.e obj.e \ *************** *** 338,343 **** msg.e names.e navigate.e obj.e oval.e page.e pattern.e poly.e \ polygon.e prtgif.e ps.e raster.e rcbox.e rect.e remote.e \ ! ruler.e scroll.e select.e setup.e special.e stk.e stretch.e \ ! text.e util.e version.e xbitmap.e xpixmap.e font.o: const.h tgif_dbg.h types.h auxtext.e choice.e cmd.e color.e \ cursor.e dialog.e drawing.e exec.e file.e font.e mainmenu.e \ --- 338,343 ---- msg.e names.e navigate.e obj.e oval.e page.e pattern.e poly.e \ polygon.e prtgif.e ps.e raster.e rcbox.e rect.e remote.e \ ! ruler.e scroll.e select.e setup.e shape.e special.e stk.e \ ! stretch.e text.e util.e version.e xbitmap.e xpixmap.e font.o: const.h tgif_dbg.h types.h auxtext.e choice.e cmd.e color.e \ cursor.e dialog.e drawing.e exec.e file.e font.e mainmenu.e \ *************** *** 498,502 **** stretch.e text.e xbitmap.e xpixmap.e tgificon.xbm \ xbm/btn1.xbm ! shape.o: const.h tgif_dbg.h types.h arc.e attr.e cmd.e color.e \ cursor.e dialog.e drawing.e dup.e group.e menu.e msg.e obj.e \ page.e pattern.e poly.e polygon.e raster.e select.e setup.e \ --- 498,502 ---- stretch.e text.e xbitmap.e xpixmap.e tgificon.xbm \ xbm/btn1.xbm ! shape.o: const.h tgif_dbg.h types.h arc.e attr.e box.e cmd.e color.e \ cursor.e dialog.e drawing.e dup.e group.e menu.e msg.e obj.e \ page.e pattern.e poly.e polygon.e raster.e select.e setup.e \ *************** *** 520,524 **** grid.e mainloop.e mark.e move.e msg.e obj.e poly.e raster.e \ rect.e ruler.e select.e setup.e spline.e stretch.e text.e \ ! xbitmap.e xpixmap.e tcp.o: const.h tgif_dbg.h remote.e tcp.e util.e testdrive.o: const.h tgif_dbg.h types.h mainloop.e msg.e obj.e setup.e --- 520,524 ---- grid.e mainloop.e mark.e move.e msg.e obj.e poly.e raster.e \ rect.e ruler.e select.e setup.e spline.e stretch.e text.e \ ! util.e xbitmap.e xpixmap.e tcp.o: const.h tgif_dbg.h remote.e tcp.e util.e testdrive.o: const.h tgif_dbg.h types.h mainloop.e msg.e obj.e setup.e *** Imakefile.orig Sat Jun 1 00:15:10 1996 --- Imakefile Sat Jun 1 00:15:10 1996 *************** *** 36,40 **** XCOMM PERFORMANCE OF THIS SOFTWARE. XCOMM ! XCOMM @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/Imakefile,v 3.9 1996/05/24 20:38:32 william Exp $ XCOMM --- 36,40 ---- XCOMM PERFORMANCE OF THIS SOFTWARE. XCOMM ! XCOMM @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/Imakefile,v 3.10 1996/05/30 14:29:07 william Exp $ XCOMM *************** *** 45,49 **** XCOMM EXTRA_LDOPTIONS = ! TGIFVERSION = 3.0-p6 PROGRAMS = tgif prtgif XCOMM frontend11.o testdrive XCOMM CDEBUGFLAGS= -g --- 45,49 ---- XCOMM EXTRA_LDOPTIONS = ! TGIFVERSION = 3.0-p7 PROGRAMS = tgif prtgif XCOMM frontend11.o testdrive XCOMM CDEBUGFLAGS= -g *** tgif.pl.orig Sat Jun 1 00:15:14 1996 --- tgif.pl Sat Jun 1 00:15:15 1996 *************** *** 24,28 **** % PERFORMANCE OF THIS SOFTWARE. % ! % @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/tgif.pl,v 3.0 1996/05/06 16:12:25 william Exp $ % --- 24,28 ---- % PERFORMANCE OF THIS SOFTWARE. % ! % @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/tgif.pl,v 3.1 1996/05/31 00:42:43 william Exp $ % *************** *** 342,346 **** !, assert(tgif_file_version(FileVersion)). tgif_state(FileVersion,Obj,Parms) :- - % Mstsuda's Version ( var(Obj) -> OutputObj = true, current_predicate(state, --- 342,345 ---- *************** *** 383,387 **** !, assert(tgif_file_version(FileVersion)). tgif_state(FileVersion,Obj,Parms) :- - % Mstsuda's Version ( var(Obj) -> OutputObj = true, current_predicate(state, --- 382,385 ---- *************** *** 424,428 **** !, assert(tgif_file_version(FileVersion)). tgif_state(FileVersion,Obj,Parms) :- - % Mstsuda's Version ( var(Obj) -> OutputObj = true, current_predicate(state, --- 422,425 ---- *************** *** 466,470 **** !, assert(tgif_file_version(FileVersion)). tgif_state(FileVersion,Obj,Parms) :- - % Mstsuda's Version ( var(Obj) -> OutputObj = true, current_predicate(state, --- 463,466 ---- *************** *** 481,485 **** _OnePageWidth,_OnePageHeight), tgif_chk_output(OutputObj,Obj), ! FileVersion >= 32, ( (_PageLayoutMode == 0) -> % stack mode _CurPageNum = _PageArg1, _LastPageNum = _PageArg2, --- 477,481 ---- _OnePageWidth,_OnePageHeight), tgif_chk_output(OutputObj,Obj), ! FileVersion =< 32, ( (_PageLayoutMode == 0) -> % stack mode _CurPageNum = _PageArg1, _LastPageNum = _PageArg2, *************** *** 509,512 **** --- 505,554 ---- !, abolish(tgif_file_version/1), !, assert(tgif_file_version(FileVersion)). + tgif_state(FileVersion,Obj,Parms) :- + ( var(Obj) -> OutputObj = true, + current_predicate(state, + state(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)) + ; OutputObj = false + ), + Obj = state(_PageStyle,FileVersion,_PrintMag,_OrigX,_OrigY,_Zoom, + _EnglishGridSize,_Grid,_Color,_HoriAlign,_VertAlign,_LineWidth, + _Spline,_LineStyle,_ObjFill,_PenPat,_TextJust,_FontName, + _TextStyle,_PointSize,0,_Dash,_GridSystem, + _MetricGridSize,_TextVSpace,_ZoomIn,_GridShown,_MoveMode, + _TextRotate,_RCBoxRadius,_UseGray,_PageLayoutMode,_PageArg1, + _PageArg2,_PageLineShownInTileMode,_ColorDump, + _OnePageWidth,_OnePageHeight,_StretchableText,_TextRotation, + _RotationIncrement), + tgif_chk_output(OutputObj,Obj), + FileVersion >= 33, + ( (_PageLayoutMode == 0) -> % stack mode + _CurPageNum = _PageArg1, _LastPageNum = _PageArg2, + _PaperRow = 1, _PaperCol = 1 + ; _PaperCol = _PageArg1, _PaperRow = _PageArg2, + _CurPageNum = 1, _LastPageNum = 1 + ), + Parms = [page_style=_PageStyle,file_version=FileVersion, + print_mag=_PrintMag, + orig_x=_OrigX,orig_y=_OrigY,zoom=_Zoom, + english_grid_size=_GridSize,snap_on=_Grid,color=_Color, + h_align=_HoriAlign,v_align=_VertAlign,line_width=_LineWidth, + line_type=_Spline, + line_style=_LineStyle,obj_fill=_ObjFill,pen_pat=_PenPat, + text_just=_TextJust,font_name=_FontName,text_style=_TextStyle, + point_size=_PointSize,line_dash=_Dash, + grid_system=_GridSystem,metric_grid=_MetricGridSize, + text_v_space=_TextVSpace,zoom_in=_ZoomIn,grid_shown=_GridShown, + move_mode=_ModeMode,text_rotate=_TextRotate, + rcb_radius=_RCBoxRadius,use_gray=_UseGray, + page_layout_mode=_PageLayoutMode, + page_line_shown_in_tile_mode=_PageLineShownInTileMode, + papge_col=_PaperCol,papge_row=_PaperRow, + cur_page_num=_CurPageNum,last_page_num=_LastPageNum, + color_dump=_ColorDump,one_page_width=_OnePageWidth, + one_page_height=_OnePageHeight, + stretchable_text=_StretchableText,text_rotation=_TextRotation, + rotation_increment=_RotationIncrement], + !, abolish(tgif_file_version/1), + !, assert(tgif_file_version(FileVersion)). % --------------------------------------------------------------------- % *************** *** 664,682 **** FileVersion >= 33, !, ( var(Obj) -> OutputObj = true ; OutputObj = false ), ! Obj = text(_Color,_X,_Y,_FontName,_TextStyle,_PointSize,_NumLines, ! _TextJust,_TextRotate,_PenPat,_BBoxW,_BBoxH,_Id,0,_Asc,_Des, ! _ObjFill,_VSpace,_Rotation,_Locked,_UnderlineOn,_Underline, ! _MinLBearing,_MaxRExtra,_DoubleByte,_Direction, ! _CustomFontName,StrList), ! tgif_chk_output(OutputObj,Obj), ! Parms = [color=_Color,x=_X,y=_Y,font_name=_FontName, ! text_style=_TextStyle,point_size=_PointSize,num_lines=_NumLines, ! text_just=_TextJust,text_rotate=_TextRotate,pen_pat=_PenPat, ! bbox_w=_BBoxW,bbox_h=_BBoxH,id=_Id,asc=_Asc,des=_Des, ! obj_fill=_ObjFill,v_space=_VSpace,rotation=_Rotation, ! locked=_Locked,underline_on=_UnderlineOn,underline=_Underline, ! min_lbearing=_MinLBearing,max_rextra=_MaxRExtra, ! double_byte=_DoubleByte,direction=_Direction, ! custom_font_name=_CustomFontName,strs=StrList], tgif_strs(StrList). --- 706,752 ---- FileVersion >= 33, !, ( var(Obj) -> OutputObj = true ; OutputObj = false ), ! ( _Transformed = 0, ! Obj = text(_Color,_X,_Y,_FontName,_TextStyle,_PointSize, ! _NumLines,_TextJust,_TextRotate,_PenPat,_BBoxW,_BBoxH, ! _Id,0,_Asc,_Des,_ObjFill,_VSpace,_Rotation,_Locked, ! _UnderlineOn,_Underline,_MinLBearing,_MaxRExtra, ! _DoubleByte,_Direction,_CustomFontName,_Compressed, ! _Transformed,_Invisible,StrList), ! tgif_chk_output(OutputObj,Obj), ! Parms = [color=_Color,x=_X,y=_Y,font_name=_FontName, ! text_style=_TextStyle,point_size=_PointSize, ! num_lines=_NumLines,text_just=_TextJust, ! text_rotate=_TextRotate,pen_pat=_PenPat,bbox_w=_BBoxW, ! bbox_h=_BBoxH,id=_Id,asc=_Asc,des=_Des, ! obj_fill=_ObjFill,v_space=_VSpace,rotation=_Rotation, ! locked=_Locked,underline_on=_UnderlineOn, ! underline=_Underline,min_lbearing=_MinLBearing, ! max_rextra=_MaxRExtra,double_byte=_DoubleByte, ! direction=_Direction,custom_font_name=_CustomFontName, ! compressed=_Compressed,transformed=_Transformed, ! invisible=_Invisible,strs=StrList] ! | _Transformed = 1, ! Obj = text(_Color,_X,_Y,_FontName,_TextStyle,_PointSize, ! _NumLines,_TextJust,_TextRotate,_PenPat,_BBoxW,_BBoxH, ! _Id,0,_Asc,_Des,_ObjFill,_VSpace,_Rotation,_Locked, ! _UnderlineOn,_Underline,_MinLBearing,_MaxRExtra, ! _DoubleByte,_Direction,_CustomFontName,_Compressed, ! _Transformed,_Invisible,TransformSpec,StrList), ! tgif_chk_output(OutputObj,Obj), ! tgif_text_transform_spec(TransformSpec,TransformParms), ! Parms = [color=_Color,x=_X,y=_Y,font_name=_FontName, ! text_style=_TextStyle,point_size=_PointSize, ! num_lines=_NumLines,text_just=_TextJust, ! text_rotate=_TextRotate,pen_pat=_PenPat,bbox_w=_BBoxW, ! bbox_h=_BBoxH,id=_Id,asc=_Asc,des=_Des, ! obj_fill=_ObjFill,v_space=_VSpace,rotation=_Rotation, ! locked=_Locked,underline_on=_UnderlineOn, ! underline=_Underline,min_lbearing=_MinLBearing, ! max_rextra=_MaxRExtra,double_byte=_DoubleByte, ! direction=_Direction,custom_font_name=_CustomFontName, ! compressed=_Compressed,transformed=_Transformed, ! invisible=_Invisible,transform_spec=TransformParms, ! strs=StrList] ! ), tgif_strs(StrList). *************** *** 733,737 **** current_predicate(tgif_file_version,tgif_file_version(_)), tgif_file_version(FileVersion), ! FileVersion >= 26, !, ( var(Obj) -> OutputObj = true ; OutputObj = false ), Obj = box(_Color,_X1,_Y1,_X2,_Y2,_ObjFill,_LineWidth,_PenPat,_Id,_Dash, --- 803,807 ---- current_predicate(tgif_file_version,tgif_file_version(_)), tgif_file_version(FileVersion), ! FileVersion =< 32, !, ( var(Obj) -> OutputObj = true ; OutputObj = false ), Obj = box(_Color,_X1,_Y1,_X2,_Y2,_ObjFill,_LineWidth,_PenPat,_Id,_Dash, *************** *** 743,746 **** --- 813,846 ---- attrs=AttrList], tgif_attrs(AttrList). + tgif_box(Obj,Parms) :- + current_predicate(tgif_file_version,tgif_file_version(_)), + tgif_file_version(FileVersion), + FileVersion >= 33, !, + ( var(Obj) -> OutputObj = true ; OutputObj = false ), + ( _Transformed = 0, + Obj = box(_Color,_X1,_Y1,_X2,_Y2,_ObjFill,_LineWidth,_PenPat, + _Id,_Dash,_Rotation,_Locked,_Transformed,_Invisible, + _LineWidthSpec,AttrList), + tgif_chk_output(OutputObj,Obj), + Parms = [color=_Color,ltx=_X1,lty=_Y1,rbx=_X2,rby=_Y2, + obj_fill=_ObjFill,line_width=_LineWidth,pen_pat=_PenPat, + id=_Id,line_dash=_Dash,rotation=_Rotation, + locked=_Locked,transformed=_Transformed, + invisible=_Invisible,line_width_spec=_LineWidthSpec, + attrs=AttrList] + | _Transformed = 1, + Obj = box(_Color,_X1,_Y1,_X2,_Y2,_ObjFill,_LineWidth,_PenPat, + _Id,_Dash,_Rotation,_Locked,_Transformed,_Invisible, + _LineWidthSpec,TransformSpec,AttrList), + tgif_chk_output(OutputObj,Obj), + tgif_obj_transform_spec(TransformSpec,TransformParms), + Parms = [color=_Color,ltx=_X1,lty=_Y1,rbx=_X2,rby=_Y2, + obj_fill=_ObjFill,line_width=_LineWidth,pen_pat=_PenPat, + id=_Id,line_dash=_Dash,rotation=_Rotation, + locked=_Locked,transformed=_Transformed, + invisible=_Invisible,line_width_spec=_LineWidthSpec, + transform_spec=TransformParms,attrs=AttrList] + ), + tgif_attrs(AttrList). % --------------------------------------------------------------------- % *************** *** 799,803 **** current_predicate(tgif_file_version,tgif_file_version(_)), tgif_file_version(FileVersion), ! FileVersion >= 26, !, ( var(Obj) -> OutputObj = true ; OutputObj = false ), Obj = oval(_Color,_LeftTopX,_LeftTopY,_RightBotX,_RightBotY,_ObjFill, --- 899,903 ---- current_predicate(tgif_file_version,tgif_file_version(_)), tgif_file_version(FileVersion), ! FileVersion =< 32, !, ( var(Obj) -> OutputObj = true ; OutputObj = false ), Obj = oval(_Color,_LeftTopX,_LeftTopY,_RightBotX,_RightBotY,_ObjFill, *************** *** 809,812 **** --- 909,945 ---- locked=_Locked,attrs=AttrList], tgif_attrs(AttrList). + tgif_oval(Obj,Parms) :- + current_predicate(tgif_file_version,tgif_file_version(_)), + tgif_file_version(FileVersion), + FileVersion >= 33, !, + ( var(Obj) -> OutputObj = true ; OutputObj = false ), + ( _Transformed = 0, + Obj = oval(_Color,_LeftTopX,_LeftTopY,_RightBotX,_RightBotY, + _ObjFill,_LineWidth,_PenPat,_Id,_Dash,_Rotation, + _Locked,_Transformed,_Invisible,_LineWidthSpec, + AttrList), + tgif_chk_output(OutputObj,Obj), + Parms = [color=_Color,ltx=_LeftTopX,lty=_LeftTopY, + rbx=_RightBotX,rby=_RightBotY,obj_fill=_ObjFill, + line_width=_LineWidth,pen_pat=_PenPat,id=_Id, + line_dash=_Dash,rotation=_Rotation,locked=_Locked, + transformed=_Transformed,invisible=_Invisible, + line_width_spec=_LineWidthSpec,attrs=AttrList] + | _Transformed = 1, + Obj = oval(_Color,_LeftTopX,_LeftTopY,_RightBotX,_RightBotY, + _ObjFill,_LineWidth,_PenPat,_Id,_Dash,_Rotation, + _Locked,_Transformed,_Invisible,_LineWidthSpec, + TransformSpec,AttrList), + tgif_chk_output(OutputObj,Obj), + tgif_obj_transform_spec(TransformSpec,TransformParms), + Parms = [color=_Color,ltx=_LeftTopX,lty=_LeftTopY, + rbx=_RightBotX,rby=_RightBotY,obj_fill=_ObjFill, + line_width=_LineWidth,pen_pat=_PenPat,id=_Id, + line_dash=_Dash,rotation=_Rotation,locked=_Locked, + transformed=_Transformed,invisible=_Invisible, + line_width_spec=_LineWidthSpec, + transform_spec=TransformParms,attrs=AttrList] + ), + tgif_attrs(AttrList). % --------------------------------------------------------------------- % *************** *** 906,910 **** current_predicate(tgif_file_version,tgif_file_version(_)), tgif_file_version(FileVersion), ! FileVersion >= 31, !, ( var(Obj) -> OutputObj = true ; OutputObj = false ), Obj = poly(_Color,_NumVs,_Vs,_LineStyle,_LineWidth,_PenPat,_Id,_Spline, --- 1039,1043 ---- current_predicate(tgif_file_version,tgif_file_version(_)), tgif_file_version(FileVersion), ! FileVersion =< 32, !, ( var(Obj) -> OutputObj = true ; OutputObj = false ), Obj = poly(_Color,_NumVs,_Vs,_LineStyle,_LineWidth,_PenPat,_Id,_Spline, *************** *** 918,921 **** --- 1051,1097 ---- locked=_Locked,smooth_spec=_SmoothSpecStr,attrs=AttrList], tgif_attrs(AttrList). + tgif_poly(Obj,Parms) :- + current_predicate(tgif_file_version,tgif_file_version(_)), + tgif_file_version(FileVersion), + FileVersion >= 33, !, + ( var(Obj) -> OutputObj = true ; OutputObj = false ), + ( _Transformed = 0, + Obj = poly(_Color,_NumVs,_Vs,_LineStyle,_LineWidth,_PenPat,_Id, + _Spline,_ObjFill,_Dash,_Rotation,_ArrowHeadW, + _ArrowHeadH,_Locked,_Transformed,_Invisible, + _LineWidthSpec,_ArrowHeadWSpec,_ArrowHeadHSpec, + _SmoothSpecStr,AttrList), + tgif_chk_output(OutputObj,Obj), + Parms = [color=_Color,num_vs=_NumVs,vs=_Vs, + line_style=_LineStyle,line_width=_LineWidth, + pen_pat=_PenPat,id=_Id,line_type=_Spilne, + obj_fill=_ObjFill,line_dash=_Dash,rotation=_Rotation, + arrow_head_w=_ArrowHeadW,arrow_head_h=_ArrowHeadH, + locked=_Locked,transformed=_Transformed, + invisible=_Invisible,line_width_spec=_LineWidthSpec, + arrow_head_w_spec=_ArrowHeadWSpec, + arrow_head_h_spec=_ArrowHeadHSpec, + smooth_spec=_SmoothSpecStr,attrs=AttrList] + | _Transformed = 1, + Obj = poly(_Color,_NumVs,_Vs,_LineStyle,_LineWidth,_PenPat,_Id, + _Spline,_ObjFill,_Dash,_Rotation,_ArrowHeadW, + _ArrowHeadH,_Locked,_Transformed,_Invisible, + _LineWidthSpec,_ArrowHeadWSpec,_ArrowHeadHSpec, + _SmoothSpecStr,TransformSpec,AttrList), + tgif_chk_output(OutputObj,Obj), + tgif_obj_transform_spec(TransformSpec,TransformParms), + Parms = [color=_Color,num_vs=_NumVs,vs=_Vs, + line_style=_LineStyle,line_width=_LineWidth, + pen_pat=_PenPat,id=_Id,line_type=_Spilne, + obj_fill=_ObjFill,line_dash=_Dash,rotation=_Rotation, + arrow_head_w=_ArrowHeadW,arrow_head_h=_ArrowHeadH, + locked=_Locked,transformed=_Transformed, + invisible=_Invisible,line_width_spec=_LineWidthSpec, + arrow_head_w_spec=_ArrowHeadWSpec, + arrow_head_h_spec=_ArrowHeadHSpec, + smooth_spec=_SmoothSpecStr, + transform_spec=TransformParms,attrs=AttrList] + ), + tgif_attrs(AttrList). % --------------------------------------------------------------------- % *************** *** 993,997 **** current_predicate(tgif_file_version,tgif_file_version(_)), tgif_file_version(FileVersion), ! FileVersion >= 31, !, ( var(Obj) -> OutputObj = true ; OutputObj = false ), Obj = polygon(_Color,_NumVs,_Vs,_ObjFill,_LineWidth,_PenPat,_Spline, --- 1169,1173 ---- current_predicate(tgif_file_version,tgif_file_version(_)), tgif_file_version(FileVersion), ! FileVersion =< 32, !, ( var(Obj) -> OutputObj = true ; OutputObj = false ), Obj = polygon(_Color,_NumVs,_Vs,_ObjFill,_LineWidth,_PenPat,_Spline, *************** *** 1003,1006 **** --- 1179,1217 ---- smooth_spec=_SmoothSpecStr,attrs=AttrList], tgif_attrs(AttrList). + tgif_polygon(Obj,Parms) :- + current_predicate(tgif_file_version,tgif_file_version(_)), + tgif_file_version(FileVersion), + FileVersion >= 33, !, + ( var(Obj) -> OutputObj = true ; OutputObj = false ), + ( _Transformed = 0, + Obj = polygon(_Color,_NumVs,_Vs,_ObjFill,_LineWidth,_PenPat, + _Spline,_Id,_Dash,_Rotation,_Locked,_Transformed, + _Invisible,_LineWidthSpec,_SmoothSpecStr, + AttrList), + tgif_chk_output(OutputObj,Obj), + Parms = [color=_Color,num_vs=_NumVs,vs=_Vs,obj_fill=_ObjFill, + line_width=_LineWidth,pen_pat=_PenPat, + line_type=_Spline,id=_Id,line_dash=_Dash, + rotation=_Rotation,locked=_Locked, + transformed=_Transformed,invisible=_Invisible, + line_width_spec=_LineWidthSpec, + smooth_spec=_SmoothSpecStr,attrs=AttrList] + | _Transformed = 1, + Obj = polygon(_Color,_NumVs,_Vs,_ObjFill,_LineWidth,_PenPat, + _Spline,_Id,_Dash,_Rotation,_Locked,_Transformed, + _Invisible,_LineWidthSpec,_SmoothSpecStr,TransformSpec, + AttrList), + tgif_chk_output(OutputObj,Obj), + tgif_obj_transform_spec(TransformSpec,TransformParms), + Parms = [color=_Color,num_vs=_NumVs,vs=_Vs,obj_fill=_ObjFill, + line_width=_LineWidth,pen_pat=_PenPat, + line_type=_Spline,id=_Id,line_dash=_Dash, + rotation=_Rotation,locked=_Locked, + transformed=_Transformed,invisible=_Invisible, + line_width_spec=_LineWidthSpec, + smooth_spec=_SmoothSpecStr, + transform_spec=TransformParms,attrs=AttrList] + ), + tgif_attrs(AttrList). % --------------------------------------------------------------------- % *************** *** 1036,1040 **** current_predicate(tgif_file_version,tgif_file_version(_)), tgif_file_version(FileVersion), ! FileVersion >= 26, !, ( var(Obj) -> OutputObj = true ; OutputObj = false ), Obj = rcbox(_Color,_X1,_Y1,_X2,_Y2,_ObjFill,_LineWidth,_PenPat,_Dash, --- 1247,1251 ---- current_predicate(tgif_file_version,tgif_file_version(_)), tgif_file_version(FileVersion), ! FileVersion =< 32, !, ( var(Obj) -> OutputObj = true ; OutputObj = false ), Obj = rcbox(_Color,_X1,_Y1,_X2,_Y2,_ObjFill,_LineWidth,_PenPat,_Dash, *************** *** 1046,1049 **** --- 1257,1290 ---- locked=_Locked,attrs=AttrList], tgif_attrs(AttrList). + tgif_rcbox(Obj,Parms) :- + current_predicate(tgif_file_version,tgif_file_version(_)), + tgif_file_version(FileVersion), + FileVersion >= 33, !, + ( var(Obj) -> OutputObj = true ; OutputObj = false ), + ( _Transformed = 0, + Obj = rcbox(_Color,_X1,_Y1,_X2,_Y2,_ObjFill,_LineWidth,_PenPat, + _Dash,_Radius,_Id,_Rotation,_Locked,_Transformed, + _Invisible,_LineWidthSpec,AttrList), + tgif_chk_output(OutputObj,Obj), + Parms = [color=_Color,ltx=_X1,lty=_Y1,rbx=_X2,rby=_Y2, + obj_fill=_ObjFill,line_width=_LineWidth,pen_pat=_PenPat, + line_dash=_Dash,radius=_Radius,id=_Id,rotation=_Rotation, + locked=_Locked,transformed=_Transformed, + invisible=_Invisible,line_width_spec=_LineWidthSpec, + attrs=AttrList] + | _Transformed = 1, + Obj = rcbox(_Color,_X1,_Y1,_X2,_Y2,_ObjFill,_LineWidth,_PenPat, + _Dash,_Radius,_Id,_Rotation,_Locked,_Transformed, + _Invisible,_LineWidthSpec,TransformSpec,AttrList), + tgif_chk_output(OutputObj,Obj), + tgif_obj_transform_spec(TransformSpec,TransformParms), + Parms = [color=_Color,ltx=_X1,lty=_Y1,rbx=_X2,rby=_Y2, + obj_fill=_ObjFill,line_width=_LineWidth,pen_pat=_PenPat, + line_dash=_Dash,radius=_Radius,id=_Id,rotation=_Rotation, + locked=_Locked,transformed=_Transformed, + invisible=_Invisible,line_width_spec=_LineWidthSpec, + transform_spec=TransformParms,attrs=AttrList] + ), + tgif_attrs(AttrList). % --------------------------------------------------------------------- % *************** *** 1115,1119 **** current_predicate(tgif_file_version,tgif_file_version(_)), tgif_file_version(FileVersion), ! FileVersion >= 26, !, ( var(Obj) -> OutputObj = true ; OutputObj = false ), Obj = arc(_Color,_ObjFill,_LineWidth,_PenPat,_Dash,_LtX,_LtY,_Xc,_Yc, --- 1356,1360 ---- current_predicate(tgif_file_version,tgif_file_version(_)), tgif_file_version(FileVersion), ! FileVersion =< 32, !, ( var(Obj) -> OutputObj = true ; OutputObj = false ), Obj = arc(_Color,_ObjFill,_LineWidth,_PenPat,_Dash,_LtX,_LtY,_Xc,_Yc, *************** *** 1129,1132 **** --- 1370,1418 ---- locked=_Locked,attrs=AttrList], tgif_attrs(AttrList). + tgif_arc(Obj,Parms) :- + current_predicate(tgif_file_version,tgif_file_version(_)), + tgif_file_version(FileVersion), + FileVersion >= 33, !, + ( var(Obj) -> OutputObj = true ; OutputObj = false ), + ( _Transformed = 0, + Obj = arc(_Color,_ObjFill,_LineWidth,_PenPat,_Dash,_LtX,_LtY, + _Xc,_Yc,_X1,_Y1,_X2,_Y2,_Dir,_W,_H,_Angle1,_Angle2,_Id, + _Rotation,_Style,_ArrowHeadW,_ArrowHeadH,_Locked, + _Transformed,_Invisible,_LineWidthSpec,_ArrowHeadWSpec, + _ArrowHeadHSpec,AttrList), + tgif_chk_output(OutputObj,Obj), + Parms = [color=_Color,obj_fill=_ObjFill,line_width=_LineWidth, + pen_pat=_PenPat,line_dash=_Dash,ltx=_LtX,lty=_LtY, + xc=_Xc,yc=_Yc,x1=_X1,y1=_Y1,x2=_X2,y2=_Y2, + clock_wise=_Dir,major_axis=_W,minor_axis_H, + angle1=_Angle1,angle2=_Angle2,id=_Id,rotation=_Rotation, + line_style=_Style,arrow_head_w=_ArrowHeadW, + arrow_head_h=_ArrowHeadH,locked=_Locked, + transformed=_Transformed, + invisible=_Invisible,line_width_spec=_LineWidthSpec, + arrow_head_w_spec=_ArrowHeadWSpec, + arrow_head_h_spec=_ArrowHeadHSpec,attrs=AttrList] + | _Transformed = 1, + Obj = arc(_Color,_ObjFill,_LineWidth,_PenPat,_Dash,_LtX,_LtY, + _Xc,_Yc,_X1,_Y1,_X2,_Y2,_Dir,_W,_H,_Angle1,_Angle2,_Id, + _Rotation,_Style,_ArrowHeadW,_ArrowHeadH,_Locked, + _Transformed,_Invisible,_LineWidthSpec,_ArrowHeadWSpec, + _ArrowHeadHSpec,TransformSpec,AttrList), + tgif_chk_output(OutputObj,Obj), + tgif_obj_transform_spec(TransformSpec,TransformParms), + Parms = [color=_Color,obj_fill=_ObjFill,line_width=_LineWidth, + pen_pat=_PenPat,line_dash=_Dash,ltx=_LtX,lty=_LtY, + xc=_Xc,yc=_Yc,x1=_X1,y1=_Y1,x2=_X2,y2=_Y2, + clock_wise=_Dir,major_axis=_W,minor_axis_H, + angle1=_Angle1,angle2=_Angle2,id=_Id,rotation=_Rotation, + line_style=_Style,arrow_head_w=_ArrowHeadW, + arrow_head_h=_ArrowHeadH,locked=_Locked, + transformed=_Transformed, + invisible=_Invisible,line_width_spec=_LineWidthSpec, + arrow_head_w_spec=_ArrowHeadWSpec, + arrow_head_h_spec=_ArrowHeadHSpec, + transform_spec=TransformParms,attrs=AttrList] + ), + tgif_attrs(AttrList). % --------------------------------------------------------------------- % *************** *** 1252,1256 **** current_predicate(tgif_file_version,tgif_file_version(_)), tgif_file_version(FileVersion), ! FileVersion >= 29, !, ( var(Obj) -> OutputObj = true ; OutputObj = false ), ( _RealType = 0, _NoBitmap = 0, _SaveEPSF = 0, --- 1538,1542 ---- current_predicate(tgif_file_version,tgif_file_version(_)), tgif_file_version(FileVersion), ! FileVersion =< 32, !, ( var(Obj) -> OutputObj = true ; OutputObj = false ), ( _RealType = 0, _NoBitmap = 0, _SaveEPSF = 0, *************** *** 1311,1314 **** --- 1597,1749 ---- ), tgif_attrs(AttrList). + tgif_xbm(Obj,Parms) :- + current_predicate(tgif_file_version,tgif_file_version(_)), + tgif_file_version(FileVersion), + FileVersion >= 33, !, + ( var(Obj) -> OutputObj = true ; OutputObj = false ), + ( _RealType = 0, _NoBitmap = 0, _SaveEPSF = 0, _Transformed = 0, + % Just XBM + Obj = xbm(_Color,_X1,_Y1,_X2,_Y2,_ObjFill,_Id,_Rotation, + _ImageW,_ImageH,_Rotate,_Flip,_RealType,_LLX,_LLY, + _URX,_URY,_NoBitmap,_Locked,_SaveEPSF, + _Compressed,_Transformed,_Invisible, + _Date,_File,_BitmapStr,AttrList), + tgif_chk_output(OutputObj,Obj), + Parms = [color=_Color,ltx=_X1,lty=_Y1,rbx=_X2,rby=_Y2, + obj_fill=_ObjFill,id=_Id,rotation=_Rotation, + image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, + flip=_Flip,real_type='xbm',llx=_LLX,lly=_LLY, + urx=_URX,ury=_URY,no_bitmap=_NoBitmap,locked=_Locked, + save_epsf=_SaveEPSF,compressed=_Compressed, + transformed=_Transformed,invisible=_Invisible, + date=_Date,file=_File,xbm_str=_BitmapStr,attrs=AttrList] + | _RealType = 1, _NoBitmap = 0, _SaveEPSF = 0, _Transformed = 0, + % What type is this? + Obj = xbm(_Color,_X1,_Y1,_X2,_Y2,_ObjFill,_Id,_Rotation, + _ImageW,_ImageH,_Rotate,_Flip,_RealType,_LLX,_LLY, + _URX,_URY,_NoBitmap,_Locked,_SaveEPSF, + _Compressed,_Transformed,_Invisible, + _Date,_File,_BitmapStr,AttrList), + tgif_chk_output(OutputObj,Obj), + Parms = [color=_Color,ltx=_X1,lty=_Y1,rbx=_X2,rby=_Y2, + obj_fill=_ObjFill,id=_Id,rotation=_Rotation, + image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, + flip=_Flip,real_type='eps',llx=_LLX,lly=_LLY, + urx=_URX,ury=_URY,no_bitmap=_NoBitmap,locked=_Locked, + save_epsf=_SaveEPSF,compressed=_Compressed, + transformed=_Transformed,invisible=_Invisible, + date=_Date,file=_File,xbm_str=_BitmapStr,attrs=AttrList] + | _RealType = 1, _NoBitmap = 1, _SaveEPSF = 0, _Transformed = 0, + % Linked EPS + Obj = xbm(_Color,_X1,_Y1,_X2,_Y2,_ObjFill,_Id,_Rotation, + _ImageW,_ImageH,_Rotate,_Flip,_RealType,_LLX,_LLY, + _URX,_URY,_NoBitmap,_Locked,_SaveEPSF, + _Compressed,_Transformed,_Invisible, + _Date,_File,AttrList), + tgif_chk_output(OutputObj,Obj), + Parms = [color=_Color,ltx=_X1,lty=_Y1,rbx=_X2,rby=_Y2, + obj_fill=_ObjFill,id=_Id,rotation=_Rotation, + image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, + flip=_Flip,real_type='eps',llx=_LLX,lly=_LLY, + urx=_URX,ury=_URY,no_bitmap=_NoBitmap,locked=_Locked, + save_epsf=_SaveEPSF,compressed=_Compressed, + transformed=_Transformed,invisible=_Invisible, + date=_Date,file=_File,attrs=AttrList] + | _RealType = 1, _NoBitmap = 0, _SaveEPSF = 1, _Transformed = 0, + % Embeded EPS + Obj = xbm(_Color,_X1,_Y1,_X2,_Y2,_ObjFill,_Id,_Rotation, + _ImageW,_ImageH,_Rotate,_Flip,_RealType,_LLX,_LLY, + _URX,_URY,_NoBitmap,_Locked,_SaveEPSF, + _Compressed,_Transformed,_Invisible, + _Date,_File,_NumEPSFLines,_EPSFLines,_BitmapStr, + AttrList), + tgif_chk_output(OutputObj,Obj), + length(_EPSFLines,_NumEPSFLines), + Parms = [color=_Color,ltx=_X1,lty=_Y1,rbx=_X2,rby=_Y2, + obj_fill=_ObjFill,id=_Id,rotation=_Rotation, + image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, + flip=_Flip,real_type='eps',llx=_LLX,lly=_LLY, + urx=_URX,ury=_URY,no_bitmap=_NoBitmap,locked=_Locked, + save_epsf=_SaveEPSF,compressed=_Compressed, + transformed=_Transformed,invisible=_Invisible, + num_epsf_lines=_NumEPSFLines,epsf_lines=_EPSFLines, + date=_Date,file=_File,xbm_str=_BitmapStr,attrs=AttrList] + | _RealType = 0, _NoBitmap = 0, _SaveEPSF = 0, _Transformed = 1, + % Just XBM + Obj = xbm(_Color,_X1,_Y1,_X2,_Y2,_ObjFill,_Id,_Rotation, + _ImageW,_ImageH,_Rotate,_Flip,_RealType,_LLX,_LLY, + _URX,_URY,_NoBitmap,_Locked,_SaveEPSF, + _Compressed,_Transformed,_Invisible, + _Date,_File,_BitmapStr,TransformSpec,AttrList), + tgif_chk_output(OutputObj,Obj), + tgif_text_transform_spec(TransformSpec,TransformParms), + Parms = [color=_Color,ltx=_X1,lty=_Y1,rbx=_X2,rby=_Y2, + obj_fill=_ObjFill,id=_Id,rotation=_Rotation, + image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, + flip=_Flip,real_type='xbm',llx=_LLX,lly=_LLY, + urx=_URX,ury=_URY,no_bitmap=_NoBitmap,locked=_Locked, + save_epsf=_SaveEPSF,compressed=_Compressed, + transformed=_Transformed,invisible=_Invisible, + date=_Date,file=_File,xbm_str=_BitmapStr, + transform_spec=TransformParms,attrs=AttrList] + | _RealType = 1, _NoBitmap = 0, _SaveEPSF = 0, _Transformed = 1, + % What type is this? + Obj = xbm(_Color,_X1,_Y1,_X2,_Y2,_ObjFill,_Id,_Rotation, + _ImageW,_ImageH,_Rotate,_Flip,_RealType,_LLX,_LLY, + _URX,_URY,_NoBitmap,_Locked,_SaveEPSF, + _Compressed,_Transformed,_Invisible, + _Date,_File,_BitmapStr,TransformSpec,AttrList), + tgif_chk_output(OutputObj,Obj), + tgif_text_transform_spec(TransformSpec,TransformParms), + Parms = [color=_Color,ltx=_X1,lty=_Y1,rbx=_X2,rby=_Y2, + obj_fill=_ObjFill,id=_Id,rotation=_Rotation, + image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, + flip=_Flip,real_type='eps',llx=_LLX,lly=_LLY, + urx=_URX,ury=_URY,no_bitmap=_NoBitmap,locked=_Locked, + save_epsf=_SaveEPSF,compressed=_Compressed, + transformed=_Transformed,invisible=_Invisible, + date=_Date,file=_File,xbm_str=_BitmapStr, + transform_spec=TransformParms,attrs=AttrList] + | _RealType = 1, _NoBitmap = 1, _SaveEPSF = 0, _Transformed = 1, + % Linked EPS + Obj = xbm(_Color,_X1,_Y1,_X2,_Y2,_ObjFill,_Id,_Rotation, + _ImageW,_ImageH,_Rotate,_Flip,_RealType,_LLX,_LLY, + _URX,_URY,_NoBitmap,_Locked,_SaveEPSF, + _Compressed,_Transformed,_Invisible, + _Date,_File,TransformSpec,AttrList), + tgif_chk_output(OutputObj,Obj), + tgif_text_transform_spec(TransformSpec,TransformParms), + Parms = [color=_Color,ltx=_X1,lty=_Y1,rbx=_X2,rby=_Y2, + obj_fill=_ObjFill,id=_Id,rotation=_Rotation, + image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, + flip=_Flip,real_type='eps',llx=_LLX,lly=_LLY, + urx=_URX,ury=_URY,no_bitmap=_NoBitmap,locked=_Locked, + save_epsf=_SaveEPSF,compressed=_Compressed, + transformed=_Transformed,invisible=_Invisible, + date=_Date,file=_File,transform_spec=TransformParms, + attrs=AttrList] + | _RealType = 1, _NoBitmap = 0, _SaveEPSF = 1, _Transformed = 1, + % Embeded EPS + Obj = xbm(_Color,_X1,_Y1,_X2,_Y2,_ObjFill,_Id,_Rotation, + _ImageW,_ImageH,_Rotate,_Flip,_RealType,_LLX,_LLY, + _URX,_URY,_NoBitmap,_Locked,_SaveEPSF, + _Compressed,_Transformed,_Invisible, + _Date,_File,_NumEPSFLines,_EPSFLines,_BitmapStr, + TransformSpec,AttrList), + tgif_chk_output(OutputObj,Obj), + tgif_text_transform_spec(TransformSpec,TransformParms), + length(_EPSFLines,_NumEPSFLines), + Parms = [color=_Color,ltx=_X1,lty=_Y1,rbx=_X2,rby=_Y2, + obj_fill=_ObjFill,id=_Id,rotation=_Rotation, + image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, + flip=_Flip,real_type='eps',llx=_LLX,lly=_LLY, + urx=_URX,ury=_URY,no_bitmap=_NoBitmap,locked=_Locked, + save_epsf=_SaveEPSF,compressed=_Compressed, + transformed=_Transformed,invisible=_Invisible, + num_epsf_lines=_NumEPSFLines,epsf_lines=_EPSFLines, + date=_Date,file=_File,xbm_str=_BitmapStr, + transform_spec=TransformParms,attrs=AttrList] + ), + tgif_attrs(AttrList). % --------------------------------------------------------------------- % *************** *** 1384,1388 **** current_predicate(tgif_file_version,tgif_file_version(_)), tgif_file_version(FileVersion), ! FileVersion >= 26, !, ( var(Obj) -> OutputObj = true ; OutputObj = false ), Obj = xpm(_Color,_X1,_Y1,_X2,_Y2,_UnUsedObjFill,_NumColors, --- 1819,1823 ---- current_predicate(tgif_file_version,tgif_file_version(_)), tgif_file_version(FileVersion), ! FileVersion =< 32, !, ( var(Obj) -> OutputObj = true ; OutputObj = false ), Obj = xpm(_Color,_X1,_Y1,_X2,_Y2,_UnUsedObjFill,_NumColors, *************** *** 1400,1403 **** --- 1835,1879 ---- tgif_pixels(Pixels), tgif_attrs(AttrList). + tgif_xpm(Obj,Parms) :- + current_predicate(tgif_file_version,tgif_file_version(_)), + tgif_file_version(FileVersion), + FileVersion >= 33, !, + ( var(Obj) -> OutputObj = true ; OutputObj = false ), + ( _Transformed = 0, + Obj = xpm(_Color,_X1,_Y1,_X2,_Y2,_UnUsedObjFill,_NumColors, + _CharsPerPixel,_FirstPixelIsBg,_Id,_Rotation, + _ImageW,_ImageH,_Rotate,_Flip,_Locked,_Compressed, + _Transformed,_Invisible,ColorNames,Pixels,AttrList), + tgif_chk_output(OutputObj,Obj), + Parms = [color=_Color,ltx=_X1,lty=_Y1,rbx=_X2,rby=_Y2, + obj_fill=_UnUsedObjFill,num_colors=_NumColors, + chars_per_pixel=_CharsPerPixel, + first_pixel_is_bg=_FirstPixelIsBg,id=_Id, + rotation=_Rotation,image_w=_ImageW,image_h=_ImageH, + rotate=_Rotate,flip=_Flip,locked=_Locked, + compressed=_Compressed,transformed=_Transformed, + invisible=_Invisible,color_names=ColorNames, + pixels=Pixels,attrs=AttrList] + | _Transformed = 1, + Obj = xpm(_Color,_X1,_Y1,_X2,_Y2,_UnUsedObjFill,_NumColors, + _CharsPerPixel,_FirstPixelIsBg,_Id,_Rotation, + _ImageW,_ImageH,_Rotate,_Flip,_Locked,_Compressed, + _Transformed,_Invisible,TransformSpec,ColorNames, + Pixels,AttrList), + tgif_chk_output(OutputObj,Obj), + tgif_obj_transform_spec(TransformSpec,TransformParms), + Parms = [color=_Color,ltx=_X1,lty=_Y1,rbx=_X2,rby=_Y2, + obj_fill=_UnUsedObjFill,num_colors=_NumColors, + chars_per_pixel=_CharsPerPixel, + first_pixel_is_bg=_FirstPixelIsBg,id=_Id, + rotation=_Rotation,image_w=_ImageW,image_h=_ImageH, + rotate=_Rotate,flip=_Flip,locked=_Locked, + compressed=_Compressed,transformed=_Transformed, + invisible=_Invisible,transform_spec=TransformParms, + color_names=ColorNames,pixels=Pixels,attrs=AttrList] + ), + tgif_color_info(ColorNames), + tgif_pixels(Pixels), + tgif_attrs(AttrList). % --------------------------------------------------------------------- % *************** *** 1428,1432 **** current_predicate(tgif_file_version,tgif_file_version(_)), tgif_file_version(FileVersion), ! FileVersion >= 26, !, ( var(Obj) -> OutputObj = true ; OutputObj = false ), Obj = group(ObjList,_Id,_Locked,AttrList), --- 1904,1908 ---- current_predicate(tgif_file_version,tgif_file_version(_)), tgif_file_version(FileVersion), ! FileVersion =< 32, !, ( var(Obj) -> OutputObj = true ; OutputObj = false ), Obj = group(ObjList,_Id,_Locked,AttrList), *************** *** 1435,1438 **** --- 1911,1925 ---- tgif_objs(ObjList), tgif_attrs(AttrList). + tgif_group(Obj,Parms) :- + current_predicate(tgif_file_version,tgif_file_version(_)), + tgif_file_version(FileVersion), + FileVersion >= 33, !, + ( var(Obj) -> OutputObj = true ; OutputObj = false ), + Obj = group(ObjList,_Id,_Locked,_Invisible,AttrList), + tgif_chk_output(OutputObj,Obj), + Parms = [objs=ObjList,id=_Id,locked=_Locked,invisible=_Invisible, + attrs=AttrList], + tgif_objs(ObjList), + tgif_attrs(AttrList). % --------------------------------------------------------------------- % *************** *** 1463,1467 **** current_predicate(tgif_file_version,tgif_file_version(_)), tgif_file_version(FileVersion), ! FileVersion >= 26, !, ( var(Obj) -> OutputObj = true ; OutputObj = false ), Obj = sym(ObjList,_Id,_Locked,AttrList), --- 1950,1954 ---- current_predicate(tgif_file_version,tgif_file_version(_)), tgif_file_version(FileVersion), ! FileVersion =< 32, !, ( var(Obj) -> OutputObj = true ; OutputObj = false ), Obj = sym(ObjList,_Id,_Locked,AttrList), *************** *** 1470,1473 **** --- 1957,1971 ---- tgif_objs(ObjList), tgif_attrs(AttrList). + tgif_sym(Obj,Parms) :- + current_predicate(tgif_file_version,tgif_file_version(_)), + tgif_file_version(FileVersion), + FileVersion >= 33, !, + ( var(Obj) -> OutputObj = true ; OutputObj = false ), + Obj = sym(ObjList,_Id,_Locked,_Invisible,_AttrList), + tgif_chk_output(OutputObj,Obj), + Parms = [objs=ObjList,id=_Id,locked=_Locked,invisible=_Invisible, + attrs=AttrList], + tgif_objs(ObjList), + tgif_attrs(AttrList). % --------------------------------------------------------------------- % *************** *** 1499,1503 **** current_predicate(tgif_file_version,tgif_file_version(_)), tgif_file_version(FileVersion), ! FileVersion >= 26, !, ( var(Obj) -> OutputObj = true ; OutputObj = false ), Obj = icon(ObjList,_Name,_Id,_Rotation,_Flip,_Locked,AttrList), --- 1997,2001 ---- current_predicate(tgif_file_version,tgif_file_version(_)), tgif_file_version(FileVersion), ! FileVersion =< 32, !, ( var(Obj) -> OutputObj = true ; OutputObj = false ), Obj = icon(ObjList,_Name,_Id,_Rotation,_Flip,_Locked,AttrList), *************** *** 1507,1510 **** --- 2005,2020 ---- tgif_objs(ObjList), tgif_attrs(AttrList). + tgif_icon(Obj,Parms) :- + current_predicate(tgif_file_version,tgif_file_version(_)), + tgif_file_version(FileVersion), + FileVersion >= 33, !, + ( var(Obj) -> OutputObj = true ; OutputObj = false ), + Obj = icon(ObjList,_Name,_Id,_Rotation,_Flip,_Locked,_Invisible, + AttrList), + tgif_chk_output(OutputObj,Obj), + Parms = [name=_Name,id=_Id,rotation=_Rotation,locked=_Locked, + invisible=_Invisible,objs=ObjList,attrs=AttrList], + tgif_objs(ObjList), + tgif_attrs(AttrList). % ======================== support routines =========================== % *************** *** 1572,1576 **** tgif_color_info([]) :- !. ! tgif_color_info([ColorChar,ColorName|ColorInfos]) :- atom_chars(_Char,ColorChar), atom_chars(_Color,ColorName), --- 2082,2086 ---- tgif_color_info([]) :- !. ! tgif_color_info([ColorChar,ColorName,_Red,_Green,_Blue|ColorInfos]) :- atom_chars(_Char,ColorChar), atom_chars(_Color,ColorName), *************** *** 1581,1582 **** --- 2091,2157 ---- tgif_pixels([]) :- !. tgif_pixels([_RowOfChar|Pixels]) :- !, tgif_pixels(Pixels). + + % --------------------------------------------------------------------- % + + tgif_obj_transform_spec(Spec,Parms) :- + current_predicate(tgif_file_version,tgif_file_version(_)), + tgif_file_version(FileVersion), + FileVersion >= 33, !, + Spec = [_OrigX,_OrigY,_OrigLtX,_OrigLtY,_OrigRbX,_OrigRbY, + _CTM_SX,_CTM_SIN,_CTM_MSIN,_CTM_SY,_CTM_TX,_CTM_TY], + Parms = [orig_x=_OrigX,orig_x=_OrigY,orig_ltx=_OrigLtX, + orig_lty=_OrigLtY,orig_rbx=_OrigRbX,orig_rby=_OrigRbY, + ctm_sx=_CTM_SX,ctm_sin=_CTM_SIN,ctm_msin=_CTM_MSIN, + ctm_sy=_CTM_SY,ctm_tx=_CTM_TX,ctm_ty=_CTM_TY]. + + tgif_text_transform_spec(Spec,Parms) :- + current_predicate(tgif_file_version,tgif_file_version(_)), + tgif_file_version(FileVersion), + FileVersion >= 33, !, + Spec = [_OrigX,_OrigY, + _OrigOBBoxLtX,_OrigOBBoxLtY,_OrigOBBoxRbX,_OrigOBBoxRbY, + _CTM_SX,_CTM_SIN,_CTM_MSIN,_CTM_SY,_CTM_TX,_CTM_TY, + _OrigBBoxLtX,_OrigBBoxLtY,_OrigBBoxRbX,_OrigBBoxRbY], + Parms = [orig_x=_OrigX,orig_x=_OrigY,orig_obbox_ltx=_OrigOBBoxLtX, + orig_obbox_lty=_OrigOBBoxLtY,orig_obbox_rbx=_OrigOBBoxRbX, + orig_obbox_rby=_OrigOBBoxRbY, + ctm_sx=_CTM_SX,ctm_sin=_CTM_SIN,ctm_msin=_CTM_MSIN, + ctm_sy=_CTM_SY,ctm_tx=_CTM_TX,ctm_ty=_CTM_TY, + orig_bbox_ltx=_OrigBBoxLtX,orig_bbox_lty=_OrigBBoxLtY, + orig_bbox_rbx=_OrigBBoxRbX,orig_bbox_rby=_OrigBBoxRbY]. + + % ======================= non=graphical objects ======================= % + + % --------------------------------------------------------------------- % + + tgif_page(Obj) :- tgif_page(Obj,_). + + tgif_page(Obj,Parms) :- + current_predicate(tgif_file_version,tgif_file_version(_)), + tgif_file_version(FileVersion), + FileVersion =< 32, !, + ( var(Obj) -> OutputObj = true ; OutputObj = false ), + Obj = page(_PageNum,_PageName), + tgif_chk_output(OutputObj,Obj), + Parms = [page_num=_PageNum,page_name=_PageName]. + tgif_page(Obj,Parms) :- + current_predicate(tgif_file_version,tgif_file_version(_)), + tgif_file_version(FileVersion), + FileVersion >= 33, !, + ( var(Obj) -> OutputObj = true ; OutputObj = false ), + Obj = page(_PageNum,_PageName,1), + tgif_chk_output(OutputObj,Obj), + Parms = [page_num=_PageNum,page_name=_PageName]. + + % --------------------------------------------------------------------- % + + tgif_unit(Obj) :- tgif_unit(Obj,_). + + tgif_unit(Obj,Parms) :- + current_predicate(tgif_file_version,tgif_file_version(_)), + tgif_file_version(FileVersion), + FileVersion >= 33, !, + ( var(Obj) -> OutputObj = true ; OutputObj = false ), + Obj = unit(_UnitSpec), + tgif_chk_output(OutputObj,Obj), + Parms = [unit_spec=_UnitSpec]. *** HISTORY.orig Sat Jun 1 00:15:22 1996 --- HISTORY Sat Jun 1 00:15:24 1996 *************** *** 1,2 **** --- 1,11 ---- + -----------------------> tgif-3.0-p6 => tgif-3.0-p7 <----------------------- + Here's a short list of added features/bug fixes. + + 1) Add shadow for shapes. Also add a new X resource, Tgif.ShapeShadowSpec, + to set the default shape shadow offsets. + 2) Fix a bug with generating PS/EPS files for rotated filled text. + 3) Bring tgif.pl, the Prolog documentation for tgif file formats, up to date. + 4) Fix a bug with PreciseScale() when the alignment limits stretchability. + -----------------------> tgif-3.0-p5 => tgif-3.0-p6 <----------------------- Here's a short list of added features/bug fixes. *************** *** 137,140 **** /* ! * @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/HISTORY,v 3.9 1996/05/24 20:24:28 william Exp $ */ --- 146,149 ---- /* ! * @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/HISTORY,v 3.10 1996/06/01 04:08:23 william Exp $ */ *** descrip.mms.orig Sat Jun 1 00:15:29 1996 --- descrip.mms Sat Jun 1 00:15:31 1996 *************** *** 6,10 **** ! $ DEFINE SYS SYS$LIBRARY ! ! ! @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/descrip.mms,v 3.1 1996/05/24 20:45:42 william Exp $ ! --- 6,10 ---- ! $ DEFINE SYS SYS$LIBRARY ! ! ! @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/descrip.mms,v 3.2 1996/05/30 14:33:49 william Exp $ ! *************** *** 212,217 **** menu.e,msg.e,navigate.e,names.e,obj.e,oval.e,page.e,pattern.e,- poly.e,polygon.e,raster.e,rcbox.e,rect.e,remote.e,ruler.e,- ! scroll.e,select.e,setup.e,shortcut.e,special.e,stk.e,stretch.e,- ! text.e,xbitmap.e,xpixmap.e,xbm/intr.xbm,xbm/trek.xbm dup.obj depends_on dup.c,const.h,tgif_dbg.h,types.h,attr.e,auxtext.e,choice.e,- cmd.e,drawing.e,dup.e,grid.e,mark.e,move.e,msg.e,obj.e,page.e,- --- 212,217 ---- menu.e,msg.e,navigate.e,names.e,obj.e,oval.e,page.e,pattern.e,- poly.e,polygon.e,raster.e,rcbox.e,rect.e,remote.e,ruler.e,- ! scroll.e,select.e,setup.e,shape.e,shortcut.e,special.e,stk.e,- ! stretch.e,text.e,xbitmap.e,xpixmap.e,xbm/intr.xbm,xbm/trek.xbm dup.obj depends_on dup.c,const.h,tgif_dbg.h,types.h,attr.e,auxtext.e,choice.e,- cmd.e,drawing.e,dup.e,grid.e,mark.e,move.e,msg.e,obj.e,page.e,- *************** *** 221,226 **** dialog.e,drawing.e,dup.e,edit.e,eps.e,font.e,grid.e,group.e,- mainloop.e,mark.e,menu.e,move.e,msg.e,names.e,obj.e,page.e,- ! pattern.e,poly.e,raster.e,ruler.e,select.e,setup.e,special.e,- ! spline.e,stretch.e,text.e,util.e,xbitmap.e,xpixmap.e eps.obj depends_on eps.c,const.h,tgif_dbg.h,types.h,cmd.e,color.e,cursor.e,- dialog.e,drawing.e,dup.e,eps.e,file.e,grid.e,mark.e,msg.e,- --- 221,226 ---- dialog.e,drawing.e,dup.e,edit.e,eps.e,font.e,grid.e,group.e,- mainloop.e,mark.e,menu.e,move.e,msg.e,names.e,obj.e,page.e,- ! pattern.e,poly.e,raster.e,ruler.e,select.e,setup.e,shape.e,- ! special.e,spline.e,stretch.e,text.e,util.e,xbitmap.e,xpixmap.e eps.obj depends_on eps.c,const.h,tgif_dbg.h,types.h,cmd.e,color.e,cursor.e,- dialog.e,drawing.e,dup.e,eps.e,file.e,grid.e,mark.e,msg.e,- *************** *** 240,245 **** menu.e,move.e,msg.e,names.e,navigate.e,obj.e,oval.e,page.e,- pattern.e,poly.e,polygon.e,prtgif.e,ps.e,raster.e,rcbox.e,- ! rect.e,remote.e,ruler.e,scroll.e,select.e,setup.e,special.e,- ! stk.e,stretch.e,text.e,util.e,version.e,xbitmap.e,xpixmap.e font.obj depends_on font.c,const.h,tgif_dbg.h,types.h,auxtext.e,choice.e,cmd.e,- color.e,cursor.e,dialog.e,drawing.e,exec.e,file.e,font.e,- --- 240,246 ---- menu.e,move.e,msg.e,names.e,navigate.e,obj.e,oval.e,page.e,- pattern.e,poly.e,polygon.e,prtgif.e,ps.e,raster.e,rcbox.e,- ! rect.e,remote.e,ruler.e,scroll.e,select.e,setup.e,shape.e,- ! special.e,stk.e,stretch.e,text.e,util.e,version.e,xbitmap.e,- ! xpixmap.e font.obj depends_on font.c,const.h,tgif_dbg.h,types.h,auxtext.e,choice.e,cmd.e,- color.e,cursor.e,dialog.e,drawing.e,exec.e,file.e,font.e,- *************** *** 403,410 **** spline.e,stk.e,stretch.e,text.e,xbitmap.e,xpixmap.e,- tgificon.xbm,xbm/btn1.xbm ! shape.obj depends_on shape.c,const.h,tgif_dbg.h,types.h,arc.e,attr.e,cmd.e,- ! color.e,cursor.e,dialog.e,drawing.e,dup.e,group.e,menu.e,msg.e,- ! obj.e,page.e,pattern.e,poly.e,polygon.e,raster.e,select.e,- ! setup.e,shape.e,spline.e,text.e,util.e shortcut.obj depends_on shortcut.c,const.h,tgif_dbg.h,types.h,msg.e,setup.e,- shortcut.e --- 404,411 ---- spline.e,stk.e,stretch.e,text.e,xbitmap.e,xpixmap.e,- tgificon.xbm,xbm/btn1.xbm ! shape.obj depends_on shape.c,const.h,tgif_dbg.h,types.h,arc.e,attr.e,box.e,- ! cmd.e,color.e,cursor.e,dialog.e,drawing.e,dup.e,group.e,menu.e,- ! msg.e,obj.e,page.e,pattern.e,poly.e,polygon.e,raster.e,- ! select.e,setup.e,shape.e,spline.e,text.e,util.e shortcut.obj depends_on shortcut.c,const.h,tgif_dbg.h,types.h,msg.e,setup.e,- shortcut.e *************** *** 426,430 **** dup.e,exec.e,font.e,grid.e,mainloop.e,mark.e,move.e,msg.e,- obj.e,poly.e,raster.e,rect.e,ruler.e,select.e,setup.e,spline.e,- ! stretch.e,text.e,xbitmap.e,xpixmap.e tcp.obj depends_on tcp.c,const.h,tgif_dbg.h,remote.e,tcp.e,util.e testdrive.obj depends_on testdrive.c,const.h,tgif_dbg.h,types.h,mainloop.e,- --- 427,431 ---- dup.e,exec.e,font.e,grid.e,mainloop.e,mark.e,move.e,msg.e,- obj.e,poly.e,raster.e,rect.e,ruler.e,select.e,setup.e,spline.e,- ! stretch.e,text.e,util.e,xbitmap.e,xpixmap.e tcp.obj depends_on tcp.c,const.h,tgif_dbg.h,remote.e,tcp.e,util.e testdrive.obj depends_on testdrive.c,const.h,tgif_dbg.h,types.h,mainloop.e,- *** tgif.Xdefaults.orig Sat Jun 1 00:15:34 1996 --- tgif.Xdefaults Sat Jun 1 00:15:35 1996 *************** *** 7,11 **** ! identical to the default values used in tgif. ! ! ! @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/tgif.Xdefaults,v 3.0 1996/05/06 16:12:19 william Exp $ ! Tgif*Geometry: 640x512-40+20 --- 7,11 ---- ! identical to the default values used in tgif. ! ! ! @(#)$Header: /n/opus/u/guest/william/src/tgif/v3/RCS/tgif.Xdefaults,v 3.1 1996/05/30 14:29:28 william Exp $ ! Tgif*Geometry: 640x512-40+20 *************** *** 285,286 **** --- 285,287 ---- Tgif.RotationIncrement: 45 Tgif.PSA4PaperSize: false + Tgif.ShapeShadowSpec: 2,2