v08i014: xfig -- X Drawing Tool, Part05/21

Brian V. Smith envbvs at epb2.lbl.gov
Tue Jul 3 07:25:58 AEST 1990


Submitted-by: envbvs at epb2.lbl.gov (Brian V. Smith)
Posting-number: Volume 8, Issue 14
Archive-name: xfig2.8/part05

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 5 (of 21)."
# Contents:  @figs/house.fig @figs/houseC.fig @figs/houseD.fig
#   @figs/roundboxes2.fig arc.c bitmap.c canvas.c cursor.c
#   printfonts.c
# Wrapped by envbvs at epb2.lbl.gov on Thu Jun 28 08:51:17 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f '@figs/house.fig' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'@figs/house.fig'\"
else
echo shar: Extracting \"'@figs/house.fig'\" \(5486 characters\)
sed "s/^X//" >'@figs/house.fig' <<'END_OF_FILE'
X#FIG 1.4X
X80 2
X5 1 0 1 0 0 0 0 0.000 1 0 0 105.500 412.500 54 409 69 449 109 464
X5 1 0 1 0 0 0 0 0.000 0 0 0 793.500 423.500 734 424 749 384 794 364
X5 1 0 1 0 0 0 0 0.000 0 0 0 389.214 309.214 403 308 399 319 388 323
X5 1 0 1 0 0 0 0 0.000 1 0 0 469.000 124.000 434 119 444 149 474 159
X5 1 0 1 0 0 0 0 0.000 0 0 0 599.000 124.000 634 119 624 149 594 159
X5 1 0 1 0 0 0 0 0.000 0 0 0 417.500 317.500 469 314 454 354 414 369
X5 1 0 1 0 0 0 0 0.000 1 0 0 163.000 365.000 214 369 199 329 159 314
X1 3 0 1 0 0 0 0 0.000 1 0.000 308 302 7 7 308 302 313 307
X1 3 0 1 0 0 0 0 0.000 1 0.000 334 302 5 5 334 302 339 302
X1 3 0 1 0 0 0 0 0.000 1 0.000 334 319 7 7 334 319 339 324
X1 3 0 1 0 0 0 0 0.000 1 0.000 308 319 5 5 308 319 313 319
X1 2 0 1 0 0 0 0 0.000 0 0.000 561 121 11 15 552 138 572 106
X1 3 0 1 0 0 0 0 0.000 1 0.000 274 299 10 10 274 299 284 299
X2 2 0 1 0 0 0 0 0.000 0 0
X	 414 374 434 374 434 499 414 499 414 374 9999 9999
X2 4 0 1 0 0 3 0 0.000 0 0
X	 294 289 294 334 349 334 349 289 294 289 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 19 229 29 229 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 19 369 29 369 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 19 289 29 289 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 19 309 29 309 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 24 229 24 289 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 24 309 24 369 9999 9999
X2 1 0 2 0 0 0 0 0.000 0 0
X	 109 409 109 464 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 552 112 552 103 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 570 112 570 103 9999 9999
X2 4 0 1 0 0 3 0 0.000 0 0
X	 548 103 548 91 574 91 574 103 548 103 9999 9999
X2 3 0 1 0 0 0 0 0.000 0 0
X	 794 424 794 499 414 499 414 369 404 369 404 499 254 499 254 449 244 449 244 499 159 499 159 369 149 369 149 399 109 399 109 409 149 409 149 509 804 509 804 424 794 424 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 759 499 759 509 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 689 499 689 509 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 689 504 759 504 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 654 509 654 539 554 539 554 509 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 524 499 524 509 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 454 499 454 509 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 454 504 524 504 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 314 499 314 509 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 374 499 374 509 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 314 504 374 504 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 254 459 369 459 369 369 404 369 9999 9999
X2 4 0 1 0 0 3 0 0.000 0 0
X	 309 464 309 494 364 494 364 464 309 464 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 254 469 284 469 284 499 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 379 369 379 499 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 799 129 799 209 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 794 209 804 209 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 794 129 804 129 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 614 84 669 84 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 669 79 669 89 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 614 79 614 89 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 529 84 564 84 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 564 79 564 89 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 529 79 529 89 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 399 84 454 84 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 399 89 399 79 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 454 79 454 89 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 264 104 264 164 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 259 104 269 104 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 259 164 269 164 9999 9999
X2 1 0 2 0 0 0 0 0.000 0 0
X	 389 309 389 324 9999 9999
X2 1 0 2 0 0 0 0 0.000 0 0
X	 434 119 474 119 9999 9999
X2 3 0 1 0 0 0 0 0.000 0 0
X	 474 159 484 159 484 209 584 209 584 159 594 159 594 224 584 224 584 219 539 219 539 274 584 274 584 269 594 269 594 274 599 274 599 284 469 284 469 274 474 274 474 269 484 269 484 274 529 274 529 219 484 219 484 224 474 224 474 159 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 484 159 584 159 9999 9999
X2 3 0 1 0 0 0 0 0.000 0 0
X	 794 89 594 89 594 119 584 119 584 89 484 89 484 119 474 119 474 89 269 89 269 274 414 274 414 314 404 314 404 284 359 284 359 304 389 304 389 309 354 309 354 284 259 284 259 309 249 309 249 269 159 269 159 314 149 314 149 259 259 259 259 179 29 179 29 399 54 399 54 409 19 409 19 169 259 169 259 79 804 79 804 364 794 364 794 284 654 284 654 274 794 274 794 89 9999 9999
X2 4 0 1 0 0 6 0 0.000 0 0
X	 489 94 489 114 519 114 519 94 489 94 9999 9999
X2 4 0 1 0 0 9 0 0.000 0 0
X	 484 89 484 119 524 119 524 89 484 89 9999 9999
X2 1 0 2 0 0 0 0 0.000 0 0
X	 469 274 419 254 9999 9999
X2 1 0 2 0 0 0 0 0.000 0 0
X	 454 224 474 269 9999 9999
X2 1 0 2 0 0 0 0 0.000 0 0
X	 613 223 594 269 9999 9999
X2 1 0 2 0 0 0 0 0.000 0 0
X	 599 274 649 249 9999 9999
X2 4 0 1 0 0 9 0 0.000 0 0
X	 489 164 489 204 579 204 579 164 489 164 9999 9999
X2 1 0 2 0 0 0 0 0.000 0 0
X	 594 119 634 119 9999 9999
X2 1 0 2 0 0 0 0 0.000 0 0
X	 734 424 794 424 9999 9999
X2 1 0 2 0 0 0 0 0.000 0 0
X	 414 314 469 314 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 214 179 214 259 9999 9999
X2 1 0 2 0 0 0 0 0.000 0 0
X	 214 369 159 369 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 19 409 19 489 149 489 9999 9999
X4 0 0 12 0 0 0 0.000 1 9 6 419 434 F
X4 0 0 12 0 0 0 0.000 1 9 6 419 419 B
X4 0 0 12 0 0 0 0.000 1 9 24 504 139 Bath
X4 0 0 12 0 0 0 0.000 1 11 66 539 384 Living Room
X4 0 0 12 0 0 0 0.000 1 9 42 679 184 Bedroom
X4 0 0 12 0 0 0 0.000 1 9 42 334 184 Bedroom
X4 0 0 12 0 0 0 0.000 1 11 42 54 294 Laundry
X4 0 0 12 0 0 0 0.000 1 9 42 239 399 Kitchen
X4 0 0 12 0 0 0 0.000 1 10 18 374 299 CL.
X4 0 0 12 0 0 0 0.000 1 10 18 229 229 CL.
X4 0 0 12 0 0 0 0.000 1 10 18 554 254 CL.
X4 0 0 12 0 0 0 0.000 1 10 18 494 254 CL.
END_OF_FILE
echo shar: 12 control characters may be missing from \"'@figs/house.fig'\"
if test 5486 -ne `wc -c <'@figs/house.fig'`; then
    echo shar: \"'@figs/house.fig'\" unpacked with wrong size!
