william@CS.UCLA.EDU (William Cheng) (08/21/90)
Submitted-by: william@CS.UCLA.EDU (William Cheng) Posting-number: Volume 8, Issue 89 Archive-name: tgif/patch3.03 Patch-To: Volume 8, Issue 58-60 (Patch2: tgif-1.9 => tgif-1.12) Patch-To: Volume 8, Issue 46-48 (Patch1: tgif-1.2 => tgif-1.9) Patch-To: Volume 7, Issue 56-76 (original: tgif-1.2) ---------------------------------> cut here <--------------------------------- *** prtgif.c.orig Fri Aug 17 13:48:50 1990 --- prtgif.c Fri Aug 17 13:48:51 1990 *************** *** 6,10 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/prtgif.c,v 1.14 90/07/30 11:02:37 william Exp $"; #endif --- 6,10 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/prtgif.c,v 1.16 90/08/16 15:28:30 william Exp $"; #endif *************** *** 26,90 **** int lastFile = TRUE; ! short pDrawCursorH[] = { ! 9, 11, 13, 14, 19, 26, ! 9, 11, 14, 14, 19, 26, ! 9, 11, 13, 14, 19, 25, ! 9, 12, 13, 15, 19, 25, ! 8, 10, 13, 14, 17, 22, ! 10, 10, 13, 15, 18, 23, ! 10, 10, 13, 14, 17, 22, ! 10, 10, 13, 15, 17, 28, ! 9, 12, 14, 16, 20, 27, ! 9, 12, 14, 16, 21, 27, ! 9, 12, 14, 16, 21, 27, ! 9, 12, 14, 16, 21, 27, ! 9, 11, 14, 16, 20, 26, ! 9, 11, 14, 16, 20, 26, ! 9, 11, 14, 16, 24, 26, ! 9, 11, 14, 16, 20, 26, ! 11, 10, 12, 14, 18, 24 }; ! short pDrawFontAsc[] = { ! 7, 8, 10, 11, 15, 20, ! 7, 8, 11, 11, 15, 20, ! 7, 8, 10, 11, 15, 20, ! 7, 9, 10, 12, 15, 20, ! 6, 8, 10, 11, 13, 17, ! 8, 8, 10, 11, 13, 18, ! 8, 8, 10, 11, 13, 17, ! 8, 8, 10, 11, 13, 23, ! 7, 10, 11, 13, 16, 22, ! 7, 10, 11, 13, 16, 22, ! 7, 10, 11, 13, 16, 22, ! 7, 10, 11, 13, 16, 22, ! 7, 9, 11, 13, 16, 21, ! 7, 9, 11, 13, 16, 21, ! 7, 9, 11, 13, 18, 21, ! 7, 9, 11, 13, 18, 21, ! 8, 8, 9, 11, 14, 19 ! }; ! ! short pDrawFontDes[] = ! { ! 2, 3, 3, 3, 4, 6, ! 2, 3, 3, 3, 4, 6, ! 2, 3, 3, 3, 4, 5, ! 2, 3, 3, 3, 4, 5, ! 2, 2, 3, 3, 4, 5, ! 2, 2, 3, 4, 5, 5, ! 2, 2, 3, 3, 4, 5, ! 2, 2, 3, 4, 4, 5, ! 2, 2, 3, 3, 4, 5, ! 2, 2, 3, 3, 5, 5, ! 2, 2, 3, 3, 5, 5, ! 2, 2, 3, 3, 5, 5, ! 2, 2, 3, 3, 4, 5, ! 2, 2, 3, 3, 4, 5, ! 2, 2, 3, 3, 6, 5, ! 2, 2, 3, 3, 6, 5, ! 3, 2, 3, 3, 4, 5 }; --- 26,103 ---- int lastFile = TRUE; ! short pDrawFontAsc[] = { ! 8, 10, 12, 14, 17, 22, ! 8, 10, 12, 14, 17, 22, ! 8, 10, 12, 14, 17, 23, ! 8, 10, 12, 14, 17, 22, ! 8, 9, 11, 13, 15, 19, ! 7, 9, 11, 12, 15, 20, ! 7, 9, 11, 13, 15, 19, ! 7, 9, 11, 12, 15, 20, ! 9, 11, 12, 14, 18, 24, ! 9, 11, 12, 14, 17, 24, ! 9, 11, 12, 14, 17, 24, ! 9, 11, 12, 14, 17, 24, ! 8, 11, 12, 14, 18, 23, ! 8, 11, 12, 15, 18, 24, ! 8, 11, 12, 14, 16, 23, ! 8, 11, 12, 14, 16, 24, ! 8, 10, 12, 14, 18, 24, ! 9, 14, 15, 18, 23, 30, ! 10, 14, 16, 17, 23, 30, ! 9, 13, 15, 17, 22, 30, ! 9, 13, 15, 18, 22, 30, ! 9, 12, 14, 15, 19, 26, ! 9, 12, 14, 15, 21, 26, ! 9, 12, 14, 15, 19, 26, ! 9, 12, 14, 15, 20, 26, ! 11, 14, 16, 18, 24, 31, ! 11, 14, 16, 18, 24, 31, ! 11, 14, 16, 18, 24, 31, ! 11, 14, 16, 18, 24, 31, ! 11, 14, 16, 19, 24, 32, ! 11, 15, 16, 19, 24, 33, ! 11, 14, 16, 18, 23, 32, ! 11, 15, 16, 19, 24, 32, ! 11, 12, 13, 14, 19, 27 }; ! short pDrawFontDes[] = { ! 2, 3, 3, 4, 4, 6, ! 2, 3, 3, 4, 4, 6, ! 2, 3, 3, 4, 5, 6, ! 2, 3, 3, 3, 4, 6, ! 2, 2, 3, 3, 4, 5, ! 2, 2, 3, 4, 5, 5, ! 2, 2, 3, 3, 4, 5, ! 2, 2, 3, 4, 5, 5, ! 2, 2, 3, 3, 4, 5, ! 2, 2, 3, 3, 5, 5, ! 2, 2, 3, 3, 5, 5, ! 2, 2, 3, 3, 5, 5, ! 2, 2, 3, 3, 4, 5, ! 2, 2, 3, 3, 4, 5, ! 2, 2, 3, 3, 6, 5, ! 2, 2, 3, 3, 6, 5, ! 3, 4, 4, 6, 7, 8, ! 3, 3, 4, 4, 6, 7, ! 3, 3, 4, 4, 6, 7, ! 3, 4, 4, 5, 6, 7, ! 3, 3, 4, 4, 6, 7, ! 2, 3, 3, 4, 5, 6, ! 2, 4, 3, 5, 5, 7, ! 2, 3, 4, 4, 5, 6, ! 2, 4, 4, 5, 5, 7, ! 2, 3, 4, 4, 5, 7, ! 2, 3, 4, 5, 5, 7, ! 2, 3, 4, 5, 5, 7, ! 2, 3, 4, 5, 5, 7, ! 2, 3, 3, 4, 5, 7, ! 2, 3, 3, 4, 5, 7, ! 2, 3, 3, 4, 5, 7, ! 2, 3, 3, 4, 5, 7, ! 4, 3, 4, 5, 5, 7 }; *** setup.c.orig Fri Aug 17 13:48:56 1990 --- setup.c Fri Aug 17 13:48:58 1990 *************** *** 6,10 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/setup.c,v 1.10 90/07/17 16:46:52 william Exp $"; #endif --- 6,10 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/setup.c,v 1.12 90/08/17 09:32:53 william Exp $"; #endif *************** *** 90,94 **** Window iconBaseWindow; ! int paperWidth = 7.5*PIX_PER_INCH; int paperHeight = 10*PIX_PER_INCH; int drawOrigX = 0; --- 90,94 ---- Window iconBaseWindow; ! int paperWidth = (75*PIX_PER_INCH)/10; int paperHeight = 10*PIX_PER_INCH; int drawOrigX = 0; *** special.c.orig Fri Aug 17 13:49:04 1990 --- special.c Fri Aug 17 13:49:05 1990 *************** *** 6,10 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/special.c,v 1.6 90/07/30 11:00:16 william Exp $"; #endif --- 6,10 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/special.c,v 1.10 90/08/17 13:40:34 william Exp $"; #endif *************** *** 72,79 **** FILE * FP; { ! struct ObjRec * obj_ptr; ! struct AttrRec * attr_ptr, * top_attr = NULL, * bot_attr = NULL; ! char inbuf[MAXPATHLENGTH], obj_name[10]; ! int len; while (fgets (inbuf, MAXPATHLENGTH, FP) != NULL) --- 72,79 ---- FILE * FP; { ! register struct AttrRec * attr_ptr; ! struct ObjRec * obj_ptr; ! char inbuf[MAXPATHLENGTH], obj_name[10]; ! int len; while (fgets (inbuf, MAXPATHLENGTH, FP) != NULL) *************** *** 86,104 **** ReadGroupObj (FP, &obj_ptr, FALSE); obj_ptr->type = OBJ_ICON; ! while (ReadAttr (FP, &attr_ptr, FALSE)) ! { ! attr_ptr->owner = obj_ptr; ! attr_ptr->prev = NULL; ! attr_ptr->next = top_attr; attr_ptr->inherited = TRUE; - if (top_attr == NULL) - bot_attr = attr_ptr; - else - top_attr->prev = attr_ptr; - top_attr = attr_ptr; - } - if (bot_attr != NULL) bot_attr->next = NULL; - obj_ptr->detail.r->fattr = top_attr; - obj_ptr->detail.r->lattr = bot_attr; return (obj_ptr); } --- 86,93 ---- ReadGroupObj (FP, &obj_ptr, FALSE); obj_ptr->type = OBJ_ICON; ! ReadObjAttrs (INVALID, FP, &obj_ptr, FALSE); ! attr_ptr = obj_ptr->lattr; ! for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->prev) attr_ptr->inherited = TRUE; return (obj_ptr); } *************** *** 211,216 **** SetNullCursor (drawWindow); ! obj_ptr->detail.r->id = objId++; ! obj_ptr->detail.r->dirty = FALSE; strcpy (obj_ptr->detail.r->s, sym_name); AddObj (NULL, topObj, obj_ptr); --- 200,205 ---- SetNullCursor (drawWindow); ! obj_ptr->id = objId++; ! obj_ptr->dirty = FALSE; strcpy (obj_ptr->detail.r->s, sym_name); AddObj (NULL, topObj, obj_ptr); *************** *** 353,357 **** HighLightReverse (); topSel->obj->type = OBJ_ICON; ! topSel->obj->detail.r->id = objId++; Msg ("Selected GROUP object is now ICONIC."); SetFileModified (TRUE); --- 342,346 ---- HighLightReverse (); topSel->obj->type = OBJ_ICON; ! topSel->obj->id = objId++; Msg ("Selected GROUP object is now ICONIC."); SetFileModified (TRUE); *** stk.c.orig Fri Aug 17 13:49:10 1990 --- stk.c Fri Aug 17 13:49:11 1990 *************** *** 6,10 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/stk.c,v 1.5 90/07/30 11:00:40 william Exp $"; #endif --- 6,10 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/stk.c,v 1.6 90/08/15 16:00:13 william Exp $"; #endif *************** *** 96,101 **** stk_ptr->just = textJust; stk_ptr->font = curFont; ! stk_ptr->font_s = curStyle; stk_ptr->f_size = curSize; topObj = botObj = NULL; --- 96,102 ---- stk_ptr->just = textJust; stk_ptr->font = curFont; ! stk_ptr->f_style = curStyle; stk_ptr->f_size = curSize; + stk_ptr->f_dpi = curFontDPI; topObj = botObj = NULL; *************** *** 173,178 **** textJust = topStk->just; curFont = topStk->font; ! curStyle = topStk->font_s; ! curSize = topStk->f_size; topObj = topStk->first; --- 174,179 ---- textJust = topStk->just; curFont = topStk->font; ! curStyle = topStk->f_style; ! curFontDPI = topStk->f_dpi; topObj = topStk->first; *** stretch.c.orig Fri Aug 17 13:49:30 1990 --- stretch.c Fri Aug 17 13:49:32 1990 *************** *** 6,10 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/stretch.c,v 1.8 90/08/02 08:57:17 william Exp $"; #endif --- 6,10 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/stretch.c,v 1.9 90/08/11 00:14:25 william Exp $"; #endif *************** *** 455,462 **** drawOrigY, ObjPtr->detail.p->n, ObjPtr->detail.p->vlist); } ! if ((attr_ptr = ObjPtr->detail.p->fattr) != NULL) for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) StretchObj (attr_ptr->obj, Corner); break; case OBJ_POLYGON: for (i = 0; i < ObjPtr->detail.g->n; i++) --- 455,473 ---- drawOrigY, ObjPtr->detail.p->n, ObjPtr->detail.p->vlist); } ! if ((attr_ptr = ObjPtr->fattr) != NULL) for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) StretchObj (attr_ptr->obj, Corner); break; + case OBJ_BOX: + if ((attr_ptr = ObjPtr->fattr) != NULL) + for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) + StretchObj (attr_ptr->obj, Corner); + break; + case OBJ_OVAL: + if ((attr_ptr = ObjPtr->fattr) != NULL) + for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) + StretchObj (attr_ptr->obj, Corner); + break; + case OBJ_TEXT: break; case OBJ_POLYGON: for (i = 0; i < ObjPtr->detail.g->n; i++) *************** *** 474,477 **** --- 485,491 ---- drawOrigY, ObjPtr->detail.g->n, ObjPtr->detail.g->vlist); } + if ((attr_ptr = ObjPtr->fattr) != NULL) + for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) + StretchObj (attr_ptr->obj, Corner); break; case OBJ_SYM: *************** *** 479,483 **** for (ptr = ObjPtr->detail.r->first; ptr != NULL; ptr = ptr->next) StretchObj (ptr, Corner); ! if ((attr_ptr = ObjPtr->detail.p->fattr) != NULL) for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) StretchObj (attr_ptr->obj, Corner); --- 493,497 ---- for (ptr = ObjPtr->detail.r->first; ptr != NULL; ptr = ptr->next) StretchObj (ptr, Corner); ! if ((attr_ptr = ObjPtr->fattr) != NULL) for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) StretchObj (attr_ptr->obj, Corner); *************** *** 484,490 **** break; case OBJ_ICON: break; - case OBJ_BOX: break; - case OBJ_OVAL: break; - case OBJ_TEXT: break; } AdjObjBBox (ObjPtr); --- 498,501 ---- *************** *** 692,698 **** switch (ObjPtr->type) { - case OBJ_BOX: break; - case OBJ_OVAL: break; - case OBJ_TEXT: break; case OBJ_POLY: num_pts = ObjPtr->detail.p->n; --- 703,706 ---- *************** *** 699,703 **** v = ObjPtr->detail.p->vlist; for (i = 0; i < num_pts; i++, v++) (*v).x = two_x_pivot - (*v).x; - attr_ptr = ObjPtr->detail.p->fattr; if (ObjPtr->detail.p->curved) { --- 707,710 ---- *************** *** 707,713 **** --- 714,732 ---- drawOrigY, ObjPtr->detail.p->n, ObjPtr->detail.p->vlist); } + attr_ptr = ObjPtr->fattr; for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) FlipObjHorizontal (attr_ptr->obj); break; + case OBJ_BOX: + attr_ptr = ObjPtr->fattr; + for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) + FlipObjHorizontal (attr_ptr->obj); + break; + case OBJ_OVAL: + attr_ptr = ObjPtr->fattr; + for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) + FlipObjHorizontal (attr_ptr->obj); + break; + case OBJ_TEXT: break; case OBJ_POLYGON: num_pts = ObjPtr->detail.g->n; *************** *** 721,724 **** --- 740,746 ---- drawOrigY, ObjPtr->detail.g->n, ObjPtr->detail.g->vlist); } + attr_ptr = ObjPtr->fattr; + for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) + FlipObjHorizontal (attr_ptr->obj); break; case OBJ_GROUP: *************** *** 728,732 **** for ( ; obj_ptr != NULL; obj_ptr = obj_ptr->next) FlipObjHorizontal (obj_ptr); ! attr_ptr = ObjPtr->detail.r->fattr; for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) FlipObjHorizontal (attr_ptr->obj); --- 750,754 ---- for ( ; obj_ptr != NULL; obj_ptr = obj_ptr->next) FlipObjHorizontal (obj_ptr); ! attr_ptr = ObjPtr->fattr; for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) FlipObjHorizontal (attr_ptr->obj); *************** *** 783,789 **** switch (ObjPtr->type) { - case OBJ_BOX: break; - case OBJ_OVAL: break; - case OBJ_TEXT: break; case OBJ_POLY: num_pts = ObjPtr->detail.p->n; --- 805,808 ---- *************** *** 790,794 **** v = ObjPtr->detail.p->vlist; for (i = 0; i < num_pts; i++, v++) (*v).y = two_x_pivot - (*v).y; - attr_ptr = ObjPtr->detail.p->fattr; if (ObjPtr->detail.p->curved) { --- 809,812 ---- *************** *** 798,804 **** --- 816,834 ---- drawOrigY, ObjPtr->detail.p->n, ObjPtr->detail.p->vlist); } + attr_ptr = ObjPtr->fattr; for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) FlipObjVertical (attr_ptr->obj); break; + case OBJ_BOX: + attr_ptr = ObjPtr->fattr; + for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) + FlipObjVertical (attr_ptr->obj); + break; + case OBJ_OVAL: + attr_ptr = ObjPtr->fattr; + for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) + FlipObjVertical (attr_ptr->obj); + break; + case OBJ_TEXT: break; case OBJ_POLYGON: num_pts = ObjPtr->detail.g->n; *************** *** 812,815 **** --- 842,848 ---- drawOrigY, ObjPtr->detail.g->n, ObjPtr->detail.g->vlist); } + attr_ptr = ObjPtr->fattr; + for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) + FlipObjVertical (attr_ptr->obj); break; case OBJ_GROUP: *************** *** 819,823 **** for ( ; obj_ptr != NULL; obj_ptr = obj_ptr->next) FlipObjVertical (obj_ptr); ! attr_ptr = ObjPtr->detail.r->fattr; for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) FlipObjVertical (attr_ptr->obj); --- 852,856 ---- for ( ; obj_ptr != NULL; obj_ptr = obj_ptr->next) FlipObjVertical (obj_ptr); ! attr_ptr = ObjPtr->fattr; for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) FlipObjVertical (attr_ptr->obj); *************** *** 897,903 **** switch (ObjPtr->type) { - case OBJ_BOX: break; - case OBJ_OVAL: break; - case OBJ_TEXT: break; case OBJ_POLY: num_pts = ObjPtr->detail.p->n; --- 930,933 ---- *************** *** 916,923 **** drawOrigY, ObjPtr->detail.p->n, ObjPtr->detail.p->vlist); } ! attr_ptr = ObjPtr->detail.p->fattr; for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) RotateObjClockWise (attr_ptr->obj); break; case OBJ_POLYGON: num_pts = ObjPtr->detail.g->n; --- 946,964 ---- drawOrigY, ObjPtr->detail.p->n, ObjPtr->detail.p->vlist); } ! attr_ptr = ObjPtr->fattr; for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) RotateObjClockWise (attr_ptr->obj); break; + case OBJ_BOX: + attr_ptr = ObjPtr->fattr; + for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) + RotateObjClockWise (attr_ptr->obj); + break; + case OBJ_OVAL: + attr_ptr = ObjPtr->fattr; + for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) + RotateObjClockWise (attr_ptr->obj); + break; + case OBJ_TEXT: break; case OBJ_POLYGON: num_pts = ObjPtr->detail.g->n; *************** *** 936,939 **** --- 977,983 ---- drawOrigY, ObjPtr->detail.g->n, ObjPtr->detail.g->vlist); } + attr_ptr = ObjPtr->fattr; + for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) + RotateObjClockWise (attr_ptr->obj); break; case OBJ_GROUP: *************** *** 943,947 **** for ( ; obj_ptr != NULL; obj_ptr = obj_ptr->next) RotateObjClockWise (obj_ptr); ! attr_ptr = ObjPtr->detail.r->fattr; for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) RotateObjClockWise (attr_ptr->obj); --- 987,991 ---- for ( ; obj_ptr != NULL; obj_ptr = obj_ptr->next) RotateObjClockWise (obj_ptr); ! attr_ptr = ObjPtr->fattr; for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) RotateObjClockWise (attr_ptr->obj); *************** *** 1003,1009 **** switch (ObjPtr->type) { - case OBJ_BOX: break; - case OBJ_OVAL: break; - case OBJ_TEXT: break; case OBJ_POLY: num_pts = ObjPtr->detail.p->n; --- 1047,1050 ---- *************** *** 1022,1029 **** drawOrigY, ObjPtr->detail.p->n, ObjPtr->detail.p->vlist); } ! attr_ptr = ObjPtr->detail.p->fattr; for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) RotateObjCounter (attr_ptr->obj); break; case OBJ_POLYGON: num_pts = ObjPtr->detail.g->n; --- 1063,1081 ---- drawOrigY, ObjPtr->detail.p->n, ObjPtr->detail.p->vlist); } ! attr_ptr = ObjPtr->fattr; for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) RotateObjCounter (attr_ptr->obj); break; + case OBJ_BOX: + attr_ptr = ObjPtr->fattr; + for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) + RotateObjCounter (attr_ptr->obj); + break; + case OBJ_OVAL: + attr_ptr = ObjPtr->fattr; + for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) + RotateObjCounter (attr_ptr->obj); + break; + case OBJ_TEXT: break; case OBJ_POLYGON: num_pts = ObjPtr->detail.g->n; *************** *** 1042,1045 **** --- 1094,1100 ---- drawOrigY, ObjPtr->detail.g->n, ObjPtr->detail.g->vlist); } + attr_ptr = ObjPtr->fattr; + for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) + RotateObjCounter (attr_ptr->obj); break; case OBJ_GROUP: *************** *** 1049,1053 **** for ( ; obj_ptr != NULL; obj_ptr = obj_ptr->next) RotateObjCounter (obj_ptr); ! attr_ptr = ObjPtr->detail.r->fattr; for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) RotateObjCounter (attr_ptr->obj); --- 1104,1108 ---- for ( ; obj_ptr != NULL; obj_ptr = obj_ptr->next) RotateObjCounter (obj_ptr); ! attr_ptr = ObjPtr->fattr; for ( ; attr_ptr != NULL; attr_ptr = attr_ptr->next) RotateObjCounter (attr_ptr->obj); *** text.c.orig Fri Aug 17 13:50:17 1990 --- text.c Fri Aug 17 13:50:19 1990 *************** *** 6,10 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/text.c,v 1.9 90/07/30 11:02:09 william Exp $"; #endif --- 6,10 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/text.c,v 1.16 90/08/16 15:44:38 william Exp $"; #endif *************** *** 147,153 **** { register int i, j; int w, h, amount, left, right, len; XGCValues values; - XImage * from_image; XOff >>= zoomScale; --- 147,153 ---- { register int i, j; + register XImage * from_image; int w, h, amount, left, right, len; XGCValues values; XOff >>= zoomScale; *************** *** 266,269 **** --- 266,273 ---- } + XSetForeground (mainDisplay, defaultGC, 0); + XFillRectangle (mainDisplay, textBackingPixmap, defaultGC, 0, 0, w, h); + XSetForeground (mainDisplay, defaultGC, myFgPixel); + XSetFont (mainDisplay, revDefaultGC, canvasFontPtr->fid); XDrawImageString (mainDisplay, textBackingPixmap, revDefaultGC, 0, *************** *** 280,289 **** GCStipple | GCLineWidth, &values); ! for (i = 0; i < w; i++) ! for (j = 0; j < h; j++) ! if (XGetPixel (from_image, i, j) == 1) ! switch (Rotate) ! { ! case ROTATE90: /* XDrawPoint (mainDisplay, Win, gc, XOff-j, YOff+i); */ /* Hack to run on RTs -- crash server on RTs */ --- 284,293 ---- GCStipple | GCLineWidth, &values); ! switch (Rotate) ! { ! case ROTATE90: ! for (i = 0; i < w; i++) ! for (j = 0; j < h; j++) ! if (XGetPixel (from_image, i, j) == 1) /* XDrawPoint (mainDisplay, Win, gc, XOff-j, YOff+i); */ /* Hack to run on RTs -- crash server on RTs */ *************** *** 290,295 **** XDrawLine (mainDisplay, Win, gc, XOff-j, YOff+i, XOff-j, YOff+i); ! break; ! case ROTATE180: /* XDrawPoint (mainDisplay, Win, gc, XOff-i, YOff-j); */ /* Hack to run on RTs -- crash server on RTs */ --- 294,302 ---- XDrawLine (mainDisplay, Win, gc, XOff-j, YOff+i, XOff-j, YOff+i); ! break; ! case ROTATE180: ! for (i = 0; i < w; i++) ! for (j = 0; j < h; j++) ! if (XGetPixel (from_image, i, j) == 1) /* XDrawPoint (mainDisplay, Win, gc, XOff-i, YOff-j); */ /* Hack to run on RTs -- crash server on RTs */ *************** *** 296,301 **** XDrawLine (mainDisplay, Win, gc, XOff-i, YOff-j, XOff-i, YOff-j); ! break; ! case ROTATE270: /* XDrawPoint (mainDisplay, Win, gc, XOff+j, YOff-i); */ /* Hack to run on RTs -- crash server on RTs */ --- 303,311 ---- XDrawLine (mainDisplay, Win, gc, XOff-i, YOff-j, XOff-i, YOff-j); ! break; ! case ROTATE270: ! for (i = 0; i < w; i++) ! for (j = 0; j < h; j++) ! if (XGetPixel (from_image, i, j) == 1) /* XDrawPoint (mainDisplay, Win, gc, XOff+j, YOff-i); */ /* Hack to run on RTs -- crash server on RTs */ *************** *** 302,307 **** XDrawLine (mainDisplay, Win, gc, XOff+j, YOff-i, XOff+j, YOff-i); ! break; ! } XDestroyImage (from_image); } --- 312,318 ---- XDrawLine (mainDisplay, Win, gc, XOff+j, YOff-i, XOff+j, YOff-i); ! break; ! } ! XDestroyImage (from_image); } *************** *** 344,347 **** --- 355,359 ---- text_ptr = (struct TextRec *) calloc (1, sizeof(struct TextRec)); text_ptr->font = curFont; + text_ptr->dpi = curFontDPI; text_ptr->style = curStyle; text_ptr->attr = NULL; *************** *** 359,363 **** --- 371,378 ---- curTextObj->type = OBJ_TEXT; curTextObj->color = colorIndex; + curTextObj->id = objId++; + curTextObj->dirty = FALSE; curTextObj->detail.t = text_ptr; + curTextObj->fattr = curTextObj->lattr = NULL; AddObj (NULL, topObj, curTextObj); *************** *** 465,468 **** --- 480,484 ---- SaveCurFont (); curFont = ObjPtr->detail.t->font; + curFontDPI = ObjPtr->detail.t->dpi; curStyle = ObjPtr->detail.t->style; curSize = ObjPtr->detail.t->size; *************** *** 614,632 **** if ((attr_ptr = curTextObj->detail.t->attr) != NULL) { ! if ((!attr_ptr->nameshown) || FindEqual (curTextObj->detail.t->first->s)) ! { ! UpdateAttr(curTextObj->detail.t, attr_ptr); ! textDrawn = FALSE; ! justDrawnTextObj = NULL; ! } ! else ! { ! UnlinkAttr (attr_ptr); ! curTextObj->detail.t->attr = NULL; ! AddObj (NULL, topObj, curTextObj); ! FreeAttr (attr_ptr); ! textDrawn = TRUE; ! justDrawnTextObj = curTextObj; ! } AdjObjBBox (attr_ptr->owner); } --- 630,636 ---- if ((attr_ptr = curTextObj->detail.t->attr) != NULL) { ! UpdateAttr(curTextObj->detail.t, attr_ptr); ! textDrawn = FALSE; ! justDrawnTextObj = NULL; AdjObjBBox (attr_ptr->owner); } *************** *** 704,723 **** else { ! if ((obj_ptr->type == OBJ_POLY) || (obj_ptr->type == OBJ_GROUP) || ! (obj_ptr->type == OBJ_SYM) || (obj_ptr->type == OBJ_ICON)) ! { ! switch (obj_ptr->type) ! { ! case OBJ_POLY : attr_ptr = obj_ptr->detail.p->fattr; break; ! case OBJ_GROUP : ! case OBJ_SYM : ! case OBJ_ICON : attr_ptr = obj_ptr->detail.r->fattr; break; ! } ! for (; attr_ptr != NULL; attr_ptr = attr_ptr->next) ! if (X>=attr_ptr->obj->bbox.ltx && X<=attr_ptr->obj->bbox.rbx && ! Y>=attr_ptr->obj->bbox.lty && Y<=attr_ptr->obj->bbox.rby && ! attr_ptr->shown == TRUE) ! return (attr_ptr->obj); ! } } return (NULL); --- 708,717 ---- else { ! attr_ptr = obj_ptr->fattr; ! for (; attr_ptr != NULL; attr_ptr = attr_ptr->next) ! if (X>=attr_ptr->obj->bbox.ltx && X<=attr_ptr->obj->bbox.rbx && ! Y>=attr_ptr->obj->bbox.lty && Y<=attr_ptr->obj->bbox.rby && ! attr_ptr->shown == TRUE) ! return (attr_ptr->obj); } return (NULL); *************** *** 810,813 **** --- 804,808 ---- curFont = obj_ptr->detail.t->font; + curFontDPI = obj_ptr->detail.t->dpi; curStyle = obj_ptr->detail.t->style; curSize = obj_ptr->detail.t->size; *************** *** 1394,1397 **** --- 1389,1393 ---- curFont = text_ptr->font; + curFontDPI = text_ptr->dpi; curStyle = text_ptr->style; curSize = text_ptr->size; *************** *** 1402,1408 **** if (PRTGIF) { ! textCursorH = pDrawCursorH[FontIndex(curFont,curSize,curStyle)]; ! canvasFontAsc = pDrawFontAsc[FontIndex(curFont,curSize,curStyle)]; ! canvasFontDes = pDrawFontDes[FontIndex(curFont,curSize,curStyle)]; } else --- 1398,1407 ---- if (PRTGIF) { ! canvasFontAsc = ! pDrawFontAsc[FontIndex(curFontDPI,curFont,curSize,curStyle)]; ! canvasFontDes = ! pDrawFontDes[FontIndex(curFontDPI,curFont,curSize,curStyle)]; ! textCursorH = canvasFontAsc + canvasFontDes; ! pointSize = (curFontDPI == FONT_DPI_75) ? pointSize75 : pointSize100; } else *************** *** 1534,1537 **** --- 1533,1537 ---- SaveCurFont (); curFont = text_ptr->font; + curFontDPI = text_ptr->dpi; curStyle = text_ptr->style; curSize = text_ptr->size; *************** *** 1658,1666 **** fprintf (FP, "text(%s,", colorMenuItems[ObjPtr->color]); ! fprintf (FP, "%1d,%1d,%1d,%1d,%1d,%1d,%1d,%1d,%1d,%1d,%1d,[\n", ObjPtr->x, ! ObjPtr->y, t_ptr->font, t_ptr->style, t_ptr->size, t_ptr->lines, t_ptr->just, t_ptr->rotate, t_ptr->pen, ObjPtr->obbox.rbx-ObjPtr->obbox.ltx, ! ObjPtr->obbox.rby-ObjPtr->obbox.lty); for (s_ptr = t_ptr->first; s_ptr->next != NULL; s_ptr = s_ptr->next) --- 1658,1666 ---- fprintf (FP, "text(%s,", colorMenuItems[ObjPtr->color]); ! fprintf (FP, "%1d,%1d,%1d,%1d,%1d,%1d,%1d,%1d,%1d,%1d,%1d,%1d,%1d,[\n", ! ObjPtr->x, ObjPtr->y, t_ptr->font, t_ptr->style, t_ptr->size, t_ptr->lines, t_ptr->just, t_ptr->rotate, t_ptr->pen, ObjPtr->obbox.rbx-ObjPtr->obbox.ltx, ! ObjPtr->obbox.rby-ObjPtr->obbox.lty, ObjPtr->id, t_ptr->dpi); for (s_ptr = t_ptr->first; s_ptr->next != NULL; s_ptr = s_ptr->next) *************** *** 1702,1706 **** int num_lines, x, y, font, style, size; int text_just, rotate, pen; ! int bbox_w, bbox_h; * ObjPtr = (struct ObjRec *) calloc (1, sizeof(struct ObjRec)); --- 1702,1706 ---- int num_lines, x, y, font, style, size; int text_just, rotate, pen; ! int bbox_w, bbox_h, dpi; * ObjPtr = (struct ObjRec *) calloc (1, sizeof(struct ObjRec)); *************** *** 1713,1731 **** rotate = 0; pen = 1; } else if (fileVersion <= 6) sscanf (s, "%d , %d , %d , %d , %d , %d , %d , %d , %d", &x, &y, &font, &style, &size, &num_lines, &text_just, &rotate, &pen); else sscanf (s, ! "%d , %d , %d , %d , %d , %d , %d , %d , %d , %d , %d", &x, &y, &font, &style, &size, &num_lines, &text_just, &rotate, &pen, ! &bbox_w, &bbox_h); text_ptr = (struct TextRec *) calloc (1, sizeof(struct TextRec)); - text_ptr->just = text_just; text_ptr->lines = num_lines; - text_ptr->rotate = rotate; - text_ptr->pen = pen; if (!PRTGIF) SaveCurFont (); --- 1713,1745 ---- rotate = 0; pen = 1; + (*ObjPtr)->id = objId++; + dpi = FONT_DPI_75; } else if (fileVersion <= 6) + { sscanf (s, "%d , %d , %d , %d , %d , %d , %d , %d , %d", &x, &y, &font, &style, &size, &num_lines, &text_just, &rotate, &pen); + (*ObjPtr)->id = objId++; + dpi = FONT_DPI_75; + } + else if (fileVersion <= 7) + { + sscanf (s, "%d , %d , %d , %d , %d , %d , %d , %d , %d , %d , %d", + &x, &y, &font, &style, &size, &num_lines, &text_just, &rotate, &pen, + &bbox_w, &bbox_h); + (*ObjPtr)->id = objId++; + dpi = FONT_DPI_75; + } else + { sscanf (s, ! "%d , %d , %d , %d , %d , %d , %d , %d , %d , %d , %d , %d , %d", &x, &y, &font, &style, &size, &num_lines, &text_just, &rotate, &pen, ! &bbox_w, &bbox_h, &((*ObjPtr)->id), &dpi); ! if ((*ObjPtr)->id >= objId) objId = (*ObjPtr)->id + 1; ! } text_ptr = (struct TextRec *) calloc (1, sizeof(struct TextRec)); text_ptr->lines = num_lines; if (!PRTGIF) SaveCurFont (); *************** *** 1732,1745 **** curFont = text_ptr->font = font; curStyle = text_ptr->style = style; curSize = text_ptr->size = size; ! textJust = text_just; ! curRotate = rotate; if (PRTGIF) { ! penPat = pen; ! textCursorH = pDrawCursorH[FontIndex(curFont,curSize,curStyle)]; ! canvasFontAsc = pDrawFontAsc[FontIndex(curFont,curSize,curStyle)]; } else --- 1746,1763 ---- curFont = text_ptr->font = font; + curFontDPI = text_ptr->dpi = dpi; curStyle = text_ptr->style = style; curSize = text_ptr->size = size; ! textJust = text_ptr->just = text_just; ! curRotate = text_ptr->rotate = rotate; ! penPat = text_ptr->pen = pen; if (PRTGIF) { ! canvasFontAsc = ! pDrawFontAsc[FontIndex(curFontDPI,curFont,curSize,curStyle)]; ! canvasFontDes = ! pDrawFontDes[FontIndex(curFontDPI,curFont,curSize,curStyle)]; ! textCursorH = canvasFontAsc + canvasFontDes; } else *************** *** 1777,1780 **** --- 1795,1799 ---- (*ObjPtr)->type = OBJ_TEXT; (*ObjPtr)->color = FindColorIndex (color_str); + (*ObjPtr)->dirty = FALSE; (*ObjPtr)->detail.t = text_ptr; *************** *** 1856,1860 **** if (*s == *s1) return; /* no updates */ ! ObjPtr->detail.t->attr->owner->detail.r->dirty = TRUE; *c_ptr = '\0'; --- 1875,1879 ---- if (*s == *s1) return; /* no updates */ ! ObjPtr->detail.t->attr->owner->dirty = TRUE; *c_ptr = '\0'; *************** *** 1861,1864 **** --- 1880,1884 ---- SaveCurFont (); curFont = ObjPtr->detail.t->font; + curFontDPI = ObjPtr->detail.t->dpi; curStyle = ObjPtr->detail.t->style; curSize = ObjPtr->detail.t->size; *** tgif.c.orig Fri Aug 17 13:50:28 1990 --- tgif.c Fri Aug 17 13:50:29 1990 *************** *** 6,10 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/tgif.c,v 1.6 90/07/30 11:04:46 william Exp $"; #endif --- 6,10 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/tgif.c,v 1.7 90/08/15 15:05:17 william Exp $"; #endif *************** *** 21,25 **** int lastFile; - short * pDrawCursorH; short * pDrawFontAsc; short * pDrawFontDes; --- 21,24 ---- *** version.c.orig Fri Aug 17 13:50:33 1990 --- version.c Fri Aug 17 13:50:34 1990 *************** *** 6,11 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/version.c,v 1.15 90/08/02 09:05:03 william Exp $"; #endif ! char * version_string = "1.12"; --- 6,11 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/version.c,v 1.16 90/08/16 09:41:02 william Exp $"; #endif ! char * version_string = "1.13"; *** choice.e.orig Fri Aug 17 13:50:39 1990 --- choice.e Fri Aug 17 13:50:40 1990 *************** *** 4,8 **** * Copyright (C) 1989, William Cheng. * ! * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/choice.e,v 1.1 90/04/01 22:16:56 william Exp $ */ --- 4,8 ---- * Copyright (C) 1989, William Cheng. * ! * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/choice.e,v 1.2 90/08/14 18:04:06 william Exp $ */ *************** *** 17,20 **** --- 17,21 ---- extern void ShowJust (); extern void ShowCurFont (); + extern void ShowCurFontDPI (); extern void ShowLineWidth (); extern void ShowWhereToPrint (); *** copypaste.e.orig Fri Aug 17 13:50:42 1990 --- copypaste.e Fri Aug 17 13:50:44 1990 *************** *** 0 **** --- 1,12 ---- + /* + * Author: Kou1 Ma2da (matsuda@ccs.mt.nec.co.jp) + * Modified By: William Chia-Wei Cheng (william@cs.ucla.edu) + * + * Copyright (C) 1990, William Cheng. + * + * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/copypaste.e,v 1.1 90/08/16 09:34:15 william Exp $ + */ + + extern void CopyToCutBuffer (); + extern void PasteFromCutBuffer (); + extern void CleanUpCutBuffer (); *** dup.e.orig Fri Aug 17 13:50:48 1990 --- dup.e Fri Aug 17 13:50:49 1990 *************** *** 4,8 **** * Copyright (C) 1989, William Cheng. * ! * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/dup.e,v 1.2 90/07/06 18:00:44 william Exp $ */ --- 4,8 ---- * Copyright (C) 1989, William Cheng. * ! * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/dup.e,v 1.3 90/08/16 09:05:28 william Exp $ */ *************** *** 11,16 **** extern int dupDy; ! extern void DupObjBasics (); ! extern void DupTextObj (); ! extern void DupSelObj (); ! extern void JustDupSelObj (); --- 11,17 ---- extern int dupDy; ! extern void DupObjBasics (); ! extern void DupTextObj (); ! extern struct ObjRec * DupObj (); ! extern void DupSelObj (); ! extern void JustDupSelObj (); *** file.e.orig Fri Aug 17 13:50:53 1990 --- file.e Fri Aug 17 13:50:54 1990 *************** *** 4,8 **** * Copyright (C) 1989, William Cheng. * ! * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/file.e,v 1.11 90/07/30 15:53:31 william Exp $ */ --- 4,8 ---- * Copyright (C) 1989, William Cheng. * ! * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/file.e,v 1.12 90/08/10 23:51:33 william Exp $ */ *************** *** 30,33 **** --- 30,34 ---- extern char * FindChar (); extern void ReadState (); + extern void ReadObjAttrs (); extern int ReadObj (); extern void ChangeDomain (); *** font.e.orig Fri Aug 17 13:50:58 1990 --- font.e Fri Aug 17 13:50:59 1990 *************** *** 4,8 **** * Copyright (C) 1989, William Cheng. * ! * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/font.e,v 1.3 90/07/20 16:59:06 william Exp $ */ --- 4,8 ---- * Copyright (C) 1989, William Cheng. * ! * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/font.e,v 1.4 90/08/15 16:58:35 william Exp $ */ *************** *** 26,30 **** extern int defaultFontDes; ! extern int pointSize[]; extern int curFontDPI; extern int curFont; --- 26,32 ---- extern int defaultFontDes; ! extern int * pointSize; ! extern int pointSize75[]; ! extern int pointSize100[]; extern int curFontDPI; extern int curFont; *** prtgif.e.orig Fri Aug 17 13:51:04 1990 --- prtgif.e Fri Aug 17 13:51:05 1990 *************** *** 4,12 **** * Copyright (C) 1990, William Cheng. * ! * @(#) $Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/prtgif.e,v 1.1 90/07/30 11:08:07 william Exp $ */ extern int lastFile; - extern short pDrawCursorH[]; extern short pDrawFontAsc[]; extern short pDrawFontDes[]; --- 4,11 ---- * Copyright (C) 1990, William Cheng. * ! * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/prtgif.e,v 1.3 90/08/17 11:13:33 william Exp $ */ extern int lastFile; extern short pDrawFontAsc[]; extern short pDrawFontDes[]; *** const.h.orig Fri Aug 17 13:51:09 1990 --- const.h Fri Aug 17 13:51:10 1990 *************** *** 4,8 **** * Copyright (C) 1990, William Cheng. * ! * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/const.h,v 1.5 90/05/23 08:54:00 william Exp Locker: william $ */ --- 4,8 ---- * Copyright (C) 1990, William Cheng. * ! * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/const.h,v 1.7 90/08/15 11:41:10 william Exp $ */ *************** *** 114,117 **** --- 114,122 ---- #define MAXFONTSTYLES 4 + #define FONT_DPI_75 0 + #define FONT_DPI_100 1 + + #define MAXFONTDPIS 2 + #define MAXFONTSIZES 6 *************** *** 121,142 **** #define MAXJUSTS 3 - - /* top level menu */ - - #define MENU_MODE 0 - #define MENU_FILE 1 - #define MENU_EDIT 2 - #define MENU_STYLE 3 - #define MENU_SIZE 4 - #define MENU_FONT 5 - #define MENU_LAYOUT 6 - #define MENU_ARRANGE 7 - #define MENU_FILL 8 - #define MENU_LINESTYLE 9 - #define MENU_PEN 10 - #define MENU_COLOR 11 - #define MENU_SPECIAL 12 - - #define MAXMENUS 13 /* alignment */ --- 126,129 ---- *** types.h.orig Fri Aug 17 13:51:16 1990 --- types.h Fri Aug 17 13:51:16 1990 *************** *** 4,8 **** * Copyright (C) 1990, William Cheng. * ! * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/types.h,v 1.4 90/07/30 15:53:05 william Exp $ */ --- 4,8 ---- * Copyright (C) 1990, William Cheng. * ! * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/types.h,v 1.7 90/08/14 17:32:37 william Exp $ */ *************** *** 19,26 **** typedef struct ObjRec { ! int x, y, type, color; struct BBRec obbox; /* object bounding box */ struct BBRec bbox; /* real bounding box */ struct ObjRec * next, * prev; union { struct GroupRec * r; --- 19,27 ---- typedef struct ObjRec { ! int x, y, type, color, id, dirty; struct BBRec obbox; /* object bounding box */ struct BBRec bbox; /* real bounding box */ struct ObjRec * next, * prev; + struct AttrRec * fattr, * lattr; /* first and last attributes */ union { struct GroupRec * r; *************** *** 47,53 **** struct ObjRec * first, * last; char s[MAXSTRING+1]; - int id, dirty; - struct AttrRec * fattr, *lattr; /* first and last attributes */ - /* OBJ_GROUP, OBJ_SYM, OBJ_ICON can have attr */ } * GroupRecPtr; --- 48,51 ---- *************** *** 57,62 **** int sn; /* number of points in the spline polyline */ XPoint * svlist; ! int style, width, pen, curved, id, fill; ! struct AttrRec * fattr, *lattr; /* OBJ_POLY can have attr */ } * PolyRecPtr; --- 55,59 ---- int sn; /* number of points in the spline polyline */ XPoint * svlist; ! int style, width, pen, curved, fill; } * PolyRecPtr; *************** *** 85,89 **** int just; int lines; ! int font, style, size, rotate, pen; struct AttrRec * attr; /* ptr to attr record if text obj is an attr */ struct StrRec * first, * last; --- 82,86 ---- int just; int lines; ! int font, style, size, dpi, rotate, pen; struct AttrRec * attr; /* ptr to attr record if text obj is an attr */ struct StrRec * first, * last; *************** *** 101,105 **** int orig_x, orig_y, zoom, grid, grid_on; int color, h_align, v_align, line_w, line_s; ! int fill, pen, just, font, font_s, f_size, f_comp_size; char name[MAXPATHLENGTH+1], domain[MAXPATHLENGTH+1]; } * StkRecPtr; --- 98,102 ---- int orig_x, orig_y, zoom, grid, grid_on; int color, h_align, v_align, line_w, line_s; ! int fill, pen, just, font, f_style, f_size, f_dpi; char name[MAXPATHLENGTH+1], domain[MAXPATHLENGTH+1]; } * StkRecPtr; *** Makefile.noimake.orig Fri Aug 17 13:51:22 1990 --- Makefile.noimake Fri Aug 17 13:51:23 1990 *************** *** 4,8 **** # Copyright (C) 1990, William Cheng. # ! # @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/Makefile.noimake,v 1.19 90/07/30 11:05:05 william Exp $ # --- 4,8 ---- # Copyright (C) 1990, William Cheng. # ! # @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/Makefile.noimake,v 1.22 90/08/16 13:21:47 william Exp $ # *************** *** 19,23 **** OBJ1 = align.o animate.o attr.o \ box.o button.o \ ! choice.o color.o cursor.o \ dialog.o drawing.o dup.o \ edit.o \ --- 19,23 ---- OBJ1 = align.o animate.o attr.o \ box.o button.o \ ! choice.o color.o copypaste.o cursor.o \ dialog.o drawing.o dup.o \ edit.o \ *************** *** 95,111 **** color.o: const.h types.h \ choice.e mark.e menu.e obj.e raster.e select.e setup.e text.e cursor.o: const.h types.h $(CURSOR_BM) choice.e setup.e dialog.o: const.h box.e cursor.e font.e mainloop.e raster.e setup.e drawing.o: const.h types.h \ ! align.e animate.e attr.e box.e choice.e cursor.e dialog.e \ ! dup.e edit.e file.e font.e grid.e group.e mark.e menu.e msg.e \ ! obj.e oval.e pattern.e poly.e polygon.e raster.e rect.e \ ! ruler.e scroll.e select.e setup.e special.e stk.e stretch.e \ ! text.e dup.o: const.h types.h \ attr.e drawing.e grid.e obj.e select.e setup.e edit.o: const.h types.h \ ! align.e color.e cursor.e drawing.e dup.e font.e group.e mark.e \ ! obj.e poly.e raster.e select.e setup.e spline.e stretch.e file.o: const.h types.h \ align.e attr.e box.e button.e choice.e color.e dialog.e \ --- 95,115 ---- color.o: const.h types.h \ choice.e mark.e menu.e obj.e raster.e select.e setup.e text.e + copypaste.o: const.h types.h \ + choice.e color.e dup.e file.e font.e obj.e pattern.e select.e \ + setup.e special.e text.e cursor.o: const.h types.h $(CURSOR_BM) choice.e setup.e dialog.o: const.h box.e cursor.e font.e mainloop.e raster.e setup.e drawing.o: const.h types.h \ ! align.e animate.e attr.e box.e choice.e copypaste.e cursor.e \ ! dialog.e dup.e edit.e file.e font.e grid.e group.e mark.e \ ! menu.e msg.e obj.e oval.e pattern.e poly.e polygon.e raster.e \ ! rect.e ruler.e scroll.e select.e setup.e special.e stk.e \ ! stretch.e text.e dup.o: const.h types.h \ attr.e drawing.e grid.e obj.e select.e setup.e edit.o: const.h types.h \ ! align.e color.e copypaste.e cursor.e drawing.e dup.e font.e \ ! group.e mark.e obj.e poly.e raster.e select.e setup.e spline.e \ ! stretch.e file.o: const.h types.h \ align.e attr.e box.e button.e choice.e color.e dialog.e \ *************** *** 122,128 **** attr.e dup.e file.e obj.e select.e setup.e mainloop.o: const.h types.h \ ! animate.e choice.e color.e cursor.e dialog.e drawing.e \ ! file.e font.e grid.e menu.e msg.e names.e obj.e raster.e \ ! ruler.e scroll.e select.e setup.e stk.e text.e mark.o: const.h types.h \ raster.e setup.e select.e --- 126,132 ---- attr.e dup.e file.e obj.e select.e setup.e mainloop.o: const.h types.h \ ! animate.e choice.e color.e copypaste.e cursor.e dialog.e \ ! drawing.e file.e font.e grid.e menu.e msg.e names.e obj.e \ ! raster.e ruler.e scroll.e select.e setup.e stk.e text.e mark.o: const.h types.h \ raster.e setup.e select.e *** Imakefile.orig Fri Aug 17 13:51:29 1990 --- Imakefile Fri Aug 17 13:51:29 1990 *************** *** 4,11 **** /**/# Copyright (C) 1990, William Cheng. /**/# ! /**/# @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/Imakefile,v 1.21 90/08/02 09:15:42 william Exp $ /**/# ! TGIFVERSION = 1.12 PROGRAMS = tgif prtgif tgif2ps frontend11.o CDEBUGFLAGS = -g --- 4,11 ---- /**/# Copyright (C) 1990, William Cheng. /**/# ! /**/# @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/Imakefile,v 1.23 90/08/17 09:48:59 william Exp $ /**/# ! TGIFVERSION = 1.13 PROGRAMS = tgif prtgif tgif2ps frontend11.o CDEBUGFLAGS = -g *************** *** 15,18 **** --- 15,19 ---- -DPSFILE_MOD=\"664\" LOCAL_LIBRARIES = $(XLIB) + DEPLIBS = $(DEPXLIB) SYS_LIBRARIES = -lm *************** *** 19,23 **** OBJ1 = align.o animate.o attr.o \ box.o button.o \ ! choice.o color.o cursor.o \ dialog.o drawing.o dup.o \ edit.o \ --- 20,24 ---- OBJ1 = align.o animate.o attr.o \ box.o button.o \ ! choice.o color.o copypaste.o cursor.o \ dialog.o drawing.o dup.o \ edit.o \ *** tgif.man.orig Fri Aug 17 13:51:39 1990 --- tgif.man Fri Aug 17 13:51:40 1990 *************** *** 1,4 **** ! .\"@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/tgif.man,v 1.10 90/07/30 16:06:37 william Exp $ ! .TH TGIF 1 "Version 1.10 and Above" "Tgif" .SH NAME \fItgif\fR \- Xlib based 2-D drawing facility under X11. Also supports --- 1,4 ---- ! .\"@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/tgif.man,v 1.11 90/08/16 15:30:15 william Exp $ ! .TH TGIF 1 "Version 1.13 and Above" "Tgif" .SH NAME \fItgif\fR \- Xlib based 2-D drawing facility under X11. Also supports *************** *** 80,89 **** styles (plain, head arrow, tail arrow, double arrows) for polyline and open-splines, 3 types of text justifications, 4 text ! styles (roman, itatlic, bold, bold-italic), 6 text sizes ! (8, 10, 12, 14, 18, 24), 5 fonts (Times, Courier, ! Helvetica, New-Century-Schoolbook, Symbol), and 10 colors (magenta, red, green, blue, yellow, pink, cyan, cadet-blue, white, black). Only right-angle rotations are supported. ! All commands in tgif can either be activated by a pop-up menu or by typing an appropriate non-alphanumeric key. --- 80,90 ---- styles (plain, head arrow, tail arrow, double arrows) for polyline and open-splines, 3 types of text justifications, 4 text ! styles (roman, itatlic, bold, bold-italic), 12 text sizes ! (8, 10, 12, 14, 18, and 24 for the 75dpi fonts and ! 11, 14, 17, 20, 25, and 34 for the 100dpi fonts), 5 fonts (Times, Courier, ! Helvetica, New-Century-Schoolbook, Symbol), and 10 default colors (magenta, red, green, blue, yellow, pink, cyan, cadet-blue, white, black). Only right-angle rotations are supported. ! Most commands in tgif can either be activated by a pop-up menu or by typing an appropriate non-alphanumeric key. *************** *** 175,178 **** --- 176,180 ---- ^W change the drawing mode to text\br ^X delete all selected objects\br + ^Y copy selected object to cut buffer\br ^Z escape to Prolog\br ^, scroll left\br *************** *** 205,214 **** #Y escape to Prolog\br #Z zoom in\br ! #0 change the font size to 8\br ! #1 change the font size to 10\br ! #2 change the font size to 12\br ! #3 change the font size to 14\br ! #4 change the font size to 18\br ! #5 change the font size to 24\br #, scroll up\br #. scroll down\br --- 207,216 ---- #Y escape to Prolog\br #Z zoom in\br ! #0 change the font size to 8 (11)\br ! #1 change the font size to 10 (14)\br ! #2 change the font size to 12 (17)\br ! #3 change the font size to 14 (20)\br ! #4 change the font size to 18 (25)\br ! #5 change the font size to 24 (34)\br #, scroll up\br #. scroll down\br *************** *** 232,235 **** --- 234,238 ---- ^#V change the drawing mode to oval\br ^#W toggle between poly and spline\br + ^#Y paste from the cut buffer\br .DE .br *************** *** 415,419 **** \fBlatex\fR(1L), \fBlpr\fR(1), \fBenv\fR(1), \fBX\fR(1), \fBtgif2ps\fR(1), \fBdvips\fR(1) ! .SH BUGS When any of the ``escape to Prolog'' commands are accidentally executed, just type a return key in the window where tgif is started --- 418,422 ---- \fBlatex\fR(1L), \fBlpr\fR(1), \fBenv\fR(1), \fBX\fR(1), \fBtgif2ps\fR(1), \fBdvips\fR(1) ! .SH IDIOSYNCHRASIES When any of the ``escape to Prolog'' commands are accidentally executed, just type a return key in the window where tgif is started *************** *** 420,423 **** --- 423,435 ---- to resume tgif. .PP + The paste operation works on a cut buffer generated by tgif or by non-tgif + tools (such as \fIxterm\fR). + If the cut buffer is \fInot\fR generated by tgif, its content is treated as + ASCII character strings, which is inserted into the current drawing + as a text object (current settings for text objects are used + to create the text object). + If the cut buffer \fIis\fR generated by tgif, then all the current + settings are ignored. + .SH BUGS The directory where tgif is started is considerd the root directory of the tgif session. The user is not allowed to ---------------------------------> cut here <--------------------------------- -- Bill Cheng // UCLA Computer Science Department // (213) 206-7135 3277 Boelter Hall // Los Angeles, California 90024 // USA william@CS.UCLA.EDU ...!{uunet|ucbvax}!cs.ucla.edu!william dan ---------------------------------------------------- O'Reilly && Associates argv@sun.com / argv@ora.com Opinions expressed reflect those of the author only.