home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
x
/
volume16
/
xfig-2.1.3
/
part22
< prev
next >
Wrap
Internet Message Format
|
1992-02-04
|
57KB
Path: uunet!zaphod.mps.ohio-state.edu!mips!msi!dcmartin
From: envbvs@bea.lbl.gov (Brian V. Smith)
Newsgroups: comp.sources.x
Subject: v16i027: Xfig 2.1.3, Part22/25
Message-ID: <1992Feb4.150322.1497@msi.com>
Date: 4 Feb 92 15:03:22 GMT
References: <csx-16i006-xfig-2.1.3@uunet.UU.NET>
Sender: dcmartin@msi.com (David C. Martin - Moderator)
Organization: Molecular Simulations, Inc.
Lines: 1643
Approved: dcmartin@msi.com
Originator: dcmartin@fascet
Submitted-by: envbvs@bea.lbl.gov (Brian V. Smith)
Posting-number: Volume 16, Issue 27
Archive-name: xfig-2.1.3/part22
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# The tool that generated this appeared in the comp.sources.unix newsgroup;
# send mail to comp-sources-unix@uunet.uu.net if you want that tool.
# If this archive is complete, you will see the following message at the end:
# "End of archive 22 (of 25)."
# Contents: Examples/damper.fig.uu Examples/filenames.fig.uu
# Examples/flowchart.fig.uu Examples/gold.fig.uu d_arc.c e_align.c
# f_util.c u_fonts.c u_print.c w_cursor.c w_grid.c w_zoom.c
# Wrapped by dcmartin@fascet on Tue Feb 4 06:42:33 1992
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'Examples/damper.fig.uu' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'Examples/damper.fig.uu'\"
else
echo shar: Extracting \"'Examples/damper.fig.uu'\" \(4773 characters\)
sed "s/^X//" >'Examples/damper.fig.uu' <<'END_OF_FILE'
Xbegin 664 damper.fig
XM(T9)1R`R+C`*.#`@,@HQ(#,@,"`Q(#`@,"`P(#(Q(#`N,#`P(#$@,"XP,#`@
XM,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CDX
XM-B`S-S<N,S,W(#(V-BXU-C,@,S8T+C<S,R`R-S0N-#0Q(#,U,2XP,#8@,C@P
XM+C$V,B`S-#0N,3,Q(#$U+CDS,B`M.2XR-3`*,R`R(#`@,2`P(#`@,"`P(#`N
XM,#`P(#`@,0H),"`P(#$N,#`P(#0N,#`P(#@N,#`P"@D@-3`U(#0P,B`T-S,@
XM,S<P(#0R,B`S,S0@,S0Y(#,R-"`Y.3DY(#DY.3D*"2`Q-2XY,S(@+3DN,C4P
XM(#0X-BXU.#$@,S@S+C,T-2`T-S@N-3<R(#,W-2XS,C0@-#8Q+C<X-"`S-C`N
XM.34V(#0S-BXT.3D@,S,Y+C(P-"`T,#DN-C@V(#,R."XU.#4@,SDQ+C,X,"`S
XM,C8N,CDS(#$U+CDS,B`M.2XR-3`*-"`P(#`@,3(@,"`P(#`@,"XP,#`@,2`Q
XM,B`X."`U,C,@-S(@4F5T=7)N($1A;7!E<G,_`0HT(#`@,"`Q,B`P(#`@,"`P
XM+C`P,"`Q(#$R(#,T(#(Y,"`S,34@4W5P<&QY`0HT(#`@,"`Q,B`P(#`@,"`P
XM+C`P,"`Q(#$R(#0V(#,P,R`S,S0@1&%M<&5R<P$*-"`Q(#`@,38@,"`P(#`@
XM,"XP,#`@,2`Q-R`S-3<@,S@Q(#(R(%-C:&5M871I8R!O9B!4=V\M6F]N92!$
X686UP97)E9"!);G-T86QL871I;VX!"E-C
X`
Xend
END_OF_FILE
if test 4773 -ne `wc -c <'Examples/damper.fig.uu'`; then
echo shar: \"'Examples/damper.fig.uu'\" unpacked with wrong size!
fi
# end of 'Examples/damper.fig.uu'
fi
if test -f 'Examples/filenames.fig.uu' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'Examples/filenames.fig.uu'\"
else
echo shar: Extracting \"'Examples/filenames.fig.uu'\" \(4194 characters\)
sed "s/^X//" >'Examples/filenames.fig.uu' <<'END_OF_FILE'
Xbegin 664 filenames.fig
XM(T9)1R`R+C`*.#`@,@H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0HT(#`@
XM,"`Q,B`P(#`@,"`P+C`P,"`Q(#D@.#8@.#0@,S8T(&(@/2!,86ME($-H87)L
XM97,!"C0@,"`P(#$R(#`@,"`P(#`N,#`P(#$@.2`U,R`X-"`S-#D@82`]($%R
X&8V%T80$*
X`
Xend
END_OF_FILE
if test 4194 -ne `wc -c <'Examples/filenames.fig.uu'`; then
echo shar: \"'Examples/filenames.fig.uu'\" unpacked with wrong size!
fi
# end of 'Examples/filenames.fig.uu'
fi
if test -f 'Examples/flowchart.fig.uu' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'Examples/flowchart.fig.uu'\"
else
echo shar: Extracting \"'Examples/flowchart.fig.uu'\" \(4164 characters\)
sed "s/^X//" >'Examples/flowchart.fig.uu' <<'END_OF_FILE'
Xbegin 664 flowchart.fig
XM(T9)1R`R+C`*.#`@,@HR(#(@,"`Q(#`@,"`P(#`@,"XP,#`@,"`P"@D@-#<T
XM(#4R.2`T-S0@-34Y(#8P-"`U-3D@-C`T(#4R.2`T-S0@-3(Y(#DY.3D@.3DY
XM.0HR(#0@,"`R(#`@,"`P(#`@,"XP,#`@-R`P(#`*"2`Q.3D@,34T(#$Y.2`R
XM,30@,SDY(#(Q-"`S.3D@,34T(#$Y.2`Q-30@.3DY.2`Y.3DY"C(@-"`P(#(@
XM,"`P(#`@,"`P+C`P,"`W(#`@,`H)(#$Y.2`R-30@,3DY(#,Q-"`S.3D@,S$T
XM(#,Y.2`R-30@,3DY(#(U-"`Y.3DY(#DY.3D*,B`T(#`@,B`P(#`@,"`P(#`N
XM,#`P(#<@,"`P"@D@,3DY(#,U-"`Q.3D@-#$T(#,Y.2`T,30@,SDY(#,U-"`Q
XM.3D@,S4T(#DY.3D@.3DY.0HR(#0@,"`R(#`@,"`P(#`@,"XP,#`@-R`P(#`*
XM"2`Q.3D@-3$T(#$Y.2`U-S0@,SDY(#4W-"`S.3D@-3$T(#$Y.2`U,30@.3DY
XM.2`Y.3DY"C(@-"`P(#(@,"`P(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(P(#DV(#(P-"`R
XM-S0@-"XR+C,@($9A;@$*-"`P(#`@,30@,"`P(#`@,"XP,#`@,2`R,"`R,3,@
XM-3(T(#$W-"`T+C(N,B`@0V]M8FEN960@0W)A8VL!"C0@,"`P(#$T(#`@,"`P
XM(#`N,#`P(#$@,C`@,3@T(#(P-"`Q-S0@-"XR+C$@(%-I;7!L92!#<F%C:P$*
XM-"`P(#`@,30@,"`P(#`@,"XP,#`@,2`R,"`Q,S<@-#<Y(#4T.2!!;&P@4&%R
XM86UE=&5R<P$*-"`P(#`@,30@,"`P(#`@,"XP,#`@,2`R,"`U-2`S-3D@-S0@
XM-"XR+C`@`0HT(#`@,"`Q-"`P(#`@,"`P+C`P,"`Q(#(P(#$S-R`Q,SD@-30@
XM06QL(%!A<F%M971E<G,!"C0@,"`P(#$T(#`@,"`P(#`N,#`P(#$@,C`@,3(Y
XM(#0Q.2`W-"!396QE8W0@36]D=6QE`0HT(#`@,"`Q-"`P(#`@,"`P+C`P,"`Q
X>(#(P(#$Q.2`T,3D@.3D@9F]R($QI;FL@5'EP90$*
X`
Xend
END_OF_FILE
if test 4164 -ne `wc -c <'Examples/flowchart.fig.uu'`; then
echo shar: \"'Examples/flowchart.fig.uu'\" unpacked with wrong size!
fi
# end of 'Examples/flowchart.fig.uu'
fi
if test -f 'Examples/gold.fig.uu' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'Examples/gold.fig.uu'\"
else
echo shar: Extracting \"'Examples/gold.fig.uu'\" \(3829 characters\)
sed "s/^X//" >'Examples/gold.fig.uu' <<'END_OF_FILE'
Xbegin 664 gold.fig
XM(T9)1R`R+C`*.#`@,@HR(#(@,"`Q(#`@,"`P(#`@,"XP,#`@,"`P"@D@-34T
XM(#0S.2`U-30@-#,Q(#4V,B`T,S$@-38R(#0S.2`U-30@-#,Y(#DY.3D@.3DY
XM.0HR(#(@,"`Q(#`@,"`P(#`@,"XP,#`@,"`P"@D@,34T(#0S.2`Q-30@-#,Q
XM(#$V,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Q(#`@,"`P(#`@,"XP
XM,#`@,"`P"@D@-3<Y(#(T-"`V,3D@,C$T(#DY.3D@.3DY.0HR(#$@,"`Q(#`@
XM,"`P(#`@,"XP,#`@,"`P"@D@,C,Y(#(X-"`R-SD@,C4T(#DY.3D@.3DY.0HT
XM(#`@,"`Q,B`P(#`@,"`P+C`P,"`Q(#D@,S8@-3,Y(#0S.2`V-2`@("`B`0HT
XM(#`@,"`Q,B`P(#`@,"`P+C`P,"`Q(#D@,S8@,3,Y(#0S.2`V-"`@("`B`0HT
XM(#`@,"`Q,B`P(#`@,"`P+C`P,"`Q(#D@,3(@-3D@,C4Y(#,B`0HT(#`@,"`Q
XM,B`P(#`@,"`P+C`P,"`Q(#D@,3(@-3D@,S,Y(#4B`0HT(#`@,"`Q,B`P(#`@
XM,"`P+C`P,"`Q(#D@,3@@-3<Y(#(P-"`Q,R(!"C0@,"`P(#$R(#`@,"`P(#`N
XM,#`P(#$@.2`Q,B`S.3D@,CDY(#4B`0HT(#`@,"`Q,B`P(#`@,"`P+C`P,"`Q
XM(#D@,3(@,3@Y(#$X-"`X(@$*-"`Q(#`@,3@@,"`P(#`@,"XP,#`@,2`Q-R`S
XM-3@@,S0Y(#$R-"!(;W<@=&\@8W)E871E(&UA='1E<B`H=7-I;F<@9V]L9"!A
X/<R!A;B!E>&%M<&QE*0$*
X`
Xend
END_OF_FILE
if test 3829 -ne `wc -c <'Examples/gold.fig.uu'`; then
echo shar: \"'Examples/gold.fig.uu'\" unpacked with wrong size!
fi
# end of 'Examples/gold.fig.uu'
fi
if test -f 'd_arc.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'d_arc.c'\"
else
echo shar: Extracting \"'d_arc.c'\" \(4526 characters\)
sed "s/^X//" >'d_arc.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X * Copyright (c) 1985 by Supoj Sutanthavibul
X *
X * "Permission to use, copy, modify, distribute, and sell this software and its
X * documentation for any purpose is hereby granted without fee, provided that
X * the above copyright notice appear in all copies and that both that
X * copyright notice and this permission notice appear in supporting
X * documentation, and that the name of M.I.T. not be used in advertising or
X * publicity pertaining to distribution of the software without specific,
X * written prior permission. M.I.T. makes no representations about the
X * suitability of this software for any purpose. It is provided "as is"
X * without express or implied warranty."
X *
X */
X
X/********************** DECLARATIONS ********************/
X
X/* IMPORTS */
X
X#include "fig.h"
X#include "resources.h"
X#include "mode.h"
X#include "object.h"
X#include "paintop.h"
X#include "u_create.h"
X#include "u_elastic.h"
X#include "u_list.h"
X#include "w_canvas.h"
X#include "w_mousefun.h"
X
X/* LOCAL */
X
XF_pos point[3];
X
Xstatic int create_arcobject();
Xstatic int get_arcpoint();
Xstatic int init_arc_drawing();
Xstatic int cancel_arc();
X
Xarc_drawing_selected()
X{
X set_mousefun("first point", "", "");
X canvas_kbd_proc = null_proc;
X canvas_locmove_proc = null_proc;
X canvas_leftbut_proc = init_arc_drawing;
X canvas_middlebut_proc = null_proc;
X canvas_rightbut_proc = null_proc;
X set_cursor(arrow_cursor);
X reset_action_on();
X}
X
Xstatic
Xinit_arc_drawing(x, y)
X int x, y;
X{
X set_mousefun("mid point", "", "cancel");
X draw_mousefun_canvas();
X canvas_rightbut_proc = cancel_arc;
X num_point = 0;
X point[num_point].x = fix_x = cur_x = x;
X point[num_point++].y = fix_y = cur_y = y;
X canvas_locmove_proc = freehand_line;
X canvas_leftbut_proc = get_arcpoint;
X canvas_middlebut_proc = null_proc;
X elastic_line();
X set_temp_cursor(null_cursor);
X set_action_on();
X}
X
Xstatic
Xcancel_arc()
X{
X elastic_line();
X if (num_point == 2) {
X /* erase initial part of line */
X cur_x = point[0].x;
X cur_y = point[0].y;
X elastic_line();
X }
X arc_drawing_selected();
X draw_mousefun_canvas();
X}
X
Xstatic
Xget_arcpoint(x, y)
X int x, y;
X{
X if (x == fix_x && y == fix_y)
X return;
X
X if (num_point == 1) {
X set_mousefun("final point", "", "cancel");
X draw_mousefun_canvas();
X }
X if (num_point == 2) {
X create_arcobject(x, y);
X return;
X }
X elastic_line();
X cur_x = x;
X cur_y = y;
X elastic_line();
X point[num_point].x = fix_x = x;
X point[num_point++].y = fix_y = y;
X elastic_line();
X}
X
Xstatic
Xcreate_arcobject(lx, ly)
X int lx, ly;
X{
X F_arc *arc;
X int x, y, i;
X float xx, yy;
X
X elastic_line();
X cur_x = lx;
X cur_y = ly;
X elastic_line();
X point[num_point].x = lx;
X point[num_point++].y = ly;
X x = point[0].x;
X y = point[0].y;
X /* erase previous line segment(s) if necessary */
X for (i = 1; i < num_point; i++) {
X pw_vector(canvas_win, x, y, point[i].x, point[i].y, INV_PAINT,
X 1, RUBBER_LINE, 0.0, DEFAULT_COLOR);
X x = point[i].x;
X y = point[i].y;
X }
X if (!compute_arccenter(point[0], point[1], point[2], &xx, &yy)) {
X put_msg("Invalid ARC geometry");
X arc_drawing_selected();
X draw_mousefun_canvas();
X return;
X }
X if ((arc = create_arc()) == NULL) {
X arc_drawing_selected();
X draw_mousefun_canvas();
X return;
X }
X arc->type = T_3_POINTS_ARC;
X arc->style = cur_linestyle;
X arc->thickness = cur_linewidth;
X /* scale dash length according to linethickness */
X arc->style_val = cur_styleval * (cur_linewidth + 1) / 2;
X arc->pen = 0;
X arc->fill_style = cur_fillstyle;
X arc->color = cur_color;
X arc->depth = 0;
X arc->direction = compute_direction(point[0], point[1], point[2]);
X if (autoforwardarrow_mode)
X arc->for_arrow = forward_arrow();
X else
X arc->for_arrow = NULL;
X if (autobackwardarrow_mode)
X arc->back_arrow = backward_arrow();
X else
X arc->back_arrow = NULL;
X arc->center.x = xx;
X arc->center.y = yy;
X arc->point[0].x = point[0].x;
X arc->point[0].y = point[0].y;
X arc->point[1].x = point[1].x;
X arc->point[1].y = point[1].y;
X arc->point[2].x = point[2].x;
X arc->point[2].y = point[2].y;
X arc->next = NULL;
X draw_arc(arc, PAINT);
X if (appres.DEBUG) {
X int xmin, ymin, xmax, ymax;
X
X arc_bound(arc, &xmin, &ymin, &xmax, &ymax);
X elastic_box(xmin, ymin, xmax, ymax);
X }
X add_arc(arc);
X arc_drawing_selected();
X draw_mousefun_canvas();
X}
END_OF_FILE
if test 4526 -ne `wc -c <'d_arc.c'`; then
echo shar: \"'d_arc.c'\" unpacked with wrong size!
fi
# end of 'd_arc.c'
fi
if test -f 'e_align.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'e_align.c'\"
else
echo shar: Extracting \"'e_align.c'\" \(4138 characters\)
sed "s/^X//" >'e_align.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X * Copyright (c) 1985 by Supoj Sutanthavibul
X *
X * "Permission to use, copy, modify, distribute, and sell this software and its
X * documentation for any purpose is hereby granted without fee, provided that
X * the above copyright notice appear in all copies and that both that
X * copyright notice and this permission notice appear in supporting
X * documentation, and that the name of M.I.T. not be used in advertising or
X * publicity pertaining to distribution of the software without specific,
X * written prior permission. M.I.T. makes no representations about the
X * suitability of this software for any purpose. It is provided "as is"
X * without express or implied warranty."
X *
X */
X
X#include "fig.h"
X#include "resources.h"
X#include "object.h"
X#include "paintop.h"
X#include "mode.h"
X#include "u_create.h"
X#include "u_draw.h"
X#include "u_search.h"
X#include "u_undo.h"
X#include "w_canvas.h"
X#include "w_mousefun.h"
X
Xstatic int init_align();
Xstatic int llx, lly, urx, ury;
Xstatic int xcmin, ycmin, xcmax, ycmax;
Xstatic int dx, dy;
Xstatic int align_arc();
Xstatic int align_ellipse();
Xstatic int align_line();
Xstatic int align_spline();
Xstatic int align_text();
Xstatic int align_compound();
Xstatic int get_dx_dy();
X
Xalign_selected()
X{
X set_mousefun("align compound", "", "");
X canvas_kbd_proc = null_proc;
X canvas_locmove_proc = null_proc;
X init_searchproc_left(init_align);
X canvas_leftbut_proc = object_search_left;
X canvas_middlebut_proc = null_proc;
X canvas_rightbut_proc = null_proc;
X set_cursor(pick15_cursor);
X}
X
Xstatic
Xinit_align(p, type, x, y, px, py)
X char *p;
X int type;
X int x, y;
X int px, py;
X{
X if (type != O_COMPOUND)
X return;
X cur_c = (F_compound *) p;
X toggle_compoundmarker(cur_c);
X draw_compoundelements(cur_c, ERASE);
X old_c = copy_compound(cur_c);
X compound_bound(cur_c, &xcmin, &ycmin, &xcmax, &ycmax);
X align_ellipse();
X align_arc();
X align_line();
X align_spline();
X align_compound();
X align_text();
X /*
X * recompute the compound's bounding box
X */
X compound_bound(cur_c, &cur_c->nwcorner.x, &cur_c->nwcorner.y,
X &cur_c->secorner.x, &cur_c->secorner.y);
X draw_compoundelements(cur_c, PAINT);
X toggle_compoundmarker(cur_c);
X clean_up();
X old_c->next = cur_c;
X set_latestcompound(old_c);
X set_action_object(F_CHANGE, O_COMPOUND);
X set_modifiedflag();
X}
X
Xstatic int
Xalign_ellipse()
X{
X F_ellipse *e;
X
X for (e = cur_c->ellipses; e != NULL; e = e->next) {
X ellipse_bound(e, &llx, &lly, &urx, &ury);
X get_dx_dy();
X translate_ellipse(e, dx, dy);
X }
X}
X
Xstatic int
Xalign_arc()
X{
X F_arc *a;
X
X for (a = cur_c->arcs; a != NULL; a = a->next) {
X arc_bound(a, &llx, &lly, &urx, &ury);
X get_dx_dy();
X translate_arc(a, dx, dy);
X }
X}
X
Xstatic int
Xalign_line()
X{
X F_line *l;
X
X for (l = cur_c->lines; l != NULL; l = l->next) {
X line_bound(l, &llx, &lly, &urx, &ury);
X get_dx_dy();
X translate_line(l, dx, dy);
X }
X}
X
Xstatic int
Xalign_spline()
X{
X F_spline *s;
X
X for (s = cur_c->splines; s != NULL; s = s->next) {
X spline_bound(s, &llx, &lly, &urx, &ury);
X get_dx_dy();
X translate_spline(s, dx, dy);
X }
X}
X
Xstatic int
Xalign_compound()
X{
X F_compound *c;
X
X for (c = cur_c->compounds; c != NULL; c = c->next) {
X compound_bound(c, &llx, &lly, &urx, &ury);
X get_dx_dy();
X translate_compound(c, dx, dy);
X }
X}
X
Xstatic int
Xalign_text()
X{
X F_text *t;
X
X for (t = cur_c->texts; t != NULL; t = t->next) {
X text_bound(t, &llx, &lly, &urx, &ury);
X get_dx_dy();
X translate_text(t, dx, dy);
X }
X}
X
Xstatic int
Xget_dx_dy()
X{
X switch (cur_valign) {
X case NONE:
X dy = 0;
X break;
X case TOP:
X dy = ycmin - lly;
X break;
X case BOTTOM:
X dy = ycmax - ury;
X break;
X case CENTER:
X dy = (ycmin - lly) + (abs(ycmin - lly) + abs(ycmax - ury)) / 2;
X break;
X }
X switch (cur_halign) {
X case NONE:
X dx = 0;
X break;
X case LEFT:
X dx = xcmin - llx;
X break;
X case RIGHT:
X dx = xcmax - urx;
X break;
X case CENTER:
X dx = (xcmin - llx) + (abs(xcmin - llx) + abs(xcmax - urx)) / 2;
X break;
X }
X}
END_OF_FILE
if test 4138 -ne `wc -c <'e_align.c'`; then
echo shar: \"'e_align.c'\" unpacked with wrong size!
fi
# end of 'e_align.c'
fi
if test -f 'f_util.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'f_util.c'\"
else
echo shar: Extracting \"'f_util.c'\" \(3768 characters\)
sed "s/^X//" >'f_util.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X * Copyright (c) 1985 by Supoj Sutanthavibul
X *
X * "Permission to use, copy, modify, distribute, and sell this software and its
X * documentation for any purpose is hereby granted without fee, provided that
X * the above copyright notice appear in all copies and that both that
X * copyright notice and this permission notice appear in supporting
X * documentation, and that the name of M.I.T. not be used in advertising or
X * publicity pertaining to distribution of the software without specific,
X * written prior permission. M.I.T. makes no representations about the
X * suitability of this software for any purpose. It is provided "as is"
X * without express or implied warranty."
X *
X */
X
X#include "fig.h"
X#include "object.h"
X#include "mode.h"
X#include "resources.h"
X#include "w_util.h"
X
Xint
Xemptyname(name)
X char name[];
X
X{
X if (*name == '\0') {
X return (1);
X } else {
X return (0);
X }
X}
X
Xint
Xemptyname_msg(name, msg)
X char name[], msg[];
X
X{
X int returnval;
X
X if (returnval = emptyname(name))
X put_msg("No file name specified, %s command ignored", msg);
X return (returnval);
X}
X
Xint
Xemptyfigure()
X{
X if (objects.texts != NULL)
X return (0);
X if (objects.lines != NULL)
X return (0);
X if (objects.ellipses != NULL)
X return (0);
X if (objects.splines != NULL)
X return (0);
X if (objects.arcs != NULL)
X return (0);
X if (objects.compounds != NULL)
X return (0);
X return (1);
X}
X
Xint
Xemptyfigure_msg(msg)
X char msg[];
X
X{
X int returnval;
X
X if (returnval = emptyfigure())
X put_msg("Empty figure, %s command ignored", msg);
X return (returnval);
X}
X
Xint
Xchange_directory(path)
X char *path;
X{
X if (path == NULL) {
X *cur_dir = '\0';
X return (0);
X }
X if (chdir(path) == -1) {
X put_msg("Can't go to directory %s, : %s", path, sys_errlist[errno]);
X return (1);
X }
X if (get_directory(cur_dir) != NULL) /* get cwd */
X return (0);
X else
X return (1);
X}
X
Xget_directory(direct)
X char *direct;
X{
X#if defined(SYSV) || defined(SVR4)
X extern char *getcwd();
X
X#else
X extern char *getwd();
X
X#endif
X
X#if defined(SYSV) || defined(SVR4)
X if (getcwd(direct, 1024) == NULL) { /* get current working dir */
X put_msg("%s", "Can't get current directory");
X#else
X if (getwd(direct) == NULL) {/* get current working dir */
X put_msg("%s", direct); /* err msg is in directory */
X#endif
X *direct = '\0';
X return NULL;
X }
X return 1;
X}
X
X#ifndef S_IWUSR
X#define S_IWUSR 0000200
X#endif
X#ifndef S_IWGRP
X#define S_IWGRP 0000020
X#endif
X#ifndef S_IWOTH
X#define S_IWOTH 0000002
X#endif
X
Xint
Xok_to_write(file_name, op_name)
X char *file_name, *op_name;
X{
X struct stat file_status;
X char string[180];
X
X if (stat(file_name, &file_status) == 0) { /* file exists */
X if (file_status.st_mode & S_IFDIR) {
X put_msg("\"%s\" is a directory", file_name);
X return (0);
X }
X if (file_status.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH)) {
X /* writing is permitted by SOMEONE */
X if (!((file_status.st_mode & S_IWUSR) && /* user writable */
X (file_status.st_uid == geteuid()))
X &&
X !((file_status.st_mode & S_IWGRP) && /* group writable */
X (file_status.st_gid == getegid()))
X &&
X !(file_status.st_mode & S_IWOTH)) { /* world writable */
X put_msg("Write permission for \"%s\" is denied", file_name);
X return (0);
X } else {
X sprintf(string, "\"%s\" already exists.\nDo you want to overwrite it?", file_name);
X if (!popup_query(QUERY_YES, string)) {
X put_msg("%s cancelled", op_name);
X return (0);
X }
X }
X } else {
X put_msg("\"%s\" is read only", file_name);
X return (0);
X }
X } else if (errno != ENOENT)
X return (0); /* file does exist but stat fails */
X
X return (1);
X}
END_OF_FILE
if test 3768 -ne `wc -c <'f_util.c'`; then
echo shar: \"'f_util.c'\" unpacked with wrong size!
fi
# end of 'f_util.c'
fi
if test -f 'u_fonts.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'u_fonts.c'\"
else
echo shar: Extracting \"'u_fonts.c'\" \(4046 characters\)
sed "s/^X//" >'u_fonts.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X * Copyright (c) 1985 by Supoj Sutanthavibul
X *
X * "Permission to use, copy, modify, distribute, and sell this software and its
X * documentation for any purpose is hereby granted without fee, provided that
X * the above copyright notice appear in all copies and that both that
X * copyright notice and this permission notice appear in supporting
X * documentation, and that the name of M.I.T. not be used in advertising or
X * publicity pertaining to distribution of the software without specific,
X * written prior permission. M.I.T. makes no representations about the
X * suitability of this software for any purpose. It is provided "as is"
X * without express or implied warranty."
X *
X */
X
X#include <X11/Xlib.h>
X#include "u_fonts.h"
X#include "object.h"
X
X#define NULL 0
X
X/* printer font names for indicator window */
X
Xstruct _xfstruct x_fontinfo[NUM_X_FONTS] = {
X {"-adobe-times-medium-r-*--*", NULL},
X {"-adobe-times-medium-i-*--*", NULL},
X {"-adobe-times-bold-r-*--*", NULL},
X {"-adobe-times-bold-i-*--*", NULL},
X {"-schumacher-clean-medium-r-*--*", NULL},
X {"-schumacher-clean-medium-i-*--*", NULL},
X {"-schumacher-clean-bold-r-*--*", NULL},
X {"-schumacher-clean-bold-i-*--*", NULL},
X {"-adobe-courier-medium-r-*--*", NULL},
X {"-adobe-courier-medium-o-*--*", NULL},
X {"-adobe-courier-bold-r-*--*", NULL},
X {"-adobe-courier-bold-o-*--*", NULL},
X {"-adobe-helvetica-medium-r-*--*", NULL},
X {"-adobe-helvetica-medium-o-*--*", NULL},
X {"-adobe-helvetica-bold-r-*--*", NULL},
X {"-adobe-helvetica-bold-o-*--*", NULL},
X {"-adobe-new century schoolbook-medium-r-*--*", NULL},
X {"-adobe-new century schoolbook-medium-i-*--*", NULL},
X {"-adobe-new century schoolbook-bold-r-*--*", NULL},
X {"-adobe-new century schoolbook-bold-i-*--*", NULL},
X {"-*-lucidabright-medium-r-*--*", NULL},
X {"-*-lucidabright-medium-i-*--*", NULL},
X {"-*-lucidabright-demibold-r-*--*", NULL},
X {"-*-lucidabright-demibold-i-*--*", NULL},
X {"*-symbol-medium-r-*--*", NULL},
X {"-*-zapfchancery-medium-i-*--*", NULL},
X {"-*-zapfdingbats-*-*-*--*", NULL},
X};
X
Xstruct _fstruct ps_fontinfo[NUM_PS_FONTS + 1] = {
X {"Default", -1},
X {"Times-Roman", 0},
X {"Times-Italic", 1},
X {"Times-Bold", 2},
X {"Times-BoldItalic", 3},
X {"AvantGarde-Book", 4},
X {"AvantGarde-BookOblique", 5},
X {"AvantGarde-Demi", 6},
X {"AvantGarde-DemiOblique", 7},
X {"Bookman-Light", 0},
X {"Bookman-LightItalic", 0},
X {"Bookman-Demi", 0},
X {"Bookman-DemiItalic", 0},
X {"Courier", 8},
X {"Courier-Oblique", 9},
X {"Courier-Bold", 10},
X {"Courier-BoldOblique", 11},
X {"Helvetica", 12},
X {"Helvetica-Oblique", 13},
X {"Helvetica-Bold", 14},
X {"Helvetica-BoldOblique", 15},
X {"Helvetica-Narrow", 0},
X {"Helvetica-Narrow-Oblique", 0},
X {"Helvetica-Narrow-Bold", 0},
X {"Helvetica-Narrow-BoldOblique", 0},
X {"NewCenturySchlbk-Roman", 16},
X {"NewCenturySchlbk-Italic", 17},
X {"NewCenturySchlbk-Bold", 18},
X {"NewCenturySchlbk-BoldItalic", 19},
X {"Palatino-Roman", 20},
X {"Palatino-Italic", 21},
X {"Palatino-Bold", 22},
X {"Palatino-BoldItalic", 23},
X {"Symbol", 24},
X {"ZapfChancery-MediumItalic", 25},
X {"ZapfDingbats", 26},
X};
X
Xstruct _fstruct latex_fontinfo[NUM_LATEX_FONTS] = {
X {"Default", 0},
X {"Roman", 0},
X {"Bold", 2},
X {"Italic", 1},
X {"Modern", 12},
X {"Typewriter", 8},
X};
X
Xx_fontnum(psflag, fnum)
X int psflag, fnum;
X{
X return (psflag ? ps_fontinfo[fnum + 1].xfontnum :
X latex_fontinfo[fnum].xfontnum);
X}
X
Xpsfontnum(font)
Xchar *font;
X{
X int i;
X
X if (font == NULL)
X return(DEF_PS_FONT);
X for (i=0; i<NUM_PS_FONTS; i++)
X if (strcmp(ps_fontinfo[i].name, font) == 0)
X return (i-1);
X return(DEF_PS_FONT);
X}
X
Xlatexfontnum(font)
Xchar *font;
X{
X int i;
X
X if (font == NULL)
X return(DEF_LATEX_FONT);
X for (i=0; i<NUM_LATEX_FONTS; i++)
X if (strcmp(latex_fontinfo[i].name, font) == 0)
X return (i);
X return(DEF_LATEX_FONT);
X}
END_OF_FILE
if test 4046 -ne `wc -c <'u_fonts.c'`; then
echo shar: \"'u_fonts.c'\" unpacked with wrong size!
fi
# end of 'u_fonts.c'
fi
if test -f 'u_print.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'u_print.c'\"
else
echo shar: Extracting \"'u_print.c'\" \(3648 characters\)
sed "s/^X//" >'u_print.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X * Copyright (c) 1985 by Supoj Sutanthavibul
X *
X * "Permission to use, copy, modify, distribute, and sell this software and its
X * documentation for any purpose is hereby granted without fee, provided that
X * the above copyright notice appear in all copies and that both that
X * copyright notice and this permission notice appear in supporting
X * documentation, and that the name of M.I.T. not be used in advertising or
X * publicity pertaining to distribution of the software without specific,
X * written prior permission. M.I.T. makes no representations about the
X * suitability of this software for any purpose. It is provided "as is"
X * without express or implied warranty."
X *
X */
X
X#include "fig.h"
X#include "mode.h"
X#include "resources.h"
X
Xprint_to_printer(printer, center, mag)
X char printer[];
X int center;
X float mag;
X{
X char prcmd[200], translator[60], syspr[60];
X char tmpfile[32];
X
X sprintf(tmpfile, "%s%06d", "/tmp/xfig-print", getpid());
X if (write_file(tmpfile))
X return;
X
X sprintf(translator, "fig2dev -Lps %s -P -m %f %s",
X center ? "-c" : "",
X mag,
X print_landscape ? "-l xxx" : " ");
X
X if (emptyname(printer)) { /* send to default printer */
X#if defined(SYSV) || defined(SVR4)
X sprintf(syspr, "lp -oPS");
X#else
X sprintf(syspr, "lpr -J %s", cur_filename);
X#endif
X put_msg("Printing figure on default printer in %s mode ... ",
X print_landscape ? "LANDSCAPE" : "PORTRAIT");
X } else {
X#if defined(SYSV) || defined(SVR4)
X sprintf(syspr, "lp -d%s -oPS", printer);
X#else
X sprintf(syspr, "lpr -J %s -P%s", cur_filename, printer);
X#endif
X put_msg("Printing figure on printer %s in %s mode ... ",
X printer, print_landscape ? "LANDSCAPE" : "PORTRAIT");
X }
X
X app_flush(); /* make sure message gets displayed */
X
X /* make up the whole translate/print command */
X sprintf(prcmd, "%s %s | %s", translator, tmpfile, syspr);
X if (system(prcmd) == 127)
X put_msg("Error during PRINT (unable to find fig2dev?)");
X else {
X if (emptyname(printer))
X put_msg("Printing figure on printer %s in %s mode ... done",
X printer, print_landscape ? "LANDSCAPE" : "PORTRAIT");
X else
X put_msg("Printing figure on printer %s in %s mode ... done",
X printer, print_landscape ? "LANDSCAPE" : "PORTRAIT");
X }
X unlink(tmpfile);
X}
X
Xprint_to_file(file, lang, mag, center)
X char *file, *lang;
X float mag;
X{
X char prcmd[200];
X char tmpfile[32];
X
X if (!ok_to_write(file, "EXPORT"))
X return (1);
X
X sprintf(tmpfile, "%s%06d", "/tmp/xfig-export", getpid());
X if (write_file(tmpfile))
X return (1);
X
X put_msg("Exporting figure to file \"%s\" in %s mode ... ",
X file, print_landscape ? "LANDSCAPE" : "PORTRAIT");
X app_flush(); /* make sure message gets displayed */
X
X if (!strncmp(lang, "ps", 2))
X sprintf(prcmd, "fig2dev -Lps %s -P -m %f %s %s %s", center ? "-c" : "",
X mag, print_landscape ? "-l xxx" : " ", tmpfile, file);
X else if (!strncmp(lang, "eps", 3))
X sprintf(prcmd, "fig2dev -Lps -m %f %s %s %s",
X mag, print_landscape ? "-l xxx" : " ", tmpfile, file);
X else if (!strncmp(lang, "ibmgl", 5))
X sprintf(prcmd, "fig2dev -Libmgl -m %f %s %s %s",
X mag, print_landscape ? " " : "-P", tmpfile, file);
X else
X sprintf(prcmd, "fig2dev -L%s -m %f %s %s", lang,
X mag, tmpfile, file);
X if (system(prcmd) == 127)
X put_msg("Error during EXPORT (unable to find fig2dev?)");
X else
X put_msg("Exporting figure to file \"%s\" in %s mode ... done",
X file, print_landscape ? "LANDSCAPE" : "PORTRAIT");
X
X unlink(tmpfile);
X return (0);
X}
END_OF_FILE
if test 3648 -ne `wc -c <'u_print.c'`; then
echo shar: \"'u_print.c'\" unpacked with wrong size!
fi
# end of 'u_print.c'
fi
if test -f 'w_cursor.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'w_cursor.c'\"
else
echo shar: Extracting \"'w_cursor.c'\" \(4054 characters\)
sed "s/^X//" >'w_cursor.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X * Copyright (c) 1985 by Supoj Sutanthavibul
X *
X * "Permission to use, copy, modify, distribute, and sell this software and its
X * documentation for any purpose is hereby granted without fee, provided that
X * the above copyright notice appear in all copies and that both that
X * copyright notice and this permission notice appear in supporting
X * documentation, and that the name of M.I.T. not be used in advertising or
X * publicity pertaining to distribution of the software without specific,
X * written prior permission. M.I.T. makes no representations about the
X * suitability of this software for any purpose. It is provided "as is"
X * without express or implied warranty."
X *
X */
X
X#include "fig.h"
X#include "resources.h"
X#include "paintop.h"
X
XCursor null_cursor;
XCursor arrow_cursor;
XCursor bull_cursor;
XCursor buster_cursor;
XCursor char_cursor;
XCursor crosshair_cursor;
XCursor magnifier_cursor;
XCursor pencil_cursor;
XCursor pick15_cursor;
XCursor pick9_cursor;
XCursor vbar_cursor;
XCursor wait_cursor;
XCursor panel_cursor;
XCursor l_arrow_cursor;
XCursor r_arrow_cursor;
XCursor lr_arrow_cursor;
XCursor u_arrow_cursor;
XCursor d_arrow_cursor;
XCursor ud_arrow_cursor;
XCursor cur_cursor;
X
Xinit_cursor()
X{
X register Display *d = tool_d;
X cur_cursor = arrow_cursor; /* current cursor */
X
X arrow_cursor = XCreateFontCursor(d, XC_left_ptr);
X bull_cursor = XCreateFontCursor(d, XC_circle);
X buster_cursor = XCreateFontCursor(d, XC_pirate);
X char_cursor = XCreateFontCursor(d, XC_question_arrow);
X crosshair_cursor = XCreateFontCursor(d, XC_crosshair);
X null_cursor = XCreateFontCursor(d, XC_tcross);
X magnifier_cursor = XCreateFontCursor(d, XC_question_arrow);
X pencil_cursor = XCreateFontCursor(d, XC_pencil);
X pick15_cursor = XCreateFontCursor(d, XC_dotbox);
X pick9_cursor = XCreateFontCursor(d, XC_hand1);
X vbar_cursor = XCreateFontCursor(d, XC_xterm);
X wait_cursor = XCreateFontCursor(d, XC_watch);
X panel_cursor = XCreateFontCursor(d, XC_icon);
X lr_arrow_cursor = XCreateFontCursor(d, XC_sb_h_double_arrow);
X l_arrow_cursor = XCreateFontCursor(d, XC_sb_left_arrow);
X r_arrow_cursor = XCreateFontCursor(d, XC_sb_right_arrow);
X ud_arrow_cursor = XCreateFontCursor(d, XC_sb_v_double_arrow);
X u_arrow_cursor = XCreateFontCursor(d, XC_sb_up_arrow);
X d_arrow_cursor = XCreateFontCursor(d, XC_sb_down_arrow);
X}
X
Xrecolor_cursors()
X{
X register Display *d = tool_d;
X
X XRecolorCursor(d, arrow_cursor, &x_fg_color, &x_bg_color);
X XRecolorCursor(d, bull_cursor, &x_fg_color, &x_bg_color);
X XRecolorCursor(d, buster_cursor, &x_fg_color, &x_bg_color);
X XRecolorCursor(d, char_cursor, &x_fg_color, &x_bg_color);
X XRecolorCursor(d, crosshair_cursor, &x_fg_color, &x_bg_color);
X XRecolorCursor(d, null_cursor, &x_fg_color, &x_bg_color);
X XRecolorCursor(d, magnifier_cursor, &x_fg_color, &x_bg_color);
X XRecolorCursor(d, pencil_cursor, &x_fg_color, &x_bg_color);
X XRecolorCursor(d, pick15_cursor, &x_fg_color, &x_bg_color);
X XRecolorCursor(d, pick9_cursor, &x_fg_color, &x_bg_color);
X XRecolorCursor(d, vbar_cursor, &x_fg_color, &x_bg_color);
X XRecolorCursor(d, wait_cursor, &x_fg_color, &x_bg_color);
X XRecolorCursor(d, panel_cursor, &x_fg_color, &x_bg_color);
X XRecolorCursor(d, l_arrow_cursor, &x_fg_color, &x_bg_color);
X XRecolorCursor(d, r_arrow_cursor, &x_fg_color, &x_bg_color);
X XRecolorCursor(d, lr_arrow_cursor, &x_fg_color, &x_bg_color);
X XRecolorCursor(d, u_arrow_cursor, &x_fg_color, &x_bg_color);
X XRecolorCursor(d, d_arrow_cursor, &x_fg_color, &x_bg_color);
X XRecolorCursor(d, ud_arrow_cursor, &x_fg_color, &x_bg_color);
X}
X
Xreset_cursor()
X{
X XDefineCursor(tool_d, canvas_win, cur_cursor);
X}
X
Xset_temp_cursor(cursor)
X Cursor cursor;
X{
X XDefineCursor(tool_d, canvas_win, cursor);
X}
X
Xset_cursor(cursor)
X Cursor cursor;
X{
X cur_cursor = cursor;
X XDefineCursor(tool_d, canvas_win, cursor);
X}
X
END_OF_FILE
if test 4054 -ne `wc -c <'w_cursor.c'`; then
echo shar: \"'w_cursor.c'\" unpacked with wrong size!
fi
# end of 'w_cursor.c'
fi
if test -f 'w_grid.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'w_grid.c'\"
else
echo shar: Extracting \"'w_grid.c'\" \(4267 characters\)
sed "s/^X//" >'w_grid.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X * Copyright (c) 1985 by Supoj Sutanthavibul
X *
X * "Permission to use, copy, modify, distribute, and sell this software and its
X * documentation for any purpose is hereby granted without fee, provided that
X * the above copyright notice appear in all copies and that both that
X * copyright notice and this permission notice appear in supporting
X * documentation, and that the name of M.I.T. not be used in advertising or
X * publicity pertaining to distribution of the software without specific,
X * written prior permission. M.I.T. makes no representations about the
X * suitability of this software for any purpose. It is provided "as is"
X * without express or implied warranty."
X *
X */
X
X#include "fig.h"
X#include "resources.h"
X#include "mode.h"
X#include "paintop.h"
X#include "object.h"
X#include "w_setup.h"
X#include "w_util.h"
X#include "w_zoom.h"
X
X#define null_width 32
X#define null_height 32
X
X#define MMTOPIX 3
X#define IN16TOPIX 5
X
Xstatic char null_bits[null_width * null_height / 8] = {0};
X
Xstatic Pixmap null_pm, grid_pm = 0;
Xstatic unsigned long bg, fg;
X
Xinit_grid()
X{
X DeclareArgs(2);
X
X FirstArg(XtNbackground, &bg);
X NextArg(XtNforeground, &fg);
X GetValues(canvas_sw);
X
X null_pm = XCreatePixmapFromBitmapData(tool_d, canvas_win,
X null_bits, null_width, null_height,
X fg, bg, DefaultDepthOfScreen(tool_s));
X
X if (appres.INCHES) {
X posn_rnd[P_MAGNET] = 5; /* 1 x 1/8" */
X posn_hlf[P_MAGNET] = 3;
X posn_rnd[P_GRID1] = 20; /* 4 x 1/8" */
X posn_hlf[P_GRID1] = 10;
X posn_rnd[P_GRID2] = 40; /* 8 x 1/8" */
X posn_hlf[P_GRID2] = 20;
X grid_name[P_MAGNET] = "1/16 in";
X grid_name[P_GRID1] = "1/4 in";
X grid_name[P_GRID2] = "1/2 in";
X grid_fine[P_GRID1] = 1 * IN16TOPIX; /* 1 x 1/16" */
X grid_coarse[P_GRID1] = 4 * IN16TOPIX; /* 4 x 1/16" */
X grid_fine[P_GRID2] = 1 * IN16TOPIX; /* 1 x 1/16" */
X grid_coarse[P_GRID2] = 8 * IN16TOPIX; /* 8 x 1/16" */
X } else {
X posn_rnd[P_MAGNET] = 3; /* 1 mm */
X posn_hlf[P_MAGNET] = 2;
X posn_rnd[P_GRID1] = 15; /* 5 mm */
X posn_hlf[P_GRID1] = 7;
X posn_rnd[P_GRID2] = 30; /* 10 mm */
X posn_hlf[P_GRID2] = 15;
X grid_name[P_MAGNET] = "1 mm";
X grid_name[P_GRID1] = "5 mm";
X grid_name[P_GRID2] = "10 mm";
X grid_fine[P_GRID1] = 1 * MMTOPIX; /* 1 mm */
X grid_coarse[P_GRID1] = 5 * MMTOPIX; /* 5 mm */
X grid_fine[P_GRID2] = 2 * MMTOPIX; /* 2 mm */
X grid_coarse[P_GRID2] = 10 * MMTOPIX; /* 10 mm */
X }
X}
X
X/* grid in X11 is simply the background of the canvas */
X
Xsetup_grid(grid)
X int grid;
X{
X int coarse, fine, dim, x, x0c, x0f, y, y0c, y0f;
X static prev_grid = -1;
X
X DeclareArgs(1);
X
X if (grid == GRID_0) {
X FirstArg(XtNbackgroundPixmap, null_pm);
X } else {
X if (grid == GRID_1) {
X coarse = (int) (grid_coarse[P_GRID1] * zoomscale);
X fine = (int) (grid_fine[P_GRID1] * zoomscale);
X } else {
X coarse = (int) (grid_coarse[P_GRID2] * zoomscale);
X fine = (int) (grid_fine[P_GRID2] * zoomscale);
X }
X
X if (!coarse && !fine) { /* grid values both zero */
X FirstArg(XtNbackgroundPixmap, null_pm);
X }
X if (coarse == 0) { /* coarse must be <> 0 */
X coarse = fine;
X fine = 0;
X }
X dim = (coarse > 64) ? coarse : (64 / coarse + 1) * coarse;
X
X if (grid_pm)
X XFreePixmap(tool_d, grid_pm);
X grid_pm = XCreatePixmap(tool_d, canvas_win, dim, dim,
X DefaultDepthOfScreen(tool_s));
X XSetForeground(tool_d, gc, bg);
X XFillRectangle(tool_d, grid_pm, gc, 0, 0, dim, dim);
X XSetForeground(tool_d, gc, fg);
X x0c = -(zoomscale * zoomxoff) % coarse - zoomscale;
X y0c = -(zoomscale * zoomyoff) % coarse - zoomscale;
X if (fine) {
X x0f = -(zoomscale * zoomxoff) % fine - zoomscale;
X y0f = -(zoomscale * zoomyoff) % fine - zoomscale;
X for (x = x0c; x < dim; x += coarse)
X for (y = y0f; y < dim; y += fine)
X XDrawPoint(tool_d, grid_pm, gc, x, y);
X for (y = y0c; y < dim; y += coarse)
X for (x = x0f; x < dim; x += fine)
X XDrawPoint(tool_d, grid_pm, gc, x, y);
X } else {
X for (x = x0c; x < dim; x += coarse)
X for (y = y0c; y < dim; y += coarse)
X XDrawPoint(tool_d, grid_pm, gc, x, y);
X }
X
X FirstArg(XtNbackgroundPixmap, grid_pm);
X }
X SetValues(canvas_sw);
X if (prev_grid == GRID_0 && grid == GRID_0)
X redisplay_canvas();
X prev_grid = grid;
X}
X
Xredisplay_grid()
X{
X}
END_OF_FILE
if test 4267 -ne `wc -c <'w_grid.c'`; then
echo shar: \"'w_grid.c'\" unpacked with wrong size!
fi
# end of 'w_grid.c'
fi
if test -f 'w_zoom.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'w_zoom.c'\"
else
echo shar: Extracting \"'w_zoom.c'\" \(4003 characters\)
sed "s/^X//" >'w_zoom.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X * Copyright (c) 1991 by Henning Spruth (hns@regent.e-technik.tu-muenchen.de)
X *
X * "Permission to use, copy, modify, distribute, and sell this software and its
X * documentation for any purpose is hereby granted without fee, provided that
X * the above copyright notice appear in all copies and that both that
X * copyright notice and this permission notice appear in supporting
X * documentation, and that the name of M.I.T. not be used in advertising or
X * publicity pertaining to distribution of the software without specific,
X * written prior permission. M.I.T. makes no representations about the
X * suitability of this software for any purpose. It is provided "as is"
X * without express or implied warranty."
X *
X */
X
X#include <X11/keysym.h>
X#include "fig.h"
X#include "mode.h"
X#include "object.h"
X#include "paintop.h"
X#include "resources.h"
X#include "u_create.h"
X#include "u_elastic.h"
X#include "w_canvas.h"
X#include "w_setup.h"
X#include "w_zoom.h"
X#include "w_indpanel.h"
X
Xextern elastic_box();
Xextern show_zoom();
Xextern pan_origin();
X
X/* extern int gc_thickness[NUMOPS]; */
X
Xstatic do_zoom();
Xstatic zoom_up();
Xstatic init_zoombox_drawing();
X
Xstatic int (*save_kbd_proc) ();
Xstatic int (*save_locmove_proc) ();
Xstatic int (*save_leftbut_proc) ();
Xstatic int (*save_middlebut_proc) ();
Xstatic int (*save_middlebut_save) ();
Xstatic int (*save_rightbut_proc) ();
Xstatic Cursor save_cur_cursor;
Xstatic int save_action_on;
X
Xint zoomscale = 1;
Xint zoomxoff = 0;
Xint zoomyoff = 0;
X
Xstatic Boolean zoom_in_progress = False;
X
X/* used for private box drawing functions */
Xstatic int my_fix_x, my_fix_y;
Xstatic int my_cur_x, my_cur_y;
X
Xzoom_selected(x, y, button)
X int x, y;
X unsigned int button;
X{
X if (!zoom_in_progress) {
X switch (button) {
X case Button1:
X init_zoombox_drawing(x, y);
X break;
X case Button2:
X pan_origin();
X break;
X case Button3:
X zoomscale = 1;
X show_zoom(&ind_switches[ZOOM_SWITCH_INDEX]);
X break;
X }
X } else if (button == Button1)
X do_zoom(x, y);
X}
X
X
Xstatic
Xmy_box(x, y)
X int x, y;
X{
X elastic_box(my_fix_x, my_fix_y, my_cur_x, my_cur_y);
X my_cur_x = x;
X my_cur_y = y;
X elastic_box(my_fix_x, my_fix_y, my_cur_x, my_cur_y);
X}
X
X
X
Xstatic
Xinit_zoombox_drawing(x, y)
X int x, y;
X{
X save_kbd_proc = canvas_kbd_proc;
X save_locmove_proc = canvas_locmove_proc;
X save_leftbut_proc = canvas_leftbut_proc;
X save_middlebut_proc = canvas_middlebut_proc;
X save_rightbut_proc = canvas_rightbut_proc;
X save_kbd_proc = canvas_kbd_proc;
X save_cur_cursor = cur_cursor;
X
X my_cur_x = my_fix_x = x;
X my_cur_y = my_fix_y = y;
X canvas_locmove_proc = moving_box;
X
X canvas_locmove_proc = my_box;
X canvas_leftbut_proc = do_zoom;
X canvas_middlebut_proc = canvas_rightbut_proc = null_proc;
X elastic_box(my_fix_x, my_fix_y, my_cur_x, my_cur_y);
X set_temp_cursor(null_cursor);
X set_action_on();
X zoom_in_progress = True;
X}
X
Xstatic
Xdo_zoom(x, y)
X int x, y;
X{
X int dimx, dimy;
X int t; /* loop counter */
X float scalex, scaley;
X
X elastic_box(my_fix_x, my_fix_y, my_cur_x, my_cur_y);
X zoomxoff = my_fix_x < x ? my_fix_x : x;
X zoomyoff = my_fix_y < y ? my_fix_y : y;
X dimx = abs(x - my_fix_x);
X dimy = abs(y - my_fix_y);
X if (zoomxoff < 0)
X zoomxoff = 0;
X if (zoomyoff < 0)
X zoomyoff = 0;
X if (dimx && dimy) {
X scalex = CANVAS_WD / (float) dimx;
X scaley = CANVAS_HT / (float) dimy;
X zoomscale = (int) scalex > scaley ? scaley : scalex;
X
X show_zoom(&ind_switches[ZOOM_SWITCH_INDEX]);
X }
X /* restore state */
X canvas_kbd_proc = save_kbd_proc;
X canvas_locmove_proc = save_locmove_proc;
X canvas_leftbut_proc = save_leftbut_proc;
X canvas_middlebut_proc = save_middlebut_proc;
X canvas_rightbut_proc = save_rightbut_proc;
X canvas_kbd_proc = save_kbd_proc;
X set_cursor(save_cur_cursor);
X action_on = save_action_on;
X zoom_in_progress = False;
X}
END_OF_FILE
if test 4003 -ne `wc -c <'w_zoom.c'`; then
echo shar: \"'w_zoom.c'\" unpacked with wrong size!
fi
# end of 'w_zoom.c'
fi
echo shar: End of archive 22 \(of 25\).
cp /dev/null ark22isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 25 archives.
rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
echo You still need to unpack the following archives:
echo " " ${MISSING}
fi
## End of shell archive.
exit 0
--
Molecular Simulations, Inc. mail: dcmartin@msi.com
796 N. Pastoria Avenue uucp: uunet!dcmartin
Sunnyvale, California 94086 at&t: 408/522-9236