fi
# end of '@figs/house.fig'
fi
if test -f '@figs/houseC.fig' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'@figs/houseC.fig'\"
else
echo shar: Extracting \"'@figs/houseC.fig'\" \(5077 characters\)
sed "s/^X//" >'@figs/houseC.fig' <<'END_OF_FILE'
X#FIG 1.4X
X80 2
X5 1 0 1 0 0 0 0 0.000 1 0 0 394.658 229.658 394 274 427 260 439 229
X5 1 0 1 0 0 0 0 0.000 1 0 0 257.000 205.000 244 204 248 215 259 219
X1 2 0 1 0 0 0 0 0.000 0 0.000 356 121 11 15 347 138 367 106
X1 1 0 1 0 0 0 0 0.000 1 0.000 463 129 11 16 463 129 473 144
X1 1 0 1 0 0 0 0 0.000 1 0.000 465 172 11 16 465 172 475 187
X2 1 0 1 0 0 0 0 0.000 0 0
X	 89 184 169 184 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 89 169 169 169 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 179 169 259 169 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 179 184 259 184 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 179 199 259 199 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 89 289 169 289 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 89 274 169 274 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 89 259 169 259 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 89 244 169 244 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 89 229 169 229 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 89 214 169 214 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 89 199 169 199 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 347 114 347 103 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 365 112 365 103 9999 9999
X2 4 0 1 0 0 3 0 0.000 0 0
X	 343 103 343 91 369 91 369 103 343 103 9999 9999
X2 2 0 1 0 0 0 0 0.000 0 0
X	 184 303 184 329 209 329 209 303 184 303 9999 9999
X2 4 0 1 0 0 4 0 0.000 0 0
X	 204 459 329 459 329 349 204 349 204 459 9999 9999
X2 4 0 1 0 0 3 0 0.000 0 0
X	 204 344 189 344 189 464 204 464 204 344 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 659 499 659 509 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 599 499 599 509 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 599 504 659 504 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 239 499 239 509 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 299 499 299 509 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 239 504 299 504 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 364 79 364 89 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 409 79 409 89 9999 9999
X2 3 0 1 0 0 0 0 0.000 0 0
X	 464 369 454 369 454 349 519 349 519 499 704 499 704 89 609 89 609 229 569 229 569 219 599 219 599 89 489 89 489 219 519 219 519 229 439 229 439 219 479 219 479 89 469 89 469 84 449 84 449 89 269 89 269 189 329 189 329 219 394 219 394 229 319 229 259 229 259 219 319 219 319 199 269 199 269 204 259 204 259 89 169 89 169 79 714 79 714 509 169 509 169 169 179 169 179 499 454 499 454 489 464 489 464 499 509 499 509 359 464 359 464 369 9999 9999
X2 1 0 2 0 0 0 0 0.000 0 0
X	 460 424 460 486 9999 9999
X2 1 0 2 0 0 0 0 0.000 0 0
X	 457 372 457 429 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 169 444 179 444 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 179 374 169 374 9999 9999
X2 1 0 1 0 0 0 0 0.000 1 0
X	0 0 1.000 4.000 8.000
X	 219 194 219 139 204 124 144 124 129 139 129 299 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 119 84 149 84 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 149 79 149 89 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 119 79 119 89 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 84 99 84 129 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 79 129 89 129 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 79 99 89 99 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 364 84 409 84 9999 9999
X2 3 0 1 0 0 0 0 0.000 0 0
X	 169 79 79 79 79 319 169 319 169 309 89 309 89 89 169 89 169 79 9999 9999
X2 4 0 1 0 0 7 0 0.000 0 0
X	 274 94 274 184 319 184 319 94 274 94 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 324 89 324 189 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 174 374 174 444 9999 9999
X2 2 0 1 0 0 0 0 0.000 0 0
X	 449 84 449 94 469 94 469 84 449 84 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 444 89 444 219 9999 9999
X2 1 0 2 0 0 0 0 0.000 0 0
X	 394 274 394 229 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 519 219 519 119 569 119 569 219 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 274 199 274 219 9999 9999
X2 1 0 2 0 0 0 0 0.000 0 0
X	 244 204 259 204 9999 9999
X2 2 0 1 0 0 0 0 0.000 0 0
X	 699 99 652 99 652 129 699 129 699 99 9999 9999
X2 4 0 1 0 0 3 0 0.000 0 0
X	 267 231 267 264 334 264 334 231 267 231 9999 9999
X2 4 0 1 0 0 3 0 0.000 0 0
X	 335 231 335 264 389 264 389 231 335 231 9999 9999
X2 2 0 1 0 0 0 0 0.000 0 0
X	 379 494 427 494 427 470 379 470 379 494 9999 9999
X2 2 0 1 0 0 0 0 0.000 0 0
X	 454 229 514 229 514 259 454 259 454 229 9999 9999
X2 4 0 1 0 0 3 0 0.000 0 0
X	 679 439 679 489 579 489 579 439 679 439 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 709 379 709 439 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 704 379 714 379 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 704 439 714 439 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 709 149 709 209 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 704 209 714 209 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 704 149 714 149 9999 9999
X4 0 0 12 0 0 0 0.000 1 9 24 200 216 DOWN
X4 0 0 12 0 0 0 0.000 1 9 6 191 321 T
X4 0 0 12 0 0 0 0.000 1 9 18 249 409 BED
X4 0 0 12 0 0 0 0.000 1 9 30 604 304 STUDY
X4 0 0 12 0 0 0 0.000 1 9 84 268 305 MASTER BEDROOM
X4 0 0 12 0 0 0 0.000 1 9 24 364 149 BATH
X4 0 0 12 0 0 0 0.000 1 11 60 59 399 houseC.fig
X4 0 0 12 0 0 0 0.000 1 9 12 289 249 DR
X4 0 0 12 0 0 0 0.000 1 9 12 359 249 DR
X4 0 0 12 0 0 0 0.000 1 9 18 664 119 SEW
X4 0 0 12 0 0 0 0.000 1 10 18 534 154 CL.
X4 0 0 12 0 0 0 0.000 1 10 18 474 429 CL.
X4 0 0 12 0 0 0 0.000 1 9 12 474 249 DR
X4 0 0 12 0 0 0 0.000 1 9 12 394 484 DR
X4 0 0 12 0 0 0 0.000 1 9 24 614 469 DESK
X4 0 0 12 0 0 0 0.000 1 9 12 289 214 CL
END_OF_FILE
echo shar: 16 control characters may be missing from \"'@figs/houseC.fig'\"
if test 5077 -ne `wc -c <'@figs/houseC.fig'`; then
    echo shar: \"'@figs/houseC.fig'\" unpacked with wrong size!
fi
# end of '@figs/houseC.fig'
fi
if test -f '@figs/houseD.fig' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'@figs/houseD.fig'\"
else
echo shar: Extracting \"'@figs/houseD.fig'\" \(5875 characters\)
sed "s/^X//" >'@figs/houseD.fig' <<'END_OF_FILE'
X#FIG 1.4
X80 2
X5 1 0 1 0 0 0 0 0.000 0 0 0 326.700 201.700 344 204 340 213 329 219
X5 1 0 1 0 0 0 0 0.000 1 0 0 399.658 229.658 399 274 432 260 444 229
X1 2 0 1 0 0 0 0 0.000 0 0.000 356 121 11 15 347 138 367 106
X1 1 0 1 0 0 0 0 0.000 1 0.000 468 130 11 16 468 130 478 145
X1 1 0 1 0 0 0 0 0.000 1 0.000 469 175 11 16 469 175 479 190
X2 1 0 2 0 0 0 0 0.000 0 0
X	 329 204 344 204 9999 9999
X2 3 0 1 0 0 0 0 0.000 0 0
X	 269 219 399 219 399 229 269 229 269 219 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 714 304 794 304 9999 9999
X2 1 0 1 0 0 0 0 0.000 1 0
X	0 0 1.000 4.000 8.000
X	 684 129 739 129 759 144 759 294 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 694 89 694 169 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 714 289 794 289 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 714 274 794 274 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 714 259 794 259 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 714 244 794 244 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 714 229 794 229 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 714 214 794 214 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 714 199 794 199 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 714 184 794 184 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 714 169 794 169 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 709 89 709 169 9999 9999
X2 3 0 1 0 0 0 0 0.000 0 0
X	 714 169 689 169 689 179 704 179 704 324 794 324 794 314 714 314 714 169 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 1
X	0 0 1.000 4.000 8.000
X	 819 506 819 314 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 819 81 819 284 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 829 79 809 79 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 829 509 809 509 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 794 439 804 439 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 794 379 804 379 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 799 379 799 439 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 804 54 804 74 9999 9999
X2 4 0 1 0 0 3 0 0.000 0 0
X	 714 444 714 494 614 494 614 444 714 444 9999 9999
X2 2 0 1 0 0 0 0 0.000 0 0
X	 469 494 517 494 517 470 469 470 469 494 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 264 374 264 444 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 259 54 259 74 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 1
X	0 0 1.000 4.000 8.000
X	 261 64 524 64 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 1
X	0 0 1.000 4.000 8.000
X	 801 64 569 64 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 269 374 259 374 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 259 444 269 444 9999 9999
X2 1 0 2 0 0 0 0 0.000 0 0
X	 547 372 547 429 9999 9999
X2 1 0 2 0 0 0 0 0.000 0 0
X	 550 424 550 486 9999 9999
X2 3 0 1 0 0 0 0 0.000 0 0
X	 554 369 544 369 544 349 609 349 609 499 794 499 794 89 474 89 474 94 454 94 454 89 269 89 269 374 259 374 259 79 804 79 804 509 259 509 259 374 269 374 269 499 544 499 544 489 554 489 554 499 599 499 599 359 554 359 554 369 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 329 504 389 504 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 389 499 389 509 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 329 499 329 509 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 634 504 694 504 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 634 499 634 509 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 694 499 694 509 9999 9999
X2 4 0 1 0 0 3 0 0.000 0 0
X	 294 344 279 344 279 464 294 464 294 344 9999 9999
X2 4 0 1 0 0 4 0 0.000 0 0
X	 294 459 419 459 419 349 294 349 294 459 9999 9999
X2 2 0 1 0 0 0 0 0.000 0 0
X	 274 313 274 339 299 339 299 313 274 313 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 734 89 734 79 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 774 89 774 79 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 734 84 774 84 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 799 109 799 149 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 794 149 804 149 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 794 109 804 109 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 347 114 347 103 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 365 112 365 103 9999 9999
X2 4 0 1 0 0 3 0 0.000 0 0
X	 343 103 343 91 369 91 369 103 343 103 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 364 79 364 89 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 409 79 409 89 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 364 84 409 84 9999 9999
X2 4 0 1 0 0 7 0 0.000 0 0
X	 274 94 274 184 319 184 319 94 274 94 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 324 89 324 189 9999 9999
X2 1 0 2 0 0 0 0 0.000 0 0
X	 399 274 399 229 9999 9999
X2 4 0 1 0 0 3 0 0.000 0 0
X	 272 231 272 264 339 264 339 231 272 231 9999 9999
X2 4 0 1 0 0 3 0 0.000 0 0
X	 341 231 341 264 395 264 395 231 341 231 9999 9999
X2 3 0 1 0 0 0 0 0.000 0 0
X	 269 189 329 189 329 204 319 204 319 199 269 199 269 189 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 309 199 309 219 9999 9999
X2 2 0 1 0 0 0 0 0.000 0 0
X	 454 84 454 94 474 94 474 84 454 84 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 449 89 449 219 9999 9999
X2 3 0 1 0 0 0 0 0.000 0 0
X	 484 89 494 89 494 229 444 229 444 219 484 219 484 89 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 524 219 524 119 574 119 574 219 9999 9999
X2 3 0 1 0 0 0 0 0.000 0 0
X	 614 229 574 229 574 219 604 219 604 89 614 89 614 229 9999 9999
X2 3 0 1 0 0 0 0 0.000 0 0
X	 494 219 524 219 524 229 494 229 494 219 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 524 219 524 119 574 119 574 219 9999 9999
X2 2 0 1 0 0 0 0 0.000 0 0
X	 453 231 513 231 513 261 453 261 453 231 9999 9999
X2 2 1 1 0 0 0 0 4.000 0 0
X	 759 387 759 341 789 341 789 387 759 387 9999 9999
X2 2 0 1 0 0 0 0 0.000 0 0
X	 789 387 789 434 759 434 759 387 789 387 9999 9999
X4 0 0 12 0 0 0 0.000 1 9 24 654 124 DOWN
X4 0 0 12 0 0 0 0.000 1 9 36 814 304 21' 6"
X4 0 0 12 0 0 0 0.000 1 9 24 649 469 DESK
X4 0 0 12 0 0 0 0.000 1 9 12 484 484 DR
X4 0 0 12 0 0 0 0.000 1 10 18 564 429 CL.
X4 0 0 12 0 0 0 0.000 1 11 60 149 399 houseD.fig
X4 0 0 12 0 0 0 0.000 1 9 84 358 305 MASTER BEDROOM
X4 0 0 12 0 0 0 0.000 1 9 30 659 379 STUDY
X4 0 0 12 0 0 0 0.000 1 9 36 529 69 27' 2"
X4 0 0 12 0 0 0 0.000 1 9 18 339 409 BED
X4 0 0 12 0 0 0 0.000 1 9 6 281 331 T
X4 0 0 12 0 0 0 0.000 1 9 24 364 149 BATH
X4 0 0 12 0 0 0 0.000 1 9 12 289 249 DR
X4 0 0 12 0 0 0 0.000 1 9 12 359 249 DR
X4 0 0 12 0 0 0 0.000 1 9 12 289 214 CL
X4 0 0 12 0 0 0 0.000 1 10 18 539 154 CL.
X4 0 0 12 0 0 0 0.000 1 9 12 476 250 DR
X4 0 0 12 0 0 0 0.000 1 9 18 764 409 SEW
END_OF_FILE
echo shar: 18 control characters may be missing from \"'@figs/houseD.fig'\"
if test 5875 -ne `wc -c <'@figs/houseD.fig'`; then
    echo shar: \"'@figs/houseD.fig'\" unpacked with wrong size!
fi
# end of '@figs/houseD.fig'
fi
if test -f '@figs/roundboxes2.fig' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'@figs/roundboxes2.fig'\"
else
echo shar: Extracting \"'@figs/roundboxes2.fig'\" \(5738 characters\)
sed "s/^X//" >'@figs/roundboxes2.fig' <<'END_OF_FILE'
X#FIG 1.4
X80 2
X2 4 0 1 0 0 21 0 0.000 0 0
X	 469 64 469 304 644 304 644 64 469 64 9999 9999
X2 4 0 1 0 0 21 0 0.000 0 0
X	 709 484 709 309 469 309 469 484 709 484 9999 9999
X2 4 0 1 0 0 21 0 0.000 0 0
X	 289 309 289 549 464 549 464 309 289 309 9999 9999
X2 4 0 1 0 0 21 0 0.000 0 0
X	 464 309 464 134 224 134 224 309 464 309 9999 9999
X2 4 0 1 0 0 20 0 0.000 0 0
X	 229 139 229 304 459 304 459 139 229 139 9999 9999
X2 4 0 1 0 0 20 0 0.000 0 0
X	 294 314 294 544 459 544 459 314 294 314 9999 9999
X2 4 0 1 0 0 8 0 0.000 0 0
X	 354 484 399 484 399 374 354 374 354 484 9999 9999
X2 4 0 1 0 0 8 0 0.000 0 0
X	 289 199 289 244 399 244 399 199 289 199 9999 9999
X2 4 0 1 0 0 9 0 0.000 0 0
X	 404 249 404 194 284 194 284 249 404 249 9999 9999
X2 4 0 1 0 0 10 0 0.000 0 0
X	 279 189 279 254 409 254 409 189 279 189 9999 9999
X2 4 0 1 0 0 11 0 0.000 0 0
X	 274 184 274 259 414 259 414 184 274 184 9999 9999
X2 4 0 1 0 0 12 0 0.000 0 0
X	 419 264 419 179 269 179 269 264 419 264 9999 9999
X2 4 0 1 0 0 13 0 0.000 0 0
X	 424 269 424 174 264 174 264 269 424 269 9999 9999
X2 4 0 1 0 0 14 0 0.000 0 0
X	 429 274 429 169 259 169 259 274 429 274 9999 9999
X2 4 0 1 0 0 15 0 0.000 0 0
X	 434 279 434 164 254 164 254 279 434 279 9999 9999
X2 4 0 1 0 0 16 0 0.000 0 0
X	 439 284 439 159 249 159 249 284 439 284 9999 9999
X2 4 0 1 0 0 17 0 0.000 0 0
X	 444 289 444 154 244 154 244 289 444 289 9999 9999
X2 4 0 1 0 0 18 0 0.000 0 0
X	 239 149 239 294 449 294 449 149 239 149 9999 9999
X2 4 0 1 0 0 19 0 0.000 0 0
X	 454 299 454 144 234 144 234 299 454 299 9999 9999
X2 4 0 1 0 0 19 0 0.000 0 0
X	 299 319 299 539 454 539 454 319 299 319 9999 9999
X2 4 0 1 0 0 18 0 0.000 0 0
X	 304 534 449 534 449 324 304 324 304 534 9999 9999
X2 4 0 1 0 0 17 0 0.000 0 0
X	 444 329 309 329 309 529 444 529 444 329 9999 9999
X2 4 0 1 0 0 16 0 0.000 0 0
X	 439 334 314 334 314 524 439 524 439 334 9999 9999
X2 4 0 1 0 0 15 0 0.000 0 0
X	 434 339 319 339 319 519 434 519 434 339 9999 9999
X2 4 0 1 0 0 14 0 0.000 0 0
X	 429 344 324 344 324 514 429 514 429 344 9999 9999
X2 4 0 1 0 0 13 0 0.000 0 0
X	 424 349 329 349 329 509 424 509 424 349 9999 9999
X2 4 0 1 0 0 12 0 0.000 0 0
X	 419 354 334 354 334 504 419 504 419 354 9999 9999
X2 4 0 1 0 0 11 0 0.000 0 0
X	 339 499 414 499 414 359 339 359 339 499 9999 9999
X2 4 0 1 0 0 10 0 0.000 0 0
X	 344 494 409 494 409 364 344 364 344 494 9999 9999
X2 4 0 1 0 0 9 0 0.000 0 0
X	 404 369 349 369 349 489 404 489 404 369 9999 9999
X2 4 0 1 0 0 7 0 0.000 0 0
X	 294 204 294 239 394 239 394 204 294 204 9999 9999
X2 4 0 1 0 0 6 0 0.000 0 0
X	 299 209 299 234 389 234 389 209 299 209 9999 9999
X2 4 0 1 0 0 5 0 0.000 0 0
X	 384 229 384 214 304 214 304 229 384 229 9999 9999
X2 4 0 1 0 0 3 0 0.000 0 0
X	 379 224 379 219 309 219 309 224 379 224 9999 9999
X2 4 0 1 0 0 7 0 0.000 0 0
X	 394 379 359 379 359 479 394 479 394 379 9999 9999
X2 4 0 1 0 0 6 0 0.000 0 0
X	 389 384 364 384 364 474 389 474 389 384 9999 9999
X2 4 0 1 0 0 5 0 0.000 0 0
X	 369 469 384 469 384 389 369 389 369 469 9999 9999
X2 4 0 1 0 0 3 0 0.000 0 0
X	 374 464 379 464 379 394 374 394 374 464 9999 9999
X2 4 0 1 0 0 7 0 0.000 0 0
X	 539 379 539 414 639 414 639 379 539 379 9999 9999
X2 4 0 1 0 0 6 0 0.000 0 0
X	 544 384 544 409 634 409 634 384 544 384 9999 9999
X2 4 0 1 0 0 5 0 0.000 0 0
X	 629 404 629 389 549 389 549 404 629 404 9999 9999
X2 4 0 1 0 0 3 0 0.000 0 0
X	 624 399 624 394 554 394 554 399 624 399 9999 9999
X2 4 0 1 0 0 19 0 0.000 0 0
X	 479 319 479 474 699 474 699 319 479 319 9999 9999
X2 4 0 1 0 0 18 0 0.000 0 0
X	 694 469 694 324 484 324 484 469 694 469 9999 9999
X2 4 0 1 0 0 17 0 0.000 0 0
X	 489 329 489 464 689 464 689 329 489 329 9999 9999
X2 4 0 1 0 0 16 0 0.000 0 0
X	 494 334 494 459 684 459 684 334 494 334 9999 9999
X2 4 0 1 0 0 15 0 0.000 0 0
X	 499 339 499 454 679 454 679 339 499 339 9999 9999
X2 4 0 1 0 0 14 0 0.000 0 0
X	 504 344 504 449 674 449 674 344 504 344 9999 9999
X2 4 0 1 0 0 13 0 0.000 0 0
X	 509 349 509 444 669 444 669 349 509 349 9999 9999
X2 4 0 1 0 0 12 0 0.000 0 0
X	 514 354 514 439 664 439 664 354 514 354 9999 9999
X2 4 0 1 0 0 11 0 0.000 0 0
X	 659 434 659 359 519 359 519 434 659 434 9999 9999
X2 4 0 1 0 0 10 0 0.000 0 0
X	 654 429 654 364 524 364 524 429 654 429 9999 9999
X2 4 0 1 0 0 9 0 0.000 0 0
X	 529 369 529 424 649 424 649 369 529 369 9999 9999
X2 4 0 1 0 0 8 0 0.000 0 0
X	 644 419 644 374 534 374 534 419 644 419 9999 9999
X2 4 0 1 0 0 7 0 0.000 0 0
X	 639 414 639 379 539 379 539 414 639 414 9999 9999
X2 4 0 1 0 0 20 0 0.000 0 0
X	 474 314 474 479 704 479 704 314 474 314 9999 9999
X2 4 0 1 0 0 7 0 0.000 0 0
X	 574 134 539 134 539 234 574 234 574 134 9999 9999
X2 4 0 1 0 0 6 0 0.000 0 0
X	 569 139 544 139 544 229 569 229 569 139 9999 9999
X2 4 0 1 0 0 5 0 0.000 0 0
X	 549 224 564 224 564 144 549 144 549 224 9999 9999
X2 4 0 1 0 0 3 0 0.000 0 0
X	 554 219 559 219 559 149 554 149 554 219 9999 9999
X2 4 0 1 0 0 8 0 0.000 0 0
X	 579 128 534 128 534 238 579 238 579 128 9999 9999
X2 4 0 1 0 0 9 0 0.000 0 0
X	 529 244 584 244 584 124 529 124 529 244 9999 9999
X2 4 0 1 0 0 10 0 0.000 0 0
X	 589 119 524 119 524 249 589 249 589 119 9999 9999
X2 4 0 1 0 0 11 0 0.000 0 0
X	 594 114 519 114 519 254 594 254 594 114 9999 9999
X2 4 0 1 0 0 12 0 0.000 0 0
X	 514 259 599 259 599 109 514 109 514 259 9999 9999
X2 4 0 1 0 0 13 0 0.000 0 0
X	 509 264 604 264 604 104 509 104 509 264 9999 9999
X2 4 0 1 0 0 14 0 0.000 0 0
X	 504 269 609 269 609 99 504 99 504 269 9999 9999
X2 4 0 1 0 0 15 0 0.000 0 0
X	 499 274 614 274 614 94 499 94 499 274 9999 9999
X2 4 0 1 0 0 16 0 0.000 0 0
X	 494 279 619 279 619 89 494 89 494 279 9999 9999
X2 4 0 1 0 0 17 0 0.000 0 0
X	 489 284 624 284 624 84 489 84 489 284 9999 9999
X2 4 0 1 0 0 18 0 0.000 0 0
X	 629 79 484 79 484 289 629 289 629 79 9999 9999
X2 4 0 1 0 0 19 0 0.000 0 0
X	 479 294 634 294 634 74 479 74 479 294 9999 9999
X2 4 0 1 0 0 20 0 0.000 0 0
X	 639 299 639 69 474 69 474 299 639 299 9999 9999
END_OF_FILE
if test 5738 -ne `wc -c <'@figs/roundboxes2.fig'`; then
    echo shar: \"'@figs/roundboxes2.fig'\" unpacked with wrong size!
fi
# end of '@figs/roundboxes2.fig'
fi
if test -f 'arc.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'arc.c'\"
else
echo shar: Extracting \"'arc.c'\" \(5343 characters\)
sed "s/^X//" >'arc.c' <<'END_OF_FILE'
X/* 
X *	FIG : Facility for Interactive Generation of figures
X *
X *	Copyright (c) 1985 by Supoj Sutanthavibul (supoj at sally.UTEXAS.EDU)
X *	January 1985.
X *	1st revision : Aug 1985.
X *
X *	%W%	%G%
X*/
X#include "fig.h"
X#include "resources.h"
X#include "alloc.h"
X#include "func.h"
X#include "object.h"
X#include "paintop.h"
X
X#define			PI		3.14159
X
Xextern int		foreground_color, background_color;
Xextern int		fix_x, fix_y, cur_x, cur_y;
X
Xextern int		autoforwardarrow_mode, autobackwardarrow_mode;
Xextern int		line_style, line_thickness;
Xextern float		cur_styleval;
Xextern int		cur_color;
Xextern int		cur_areafill;
Xextern int		fill_mode;
Xextern float		cur_dashlength;
Xextern int		num_point;
Xextern F_compound	objects;
Xextern appresStruct	appres;
X
Xextern			freehand_elasticline();
Xextern			(*canvas_kbd_proc)();
Xextern			(*canvas_locmove_proc)();
Xextern			(*canvas_leftbut_proc)();
Xextern			(*canvas_middlebut_proc)();
Xextern			(*canvas_rightbut_proc)();
Xextern			null_proc();
Xextern			set_popupmenu();
X
XF_pos			point[3];
X
Xextern int		create_arcobject();
Xextern int		get_arcpoint();
Xextern int		init_arc_drawing();
X
Xarc_drawing_selected()
X{
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 = set_popupmenu;
X	set_cursor(&arrow_cursor);
X	reset_action_on();
X	}
X
Xinit_arc_drawing(x, y)
Xint	x, y;
X{
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_elasticline;	/* in line.c  */
X	canvas_leftbut_proc = get_arcpoint;
X	canvas_middlebut_proc = create_arcobject;
X	draw_elasticline();		/* in line.c  */
X	set_temp_cursor(&null_cursor);
X	set_action_on();
X	}
X
Xget_arcpoint(x, y)
Xint	x, y;
X{
X	if (x == fix_x && y == fix_y) return;
X
X	if (num_point == 2)
X	{
X		create_arcobject(x, y);
X		return;
X	}
X	draw_elasticline();		/* in line.c  */
X	cur_x = x;  cur_y = y;
X	draw_elasticline();		/* in line.c  */
X	point[num_point].x = fix_x = x;
X	point[num_point++].y = fix_y = y;
X	draw_elasticline();		/* in line.c  */
X	}
X
Xcreate_arcobject(lx, ly)
Xint	lx, ly;
X{
X	extern F_arrow	*forward_arrow(), *backward_arrow();
X	F_arc		*arc;
X	int		x, y, i;
X	float		xx, yy;
X
X	draw_elasticline();
X	cur_x = lx;  cur_y = ly;
X	draw_elasticline();		/* in line.c  */
X	if (num_point == 1) {
X	    arc_drawing_selected();
X	    return;
X	    }
X	else if (num_point == 2) {
X	    point[num_point].x = lx;
X	    point[num_point++].y = ly;
X	    }
X
X	x = point[0].x;  y = point[0].y;
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, SOLID_LINE, 0.0);
X	    x = point[i].x;  y = point[i].y;
X	    }
X	if (num_point < 3) {
X	    arc_drawing_selected();
X	    return;
X	    }
X	if (! compute_arccenter(point[0], point[1], point[2], &xx, &yy)) {
X	    arc_drawing_selected();
X	    return;
X	    }
X	Arc_malloc(arc);
X	if (arc == NULL) {
X	    blink_msg();
X	    put_msg(Err_mem);
X	    arc_drawing_selected();
X	    return;
X	    }
X	arc->type = T_3_POINTS_ARC;
X	arc->style = line_style;
X	arc->thickness = line_thickness;
X	arc->style_val = cur_styleval;
X	arc->pen = 0;
X	arc->area_fill = fill_mode? cur_areafill : 0;
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, foreground_color);
X	if (appres.DEBUG) {
X	    int		xmin, ymin, xmax, ymax;
X	    arc_bound(arc, &xmin, &ymin, &xmax, &ymax);
X	    draw_rectbox(xmin, ymin, xmax, ymax, PAINT);
X	    }
X	clean_up();
X	set_action_object(F_CREATE, O_ARC);
X	insert_arc(&objects.arcs, arc);
X	set_latestarc(arc);
X	set_modifiedflag();
X	arc_drawing_selected();
X	}
X
X#define	 		round(x)	((int)((x) + .5))
X
Xdraw_arc(a, op)
XF_arc	*a;
Xint	op;
X{
X	int radius, rx, ry;
X
X	rx = a->point[0].x - a->center.x;
X	ry = a->center.y - a->point[0].y;
X	radius = round(sqrt((double) (rx*rx + ry*ry)));
X
X	curve(canvas_win, round(a->point[0].x - a->center.x),
X		round(a->center.y - a->point[0].y),
X		round(a->point[2].x - a->center.x),
X		round(a->center.y - a->point[2].y),
X		a->direction, radius, radius,
X		round(a->center.x), round(a->center.y), op,
X		a->thickness, a->style, a->style_val, a->area_fill);
X	draw_arcarrow(a, op);
X	}
X
Xdraw_arcarrow(a, op)
XF_arc	*a;
Xint	op;
X{
X	int	x, y;
X
X	if (a->for_arrow) {
X	    compute_normal(a->center.x, a->center.y, a->point[2].x, 
X			a->point[2].y, a->direction, &x, &y);
X	    if (op == foreground_color)
X		draw_arrow(x, y, a->point[2].x, a->point[2].y,
X				a->for_arrow, PAINT);
X	    else
X		draw_arrow(x, y, a->point[2].x, a->point[2].y,
X				a->for_arrow, ERASE);
X	    }
X	if (a->back_arrow) {
X	    compute_normal(a->center.x, a->center.y, a->point[0].x, 
X			a->point[0].y, a->direction ^ 1, &x, &y);
X	    if (op == foreground_color)
X		draw_arrow(x, y, a->point[0].x, a->point[0].y,
X				a->back_arrow, PAINT);
X	    else
X		draw_arrow(x, y, a->point[0].x, a->point[0].y,
X				a->back_arrow, ERASE);
X	    }
X	}
END_OF_FILE
if test 5343 -ne `wc -c <'arc.c'`; then
    echo shar: \"'arc.c'\" unpacked with wrong size!
fi
# end of 'arc.c'
fi
if test -f 'bitmap.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'bitmap.c'\"
else
echo shar: Extracting \"'bitmap.c'\" \(5520 characters\)
sed "s/^X//" >'bitmap.c' <<'END_OF_FILE'
X/* 
X *	FIG : Facility for Interactive Generation of figures
X *
X *	Copyright (c) 1985 by Supoj Sutanthavibul (supoj at sally.UTEXAS.EDU)
X *	January 1985.
X *	1st revision : Aug 1985.
X *
X *	%W%	%G%
X*/
X#include "fig.h"
X#include "resources.h"
X#include "object.h"
X#include "paintop.h"
X
Xextern int		CANVAS_WIDTH, CANVAS_HEIGHT;
Xextern F_compound	objects;
X
Xextern int		errno;
Xextern int		pointmarker_shown;
Xextern int		compoundbox_shown;
Xextern appresStruct	appres;
X
Xextern char		*sys_errlist[];
Xextern int		sys_nerr, errno;
X
Xwrite_bitmap(file_name)
Xchar	*file_name;
X	{
X	FILE			*fp;
X	struct stat		 file_status;
X	char			 string[180];
X
X	if (*file_name == 0) {
X	    put_msg("No file");
X	    return;
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;
X		}
X	    if (file_status.st_mode & S_IWRITE) { /* writing is permitted */
X		if (file_status.st_uid != geteuid()) {
X		    put_msg("\"%s\" permission is denied", file_name);
X		    return;
X		    }
X		else {
X		    sprintf(string, "\"%s\" File exists. Please click the LEFT button to COMFIRM overwrite. To cancel, click the MIDDLE or RIGHT button.", file_name);
X		    if (wmgr_confirm(canvas_win, string) != -1) {
X			put_msg("No write.");
X			return;
X			}
X		    }
X		}
X	    else {
X		put_msg("\"%s\" File is read only", file_name);
X		return;
X		}
X	    }
X	else if (errno != ENOENT)	/* file does exist but stat fails */
X		return; 
X
X	create_n_write_bitmap(file_name);	/* write the bitmap file */
X	}
X
Xstatic	Boolean havegcs = False;
Xstatic	GC sav_fill_gc[NUMFILLPATS];
Xstatic	GC sav_un_fill_gc[NUMFILLPATS];
Xstatic	unsigned long save_fg_color;
Xstatic	unsigned long save_bg_color;
X
Xcreate_n_write_bitmap(filename)
Xchar *filename;
X	{
X	int	box, marker, xmin, ymin, xmax, ymax;
X	int	width, height;
X	Window	sav_canvas, oneplane_win;
X	int	sav_pointmarker_shown;
X	Pixmap	largepm,bitmap;
X	extern	F_compound objects;
X	XVisualInfo  *visual,vinfo_template,*vis;
X	long	vinfo_mask;
X	int	nitems,i;
X	GC	xgc;
X
X	/* Assume that there is at least one object */
X	compound_bound(&objects, &xmin, &ymin, &xmax, &ymax);
X
X	if (appres.DEBUG) {
X	    draw_rectbox(xmin, ymin, xmax, ymax, INV_PAINT);
X	    }
X
X	/* provide a small margin */
X	if ((xmin -= 10) < 0)
X		xmin = 0;
X	if ((ymin -= 10) < 0)
X		ymin = 0;
X	if ((xmax += 10) > CANVAS_WIDTH)
X		xmax = CANVAS_WIDTH;
X	if ((ymax += 10) > CANVAS_HEIGHT)
X		ymax = CANVAS_HEIGHT;
X
X	width = xmax-xmin+1;
X	height = ymax-ymin+1;
X
X	/* choose foreground/background colors as 1 and 0 respectively */
X	/* that way we can just copy the lowest plane to make the bitmap */
X
X	XSetPlaneMask(tool_d, gccache[PAINT], (unsigned long) 1);
X	XSetForeground(tool_d, gccache[PAINT], (unsigned long) 1);
X	XSetBackground(tool_d, gccache[PAINT], (unsigned long) 0);
X	XSetPlaneMask(tool_d, gccache[ERASE], (unsigned long) 1);
X	XSetForeground(tool_d, gccache[ERASE], (unsigned long) 0);
X	XSetBackground(tool_d, gccache[ERASE], (unsigned long) 0);
X	save_fg_color = x_fg_color.pixel;	/* save current colors */
X	save_bg_color = x_bg_color.pixel;
X	x_fg_color.pixel = 1;			/* set fore=1, back=0 */
X	x_bg_color.pixel = 0;
X	if (!havegcs)
X	    {
X	    havegcs = True;
X	    for (i=0; i<NUMFILLPATS; i++)	/* save current fill gc's */
X		{
X		sav_fill_gc[i] = fill_gc[i];
X		sav_un_fill_gc[i] = un_fill_gc[i];
X		}
X	    init_fill_gc();		/* make some with 0/1 for colors */
X	    }
X	else
X	    for (i=0; i<NUMFILLPATS; i++)
X		{
X		xgc = sav_fill_gc[i];		/* swap our gc's with orig */
X		sav_fill_gc[i] = fill_gc[i];
X		fill_gc[i] = xgc;
X		xgc = sav_un_fill_gc[i];
X		sav_un_fill_gc[i] = un_fill_gc[i];
X		un_fill_gc[i] = xgc;
X		}
X	
X	/* create pixmap from (0,0) to (xmax,ymax) */
X	largepm = XCreatePixmap(tool_d, canvas_win, xmax+1, ymax+1, 
X				DefaultDepthOfScreen(tool_s));
X	/* clear it */
X	XFillRectangle(tool_d, largepm, gccache[ERASE], xmin,ymin,width,height);
X	sav_canvas = canvas_win;	/* save current canvas window id */
X	canvas_win = largepm;		/* make the canvas our pixmap */
X	sav_pointmarker_shown = pointmarker_shown;  /* save the point marker */
X	pointmarker_shown = False;
X	redisplay_objects(&objects);	/* draw the figure into the pixmap */
X	XFlush(tool_d);
X	canvas_win = sav_canvas;	/* go back to the real canvas */
X	pointmarker_shown = sav_pointmarker_shown; /* restore point marker */
X	bitmap = XCreatePixmap(tool_d, canvas_win, width, height, 
X			DefaultDepthOfScreen(tool_s));
X	/* now copy one plane of the pixmap to a bitmap of the correct size */
X	XCopyPlane(tool_d, largepm, bitmap, gccache[PAINT], 
X			xmin, ymin, width, height, 0, 0, 1);
X	x_fg_color.pixel = save_fg_color;	/* put colors back to normal */
X	x_bg_color.pixel = save_bg_color;
X	XSetPlaneMask(tool_d, gccache[PAINT], (unsigned long) AllPlanes);
X	XSetForeground(tool_d, gccache[PAINT], x_fg_color.pixel);
X	XSetBackground(tool_d, gccache[PAINT], x_bg_color.pixel);
X	XSetPlaneMask(tool_d, gccache[ERASE], (unsigned long) AllPlanes);
X	XSetForeground(tool_d, gccache[ERASE], x_bg_color.pixel);
X	XSetBackground(tool_d, gccache[ERASE], x_bg_color.pixel);
X	for (i=0; i<NUMFILLPATS; i++)		/* swap back the fill gc's */
X		{
X		xgc = sav_fill_gc[i];
X		sav_fill_gc[i] = fill_gc[i];
X		fill_gc[i] = xgc;
X		xgc = sav_un_fill_gc[i];
X		sav_un_fill_gc[i] = un_fill_gc[i];
X		un_fill_gc[i] = xgc;
X		}
X	if (XWriteBitmapFile(tool_d, filename, bitmap, width, height, -1, -1)
X	    != BitmapSuccess)
X		put_msg("Couldn't write bitmap file");
X	else
X		put_msg("Bitmap written to %s",filename);
X	XFreePixmap(tool_d, largepm);
X	XFreePixmap(tool_d, bitmap);
X	}
END_OF_FILE
if test 5520 -ne `wc -c <'bitmap.c'`; then
    echo shar: \"'bitmap.c'\" unpacked with wrong size!
fi
# end of 'bitmap.c'
fi
if test -f 'canvas.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'canvas.c'\"
else
echo shar: Extracting \"'canvas.c'\" \(5526 characters\)
sed "s/^X//" >'canvas.c' <<'END_OF_FILE'
X/* 
X *	FIG : Facility for Interactive Generation of figures
X *
X *	Copyright (c) 1985 by Supoj Sutanthavibul (supoj at sally.UTEXAS.EDU)
X *	January 1985.
X *	1st revision : Aug 1985.
X *
X *	%W%	%G%
X*/
X#include "fig.h"
X#include "resources.h"
X#include "const.h"
X#include "paintop.h"
X
X/***************** import global variables and routines *******************/
X
Xextern int		cur_command;
Xextern int		errno;
Xextern int		action_on;     /* tracker.c */
Xextern int		magnet_mode;
X
Xextern int		CANVAS_WIDTH, CANVAS_HEIGHT;
Xextern			null_proc();
Xextern			(*canvas_kbd_proc)();
Xextern			(*canvas_locmove_proc)();
Xextern			(*canvas_leftbut_proc)();
Xextern			(*canvas_middlebut_proc)();
Xextern			(*canvas_rightbut_proc)();
Xextern			null_proc();
Xextern			set_popupmenu();
X
X
X/*********************** local variables and routines ************************/
X
Xstatic			canvas_selected();
Xstatic			canvas_sighandler();
X
Xstatic Arg      canvas_args[] =
X{
X	/* 0 */ { XtNlabel, (XtArgVal)"" },
X	/* 1 */ { XtNwidth, (XtArgVal) 0 },
X	/* 2 */ { XtNheight, (XtArgVal) 0 },
X	/* 3 */ { XtNfromHoriz, (XtArgVal)NULL },
X	/* 4 */ { XtNhorizDistance, (XtArgVal) 0 },
X	/* 5 */ { XtNfromVert, (XtArgVal)NULL },
X	/* 6 */ { XtNvertDistance, (XtArgVal) 0 },
X	/* 7 */ { XtNtop,  (XtArgVal)XtChainTop  },
X	/* 8 */ { XtNleft, (XtArgVal)XtChainLeft },
X};
X
Xstatic void 
X
Xcanvas_exposed(tool, event, params, nparams)
X	TOOL		tool;
X	INPUTEVENT	*event;
X	String		*params;
X	Cardinal	*nparams;
X{
X	if (((XExposeEvent *)event)->count > 0)
X		return;
X	redisplay_canvas();
X	redisplay_rulers();
X}
X
Xstatic void 
X
Xset_pos(tool, event, params, nparams)
X	TOOL		tool;
X	XEvent		*event;
X	String		*params;
X	Cardinal	*nparams;
X{
X	int		x, y;	/* fixed 3/12/89  from patch 3 */
X	Window		w;
X	extern TOOL	menu;
X
X	XtGeometryResult result;
X	XtWidgetGeometry request, reply_return;
X	Dimension ww, hh, dw, dh;
X
X	XTranslateCoordinates(tool_d, canvas_win, XDefaultRootWindow(tool_d),
X			      event->xbutton.x, event->xbutton.y, &x, &y, &w);
X	request.request_mode = CWWidth | CWHeight;
X	result = XtQueryGeometry((Widget)menu, &request, &reply_return);
X
X	ww = reply_return.width;
X	hh = reply_return.height;
X	dw = DisplayWidth(tool_d, tool_sn);
X	dh = DisplayHeight(tool_d, tool_sn);
X	x = (x + ww > dw + 10) ? dw - ww + 10 : x;
X	y = (y + hh > dh + 10) ? dh - hh + 10 : y;
X
X	XtMoveWidget(menu, x-10, y-10);
X	XWarpPointer(tool_d, None, DefaultRootWindow(tool_d),
X		     0, 0, 0, 0, x, y);
X	set_temp_cursor(&arrow_cursor);	/* set cursor to arrow for popup menu */
X}
X
XXtActionsRec canvas_actions[] =
X{
X	{ "Event", (XtActionProc)canvas_selected },
X	{ "Expose", (XtActionProc)canvas_exposed },
X	{ "set_pos", (XtActionProc)set_pos },
X};
X
Xstatic String canvas_translations =
X	"<Motion>:Event()\n\
X	<Btn1Down>:Event()\n\
X	<Btn2Down>:Event()\n\
X	<Btn3Down>:set_pos(popup_menu)MenuPopup(popup_menu)\n\
X	<Key>:Event()\n\
X	<Expose>:Expose()\n";
X
Xstatic	Arg	canvas_color_args[] = {
X	{ XtNforeground, (XtArgVal) &x_fg_color.pixel },
X	{ XtNbackground, (XtArgVal) &x_bg_color.pixel },
X};
X
Xinit_canvas(tool)
X	TOOL		tool;
X{
X	XColor	fixcolors[2];
X	
X	canvas_args[1].value = CANVAS_WIDTH;
X	canvas_args[2].value = CANVAS_HEIGHT;
X	canvas_args[3].value = (XtArgVal)panel_sw;	/* to the right of the panel */
X	canvas_args[5].value = (XtArgVal)topruler_sw;	/* below the top ruler */
X	canvas_sw = XtCreateWidget("canvas", labelWidgetClass, tool,
X		canvas_args, XtNumber(canvas_args));
X	XtGetValues(canvas_sw, canvas_color_args, XtNumber(canvas_color_args));
X
X	/* get the RGB values for recolor cursor use -- may want to have
X	   cursor color resource */
X	fixcolors[0] = x_fg_color;
X	fixcolors[1] = x_bg_color;
X	XQueryColors(tool_d, DefaultColormapOfScreen(tool_s), fixcolors, 2);
X	x_fg_color = fixcolors[0];
X	x_bg_color = fixcolors[1];
X	
X	/* now fix the global GC */
X	XSetState(tool_d, gc, x_fg_color.pixel, x_bg_color.pixel, GXcopy,
X		  AllPlanes);
X	
X	/* and recolor the cursors */
X	recolor_cursors();
X	
X	canvas_leftbut_proc = null_proc;
X	canvas_middlebut_proc = null_proc;
X	canvas_rightbut_proc = null_proc;
X	canvas_kbd_proc = canvas_locmove_proc = null_proc;
X	XtAddActions(canvas_actions, XtNumber(canvas_actions));
X	XtOverrideTranslations(canvas_sw,
X		XtParseTranslationTable(canvas_translations));
X	return (1);
X}
X
Xsetup_canvas()
X{
X	canvas_rightbut_proc = set_popupmenu;
X	canvas_win = XtWindow(canvas_sw);
X	init_grid();
X}
X
Xstatic 
X
Xcanvas_selected(tool, event, params, nparams)
X	TOOL		tool;
X	INPUTEVENT	*event;
X	String		*params;
X	Cardinal	*nparams;
X{
X	register int	x, y, t;
X	char		buf[1];
X	XButtonPressedEvent	*be = (XButtonPressedEvent *)event;
X	XKeyPressedEvent	*ke = (XKeyPressedEvent *)event;
X
X	x = event->x;
X	y = event->y;
X	if (magnet_mode)
X	{
X		x = ((t = x % 5) < 3) ? x - t - 1 : x + 5 - t - 1;
X		y = ((t = y % 5) < 3) ? y - t - 1 : y + 5 - t - 1;
X	}
X	switch (event->type)
X	{
X	case MotionNotify:
X		{
X			Window rw, cw;
X			static int sx = -10000, sy = -10000;
X			int rx, ry, cx, cy;
X			unsigned int mask;
X
X			XQueryPointer(event->display, event->window,
X				      &rw, &cw,
X				      &rx, &ry,
X				      &cx, &cy,
X				      &mask);
X			if(cx == sx && cy == sy) break;
X			x = sx = cx;
X			y = sy = cy;
X		}
X		set_rulermark(x, y);
X		(*canvas_locmove_proc)(x, y);
X		break;
X	case ButtonPress:
X		if (be->button & Button1)
X			(*canvas_leftbut_proc)(x, y);
X		else if (be->button & Button2)
X			(*canvas_middlebut_proc)(x, y);
X		break;
X	case KeyPress:
X		if (XLookupString(ke, buf, sizeof(buf), NULL, NULL) > 0)
X			(*canvas_kbd_proc)((unsigned char)buf[0]);
X		break;
X	}
X}
X
Xclear_canvas()
X{
X	XClearArea(tool_d, canvas_win, 0, 0, 0, 0, False);
X}
END_OF_FILE
if test 5526 -ne `wc -c <'canvas.c'`; then
    echo shar: \"'canvas.c'\" unpacked with wrong size!
fi
# end of 'canvas.c'
fi
if test -f 'cursor.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'cursor.c'\"
else
echo shar: Extracting \"'cursor.c'\" \(5400 characters\)
sed "s/^X//" >'cursor.c' <<'END_OF_FILE'
X/* 
X *	FIG : Facility for Interactive Generation of figures
X *
X *	Copyright (c) 1985 by Supoj Sutanthavibul (supoj at sally.UTEXAS.EDU)
X *	January 1985.
X *	1st revision : Aug 1985.
X *
X *	%W%	%G%
X*/
X#include "fig.h"
X#include "resources.h"
X#include "paintop.h"
X
Xstatic u_int	arrow_cursor_array[8]  =  {
X		0xC000E000, 0xF000F800, 0xFC00F000, 0x90001800,
X		0x18000C00, 0x0C000600, 0x06000300, 0x03000100 };
Xmpr_static(arrow_cursor_pr, 16, 16, 1, arrow_cursor_array);
XCURSORREC	arrow_cursor  =  { 0, 0, MERGE, &arrow_cursor_pr };
X
Xstatic short	bull_cursor_array[16] = {
X	0x0F00,0x30C0,0x4020,0x4020,0x8010,0x8610,0x8610,0x8010,
X	0x4020,0x4020,0x30C0,0x0F00,0x0000,0x0000,0x0000,0x0000
X	};
Xmpr_static(bull_cursor_pr, 16, 16, 1, bull_cursor_array);
XCURSORREC	bull_cursor  =  { 5, 5, INV_PAINT, &bull_cursor_pr };
X
Xstatic u_int	buster_cursor_array[8] = {
X		0x0FE01010, 0x20085004, 0x88028402, 0x82028102,
X		0x80828042, 0x80224014, 0x20081010, 0x0FE00000, };
Xmpr_static(buster_cursor_pr, 16, 16, 1, buster_cursor_array);
XCURSORREC	buster_cursor  =  { 7, 7, MERGE, &buster_cursor_pr };
X
Xstatic short	char_cursor_data[16] = {
X		0xFF00, 0xFF00, 0xFF00, 0xFF00, 0xFF00, 0xFF00, 0xFF00, 0xFF00,
X		0xFF00, 0xFF00, 0xFF00, 0xFF00, 0xFF00, 0xFF00, 0xFF00, 0xFF00,
X		};
Xmpr_static(char_cursor_pr, 16, 16, 1, char_cursor_data);
XCURSORREC	char_cursor  =  { 0, 13, INV_PAINT, &char_cursor_pr };
X
Xstatic short	crosshair_cursor_data[16] = {
X		0x1000, 0x1000, 0x1000, 0xFE00, 0x1000, 0x1000, 0x1000, 0x0000,
X		0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
X		};
Xmpr_static(crosshair_cursor_pr, 16, 16, 1, crosshair_cursor_data);
XCURSORREC	crosshair_cursor  =  { 3, 3, INV_PAINT, &crosshair_cursor_pr };
X
XCURSORREC	null_cursor  =  { 0, 0, MERGE, 0 };
X
Xstatic short	magnifier_cursor_array[16] = {
X		0x0F80, 0x3060, 0x4010, 0x4010, 0x8008, 0x8008, 0x8008, 0x8008,
X		0x8008, 0x4010, 0x4010, 0x3078, 0x0F9C, 0x000E, 0x0007, 0x0003,
X		};
Xmpr_static(magnifier_cursor_pr, 16, 16, 1, magnifier_cursor_array);
XCURSORREC	magnifier_cursor  =  { 6, 6, MERGE, &magnifier_cursor_pr };
X
Xstatic short	pencil_cursor_array[16] = {
X		0x0000, 0x0018, 0x0024, 0x0075, 0x009B, 0x0117, 0x022E, 0x045C,
X		0x08B8, 0x1170, 0x22E0, 0x25C0, 0x7B80, 0x6700, 0x8600, 0x0800,
X		};
Xmpr_static(pencil_cursor_pr, 16, 16, 1, pencil_cursor_array);
XCURSORREC	pencil_cursor  =  { 0, 14, MERGE, &pencil_cursor_pr };
X
Xstatic u_int	pick15_cursor_array[8] = {
X		0x0FE01010, 0x20084004, 0x80028002, 0x80028002,
X		0x80028002, 0x80024004, 0x20081010, 0x0FE00000, };
Xmpr_static(pick15_cursor_pr, 16, 16, 1, pick15_cursor_array);
XCURSORREC	pick15_cursor  =  { 7, 7, MERGE, &pick15_cursor_pr };
X
Xstatic short	pick9_cursor_array[16] = {
X		0x3E00, 0x4100, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x4100,
X		0x3E00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
X		};
Xmpr_static(pick9_cursor_pr, 16, 16, 1, pick9_cursor_array);
XCURSORREC	pick9_cursor  =  { 4, 4, MERGE, &pick9_cursor_pr };
X
Xstatic short	vbar_cursor_array[16] = {
X		0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
X		0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000,
X		};
Xmpr_static(vbar_cursor_pr, 16, 16, 1, vbar_cursor_array);
XCURSORREC	vbar_cursor  =  { 0, 13, INV_PAINT, &vbar_cursor_pr };
X
Xstatic u_int	wait_cursor_array[8] = {
X		0xFFE04040, 0x40403F80, 0x3F801F00, 0x0E000400,
X		0x0A001100, 0x20802080, 0x40404040, 0xFFE00000, };
Xmpr_static(wait_cursor_pr, 16, 16, 1, wait_cursor_array);
XCURSORREC	wait_cursor = { 7, 5, MERGE, &wait_cursor_pr };
X
XCURSOR		cur_cursor = &arrow_cursor;  /* current cursor */
X
Xinit_cursor()
X{
X	register Display	*d = tool_d;
X
X	arrow_cursor.bitmap = (XImage *)XCreateFontCursor(d, XC_left_ptr);
X	bull_cursor.bitmap = (XImage *)XCreateFontCursor(d, XC_circle);
X	buster_cursor.bitmap = (XImage *)XCreateFontCursor(d, XC_pirate);
X	char_cursor.bitmap = (XImage *)XCreateFontCursor(d, XC_question_arrow);
X	crosshair_cursor.bitmap = (XImage *)XCreateFontCursor(d, XC_crosshair);
X	null_cursor.bitmap = (XImage *)XCreateFontCursor(d, XC_tcross);
X	magnifier_cursor.bitmap = (XImage *)XCreateFontCursor(d, XC_question_arrow);
X	pencil_cursor.bitmap = (XImage *)XCreateFontCursor(d, XC_pencil);
X	pick15_cursor.bitmap = (XImage *)XCreateFontCursor(d, XC_dotbox);
X	pick9_cursor.bitmap = (XImage *)XCreateFontCursor(d, XC_hand1);
X	vbar_cursor.bitmap = (XImage *)XCreateFontCursor(d, XC_xterm);
X	wait_cursor.bitmap = (XImage *)XCreateFontCursor(d, XC_watch);
X}
Xrecolor_cursors()
X{
X	register Display  *d = tool_d;
X	
X	XRecolorCursor(d, (Cursor)arrow_cursor.bitmap, &x_fg_color, &x_bg_color);
X	XRecolorCursor(d, (Cursor)bull_cursor.bitmap, &x_fg_color, &x_bg_color);
X	XRecolorCursor(d, (Cursor)buster_cursor.bitmap, &x_fg_color, &x_bg_color);
X	XRecolorCursor(d, (Cursor)char_cursor.bitmap, &x_fg_color, &x_bg_color);
X	XRecolorCursor(d, (Cursor)crosshair_cursor.bitmap, &x_fg_color,
X		       &x_bg_color);
X	XRecolorCursor(d, (Cursor)null_cursor.bitmap, &x_fg_color, &x_bg_color);
X	XRecolorCursor(d, (Cursor)magnifier_cursor.bitmap, &x_fg_color,
X		       &x_bg_color);
X	XRecolorCursor(d, (Cursor)pencil_cursor.bitmap, &x_fg_color, &x_bg_color);
X	XRecolorCursor(d, (Cursor)pick15_cursor.bitmap, &x_fg_color, &x_bg_color);
X	XRecolorCursor(d, (Cursor)pick9_cursor.bitmap, &x_fg_color, &x_bg_color);
X	XRecolorCursor(d, (Cursor)vbar_cursor.bitmap, &x_fg_color, &x_bg_color);
X	XRecolorCursor(d, (Cursor)wait_cursor.bitmap, &x_fg_color, &x_bg_color);
X}
END_OF_FILE
if test 5400 -ne `wc -c <'cursor.c'`; then
    echo shar: \"'cursor.c'\" unpacked with wrong size!
fi
# end of 'cursor.c'
fi
if test -f 'printfonts.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'printfonts.c'\"
else
echo shar: Extracting \"'printfonts.c'\" \(5355 characters\)
sed "s/^X//" >'printfonts.c' <<'END_OF_FILE'
X/* 
X *	FIG : Facility for Interactive Generation of figures
X *
X *	Added by Brian V. Smith
X *
X *	%W%	%G%
X*/
X#include "fig.h"
X#include "const.h"
X#include "resources.h"
X#include "func.h"
X#include "psfonts.h"	/* printer font names */
X
X/********************  global variables  ***************************/
X
Xextern	int	font_button;		/* font number */
Xextern	char	*font_menu_bits[];
Xextern	Pixmap	font_menu_bitmaps[];
Xextern	struct	_fstruct  fontnames[];	/* font names */
X
X/* GLOBAL */
X
Xint	*font_sel;		/* pointer to store font selected from popup */
XTOOL	image_widget;		/* which widget to store image of font in */
X
X/********************  local variables  ***************************/
X
Xstatic MENUITEM fontmenu_items[NUMFONTS];
X
Xstatic Arg	fontmenu_args[] =
X{
X	{ XtNvSpace, (XtArgVal) 1 },
X};
X
Xextern void fontpane_select();
X
Xstatic XtCallbackRec	pane_callbacks[] =
X{
X	{ fontpane_select, NULL },
X	{ NULL, NULL },
X};
X
Xstatic Arg      main_pane_args[] =
X{
X	/* 0 */ { XtNlabel, (XtArgVal)"        " },
X	/* 1 */ { XtNwidth, (XtArgVal) FONT_PANE_WIDTH },
X};
X
Xstatic Arg      pane_args[] =
X{
X	/* 0 */ { XtNwidth, (XtArgVal) FONT_PANE_WIDTH },
X	/* 1 */ { XtNheight, (XtArgVal) 20 },
X	/* 2 */ { XtNcallback, (XtArgVal)pane_callbacks },
X	/* 3 */ { XtNbitmap, (XtArgVal) NULL },
X	/* 4 */ { XtNinternalWidth, (XtArgVal) 0 },	/* space between pixmap and edge */
X	/* 5 */ { XtNinternalHeight, (XtArgVal) 0 },
X	/* 6 */ { XtNresize, (XtArgVal) FALSE },	/* don't allow resize */
X};
X
Xstatic Arg      psfont_args[] =
X{
X	/* 0 */ { XtNwidth, (XtArgVal) FONT_PANE_WIDTH },
X	/* 1 */ { XtNheight, (XtArgVal) MSG_HEIGHT },	/* same height as message panel */
X	/* 2 */ { XtNfromHoriz, (XtArgVal) NULL },	/* left side of main form */
X	/* 3 */ { XtNhorizDistance, (XtArgVal) 1 },
X	/* 4 */ { XtNfromVert, (XtArgVal) NULL },
X	/* 5 */ { XtNvertDistance, (XtArgVal) -1 },	/* dist from canvas_sw window */
X	/* 6 */ { XtNbitmap, (XtArgVal) NULL },
X	/* 8 */ { XtNinternalWidth, (XtArgVal) 0 },	/* space between pixmap and edge */
X	/* 8 */ { XtNinternalHeight, (XtArgVal) 0 },
X	/* 9 */ { XtNleft, (XtArgVal) XtChainLeft },
X	/*10 */ { XtNright, (XtArgVal) XtChainLeft },
X};
X
Xstatic	TOOL	fontpanes;
Xstatic	TOOL	fontpane[NUMFONTS];
X
Xinit_fontmenu(tool)
X	TOOL			tool;
X{
X	TOOL			title;
X	register int		i;
X	register MENUITEM	*mi;
X	XtTranslations		popdown_actions, pane_actions;
X
X	fontmenu = XtCreatePopupShell("font_menu", overrideShellWidgetClass, tool,
X		fontmenu_args, XtNumber(fontmenu_args));
X	popdown_actions = XtParseTranslationTable(
X		"<Btn1Up>:MenuPopdown()\n");
X	XtOverrideTranslations(fontmenu, popdown_actions);
X
X	fontpanes = XtCreateManagedWidget("menu", boxWidgetClass, fontmenu, fontmenu_args,
X		XtNumber(fontmenu_args));
X	pane_actions = XtParseTranslationTable(
X		"<EnterWindow>:set()\n\
X		<Btn1Up>:notify()unset()\n");
X	for (i = 0; i < NUMFONTS; i++)
X	{
X		fontmenu_items[i].type = MENU_IMAGESTRING;	/* put the fontnames in menu */
X		fontmenu_items[i].label = fontnames[i].psfont;
X		fontmenu_items[i].info = (caddr_t) i;		/* index for font # */
X	}
X	
X	main_pane_args[0].value = (XtArgVal)"Printer Fonts";
X	title = XtCreateManagedWidget("title", labelWidgetClass,
X				   fontpanes, main_pane_args, XtNumber(main_pane_args));
X
X	/* create the first pane */
X	mi = &fontmenu_items[0];
X	pane_callbacks[0].closure = (caddr_t)mi;
X
X	fontpane[0] = XtCreateManagedWidget("pane", commandWidgetClass,
X				     fontpanes, pane_args, XtNumber(pane_args));
X	XtOverrideTranslations(fontpane[0], pane_actions);
X
X
X	for (i = 1; i < NUMFONTS; ++i)
X	{
X		mi = &fontmenu_items[i];
X		pane_callbacks[0].closure = (caddr_t)mi;
X		fontpane[i] = XtCreateManagedWidget("pane", commandWidgetClass,
X			fontpanes, pane_args, XtNumber(pane_args));
X		XtOverrideTranslations(fontpane[i], pane_actions);
X	}
X
X	/* Now set up the font indicator window */
X
X	/* position */
X	psfont_args[4].value = (XtArgVal)canvas_sw;	/* just below the canvas window */
X	psfont = XtCreateManagedWidget("font_indicator", labelWidgetClass, tool,
X		psfont_args, XtNumber(psfont_args));
X	return (1);
X}
X
X/* create the bitmaps for the font menu */
X
Xsetup_fontmenu()
X	{
X	register int	i;
X
X	/* Create the bitmaps */
X
X	for (i=0; i<NUMFONTS; i++)
X	    font_menu_bitmaps[i] = XCreateBitmapFromData(tool_d,XtWindow(psfont),
X		font_menu_bits[i], FONT_PANE_WIDTH, FONT_PANE_HEIGHT);
X	psfont_args[6].value = (XtArgVal) font_menu_bitmaps[0];
X	XtSetValues(psfont, &psfont_args[6], 1);	/* show default font in window */
X
X	/* Store the bitmaps in the menu panes */
X	for (i=0; i< NUMFONTS; i++)
X		{
X		pane_args[3].value = (XtArgVal) font_menu_bitmaps[i];
X		XtSetValues(fontpane[i], &pane_args[3], 1);	/* bitmap */
X		}
X	}
X
X/* At this point (called from popup_fonts()), we have the font menu windows 
X   to work with so we can define the cursor */
X
Xstatic int cursinit = 0;
X
Xsetup_fontmenu_cursor()
X	{
X	if (cursinit)		/* already defined */
X		return;
X	cursinit = 1;
X	/* Define the cursor for the main menu form */
X	XDefineCursor(tool_d, XtWindow(fontpanes), (Cursor)arrow_cursor.bitmap);
X	}
X	
Xvoid fontpane_select(widget, mi)
XTOOL widget;
XMENUITEM *mi;
X{
X	char *	font_name = mi->label;
X	Arg	args[1];
X
X	*font_sel = (int) mi->info;	/* set current font to one selected */
X	put_msg("Font: %s",font_name);
X	/* put image of font in indicator window */
X	XtSetArg(args[0], XtNbitmap, font_menu_bitmaps[*font_sel]);
X	XtSetValues(image_widget, args, ONE);
X	XtPopdown(fontmenu);
X	}
END_OF_FILE
if test 5355 -ne `wc -c <'printfonts.c'`; then
    echo shar: \"'printfonts.c'\" unpacked with wrong size!
fi
# end of 'printfonts.c'
fi
echo shar: End of archive 5 \(of 21\).
cp /dev/null ark5isdone
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 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 21 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

dan
----------------------------------------------------
O'Reilly && Associates   argv at sun.com / argv at ora.com
Opinions expressed reflect those of the author only.



More information about the Comp.sources.x mailing list