home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume15 / touchup / patch2 / DIFFS.2 next >
Encoding:
Text File  |  1988-06-30  |  59.6 KB  |  2,211 lines

  1. diff -c ./INSTALL ../../Ver2.3/source/INSTALL
  2. *** ./INSTALL    Mon Jun 13 23:52:01 1988
  3. --- ../../Ver2.3/source/INSTALL    Fri Jun 17 00:25:31 1988
  4. ***************
  5. *** 35,38 ****
  6.   
  7.       If you are using Touchup on a color Sun you may want to
  8.       use the -n option (you can read about this in the man page)
  9. !     so the it will run faster.
  10. --- 35,48 ----
  11.   
  12.       If you are using Touchup on a color Sun you may want to
  13.       use the -n option (you can read about this in the man page)
  14. !     so that it will run faster.
  15. !     After you have installed touchup, these are the files
  16. !     you must have in order to run the execuatble code:
  17. !         touchup*
  18. !         info.image
  19. !         touchup.cat
  20. !     The rest of the files can be removed.
  21. diff -c ./Makefile ../../Ver2.3/source/Makefile
  22. *** ./Makefile    Mon Jun 13 23:52:00 1988
  23. --- ../../Ver2.3/source/Makefile    Fri Jun 17 00:25:29 1988
  24. ***************
  25. *** 1,6 ****
  26. ! CFLAGS = -O
  27. ! OPTIONS =
  28. ! LIBS = -lsuntool -lsunwindow -lpixrect -lm
  29.   EXE = touchup
  30.   OBJ =   ffill.o cms_rainbow.o oval.o circle.o confirmer.o fat.o touchup.o \
  31.       info.o fonts.o brush.o command.o color_palet.o \
  32. --- 1,6 ----
  33. ! CFLAGS = -g
  34. ! OPTIONS = -DSunOS_3.4
  35. ! LIBS = -lsuntool -lsunwindow -lpixrect
  36.   EXE = touchup
  37.   OBJ =   ffill.o cms_rainbow.o oval.o circle.o confirmer.o fat.o touchup.o \
  38.       info.o fonts.o brush.o command.o color_palet.o \
  39. ***************
  40. *** 20,25 ****
  41. --- 20,29 ----
  42.   ################################################################
  43.   #   change these dirs if you move the files
  44.   ################################################################
  45. + # next line must be hard coded if not using csh; no trailing space!
  46. + # remove the comment at the begining of the next line if you are
  47. + # not using csh and set the path to the path of the dir that touchup is in.
  48. + #PWD=/usr/yourlogin/src/touchup    
  49.   BASE_DIR = $(PWD)
  50.   PATTERNS_DIR = $(BASE_DIR)
  51.   COMMANDS_DIR = $(BASE_DIR)
  52. ***************
  53. *** 30,63 ****
  54.   
  55.   
  56.   $(EXE): $(OBJ) touchup.cat
  57. !     cc $(CFLAGS) -o $(EXE) $(OBJ) $(OPTIONS) $(LIBS)
  58.   
  59.   
  60.   lint_it: $(SRC)
  61.       lint $(SRC) $(OPTIONS) $(LIBS)
  62.   
  63.   
  64.   interface.o :
  65. !     cc $(CFLAGS)  -mc68020 -c  interface.c -I$(PATTERNS_DIR)
  66.   
  67.   pattern.o:
  68. !     cc $(CFLAGS)  -mc68020 -c  pattern.c -I$(PATTERNS_DIR)
  69.   
  70.   brush.o:
  71. !     cc $(CFLAGS)  -mc68020 -c  brush.c -I$(PATTERNS_DIR)
  72.   
  73.   command.o:
  74. !     cc $(CFLAGS)  -mc68020 -c  command.c -I$(COMMANDS_DIR)
  75.   
  76.   fat.o:
  77. !     cc $(CFLAGS)  -mc68020 -c fat.c $(OPTIONS) -DNO_FASTAN
  78.   
  79.   info.o:
  80. !     cc $(CFLAGS)  -mc68020 -c info.c $(OPTIONS) -DINFO_IMAGE='"$(INFO_PICTURE)"' -DHELP_FILE='"$(MAN_PAGE)"'
  81.   
  82.   touchup.o:
  83. !     cc $(CFLAGS)  -mc68020 -c touchup.c $(OPTIONS)
  84.   
  85.   
  86.   touchup.cat: touchup.man
  87. --- 34,70 ----
  88.   
  89.   
  90.   $(EXE): $(OBJ) touchup.cat
  91. !     $(CC) $(CFLAGS) -o $(EXE) $(OBJ) $(OPTIONS) $(LIBS)
  92. !     strip touchup             #final version
  93.   
  94.   
  95.   lint_it: $(SRC)
  96.       lint $(SRC) $(OPTIONS) $(LIBS)
  97.   
  98.   
  99.   interface.o :
  100. !     $(CC) $(CFLAGS)  -c  interface.c -I$(PATTERNS_DIR) $(OPTIONS)
  101.   
  102.   pattern.o:
  103. !     $(CC) $(CFLAGS)  -c  pattern.c -I$(PATTERNS_DIR) $(OPTIONS)
  104.   
  105.   brush.o:
  106. !     $(CC) $(CFLAGS)  -c  brush.c -I$(PATTERNS_DIR) $(OPTIONS)
  107.   
  108.   command.o:
  109. !     $(CC) $(CFLAGS)  -c  command.c -I$(COMMANDS_DIR) $(OPTIONS)
  110.   
  111.   fat.o:
  112. !     $(CC) $(CFLAGS)  -c fat.c $(OPTIONS) -DNO_FASTAN
  113.   
  114. + circle.o:
  115. +     $(CC) $(CFLAGS)  -c circle.c $(OPTIONS)
  116.   info.o:
  117. !     $(CC) $(CFLAGS)  -c info.c $(OPTIONS) -DINFO_IMAGE='"$(INFO_PICTURE)"' -DHELP_FILE='"$(MAN_PAGE)"'
  118.   
  119.   touchup.o:
  120. !     $(CC) $(CFLAGS)  -c touchup.c $(OPTIONS)
  121.   
  122.   
  123.   touchup.cat: touchup.man
  124. ***************
  125. *** 66,82 ****
  126.   
  127.   shar:
  128.       uuencode info.image info.image > temp_image
  129. !     shar -b -n1 -e6 *.h Makefile INSTALL README touchup.man \
  130.           fixman.sed temp_image touchup.icon \
  131.               $(SH_PATTERNS_DIR)/fat_cursor \
  132.               $(SH_PATTERNS_DIR)/strip_icon32x32 \
  133.               $(SH_COMMANDS_DIR)/strip_icon48x48 > touchup.shar1
  134. !     shar -b -n2 -e6 $(SH_COMMANDS_DIR)/*.cicon > touchup.shar2
  135. !     shar -b -n3 -e6 $(SH_PATTERNS_DIR)/pattern[1-2]*.icon > touchup.shar3
  136. !     shar -b -n4 -e6 $(SH_PATTERNS_DIR)/pattern[3-9]*.icon \
  137.               $(SH_PATTERNS_DIR)/brush[1-9].icon > touchup.shar4
  138. !     shar -b -n5 -e6 [a-h]*.c > touchup.shar5
  139. !     shar -b -n6 -e6 [h-z]*.c > touchup.shar6
  140.       rm -f temp_image
  141.   
  142.   install:
  143. --- 73,90 ----
  144.   
  145.   shar:
  146.       uuencode info.image info.image > temp_image
  147. !     shar -b -n1 -e7 *.h Makefile INSTALL README touchup.man \
  148.           fixman.sed temp_image touchup.icon \
  149.               $(SH_PATTERNS_DIR)/fat_cursor \
  150.               $(SH_PATTERNS_DIR)/strip_icon32x32 \
  151.               $(SH_COMMANDS_DIR)/strip_icon48x48 > touchup.shar1
  152. !     shar -b -n2 -e7 $(SH_COMMANDS_DIR)/*.cicon > touchup.shar2
  153. !     shar -b -n3 -e7 $(SH_PATTERNS_DIR)/pattern[1-2]*.icon > touchup.shar3
  154. !     shar -b -n4 -e7 $(SH_PATTERNS_DIR)/pattern[3-9]*.icon \
  155.               $(SH_PATTERNS_DIR)/brush[1-9].icon > touchup.shar4
  156. !     shar -b -n5 -e7 [a-d]*.c > touchup.shar5
  157. !     shar -b -n6 -e7 [e-n]*.c > touchup.shar6
  158. !     shar -b -n7 -e7 [o-z]*.c > touchup.shar7
  159.       rm -f temp_image
  160.   
  161.   install:
  162. diff -c ./README ../../Ver2.3/source/README
  163. *** ./README    Mon Jun 13 23:52:02 1988
  164. --- ../../Ver2.3/source/README    Fri Jun 17 00:25:33 1988
  165. ***************
  166. *** 21,40 ****
  167.   
  168.   **************************************************************************/
  169.   
  170. !     Be sure to read the instructions in INSTALL first.
  171.   
  172. !     There in is a manual in file touchup.man
  173.   
  174.   
  175. !     After you have installed touchup these are the files
  176. !     you must have in order to run the execuatble code:
  177.   
  178. -         touchup*
  179. -         info.image
  180. -         touchup.cat
  181. -     The rest of the files can be removed.
  182.   
  183.       If you are using Touchup on a color Sun you may want to
  184.       use the -n option (you can read about this in the man page)
  185. --- 21,45 ----
  186.   
  187.   **************************************************************************/
  188.   
  189. ! =====>    Be sure to read the instructions in INSTALL first.  <=====
  190.   
  191. !     Touchup is a public domain bitmap editor for Sun workstations
  192. !     that is very useful for "fixing" screen dumps and doing other
  193. !     types of bitmap editing.  Touchup is a powerful bitmap editor,
  194. !     a few of the capabilities are listed below:
  195.   
  196. +         - paint with different textures
  197. +         - draw circles, rectangles, ovals, lines, and polygons
  198. +         - examine and modify a region at magnification 1-20
  199. +         - use text in many fonts
  200. +         - flood fill an area
  201. +         - lasso a free form region within a bitmap
  202. +         - scale-stretch a region of a bitmap
  203. +         - rotate a region
  204. +         - move a region
  205.   
  206. !     There in is a manual in file touchup.man
  207.   
  208.   
  209.       If you are using Touchup on a color Sun you may want to
  210.       use the -n option (you can read about this in the man page)
  211. diff -c ./circle.c ../../Ver2.3/source/circle.c
  212. *** ./circle.c    Mon Jun 13 23:53:10 1988
  213. --- ../../Ver2.3/source/circle.c    Fri Jun 17 00:27:03 1988
  214. ***************
  215. *** 25,31 ****
  216.   /**************************************************************************
  217.       file: circle.c
  218.       purpose: This file contains that routines that draw circles
  219. !         on the screen. A UNDOCUMENTED Sunview function "pw_polypoint"
  220.           is used to get the list of points that make the circle
  221.           on to the screen AMAZINGLY FAST.
  222.           The points that make up the circle are calculated with
  223. --- 25,31 ----
  224.   /**************************************************************************
  225.       file: circle.c
  226.       purpose: This file contains that routines that draw circles
  227. !         on the screen. A Sunview 3.4 function "pw_polypoint"
  228.           is used to get the list of points that make the circle
  229.           on to the screen AMAZINGLY FAST.
  230.           The points that make up the circle are calculated with
  231. ***************
  232. *** 35,40 ****
  233. --- 35,44 ----
  234.           date:    Tue Mar 22 22:04:58 EST 1988
  235.           author:    rayk
  236.           changes:add comments
  237. +         date:    Fri Apr 22 17:11:02 EDT 1988
  238. +         author:    rayk
  239. +         changes:added pw_batching and bitops
  240.   **************************************************************************/
  241.   
  242.   #include "header.h"
  243. ***************
  244. *** 74,79 ****
  245. --- 78,88 ----
  246.                else
  247.                   error = error + ((x-y--) << 2) + 10;
  248.                x++;
  249. +          if (numpts > MAX_PTS-8)
  250. +           {
  251. +         ERROR("Circle is too larege !");
  252. +         return(0);
  253. +          }
  254.              }  /* end of while (x , y) */
  255.      
  256.              if (x == y)
  257. ***************
  258. *** 84,111 ****
  259.                ptlist[numpts].x=center.x-x;   ptlist[numpts++].y=center.y-y;
  260.              }
  261.   
  262. !        my_pw_polypoint(pw,0,0,numpts,ptlist,PIX_SET);
  263.   }  /* end of function draw_circle() */   
  264.   
  265.   
  266.   
  267. ! my_pw_polypoint(temp_pw,off_x,off_y,count_pts,ptlist, ROP)
  268. ! Pixwin *temp_pw;
  269.   int off_x,off_y,count_pts;
  270.   struct pr_pos ptlist[];
  271.   int ROP;
  272.   {
  273.   
  274. !   if (image_depth > 1)
  275.     {
  276.       while(--count_pts > 0)
  277.       {
  278. !       pw_rop(temp_pw,off_x+ptlist[count_pts].x,off_y+ptlist[count_pts].y,1,1
  279. !       ,PIX_COLOR(cur_color) | PIX_SRC ,pattern[0],0,0);
  280.       }
  281.     }
  282.     else
  283.     {
  284. !     pw_polypoint(temp_pw,off_x,off_y,count_pts,ptlist,ROP);
  285.     }
  286.   }
  287. --- 93,129 ----
  288.                ptlist[numpts].x=center.x-x;   ptlist[numpts++].y=center.y-y;
  289.              }
  290.   
  291. !        my_pw_polypoint(0,0,numpts,ptlist,ROP);
  292.   }  /* end of function draw_circle() */   
  293.   
  294.   
  295.   
  296. ! my_pw_polypoint(off_x,off_y,count_pts,ptlist, ROP)
  297.   int off_x,off_y,count_pts;
  298.   struct pr_pos ptlist[];
  299.   int ROP;
  300.   {
  301.   
  302. !   if (((ROP == (PIX_SRC)) || (ROP == (PIX_SRC | PIX_DST)))
  303. !       && (image_depth == 1))
  304. !      ROP = PIX_SET;
  305. ! #ifdef SunOS_3.4
  306. !   if ((image_depth > 1) || (ROP != (PIX_SET)))
  307.     {
  308. + #endif
  309. +     pw_batch_on(pw);
  310.       while(--count_pts > 0)
  311.       {
  312. !       pw_rop(pw,off_x+ptlist[count_pts].x,off_y+ptlist[count_pts].y,1,1
  313. !       ,PIX_COLOR(cur_color) | ROP ,pattern[0],0,0);
  314.       }
  315. +     pw_batch_off(pw);
  316. + #ifdef SunOS_3.4
  317.     }
  318.     else
  319.     {
  320. !     pw_polypoint(pw,off_x,off_y,count_pts,ptlist,PIX_SET);
  321.     }
  322. + #endif
  323.   }
  324. diff -c ./cms_rainbow.c ../../Ver2.3/source/cms_rainbow.c
  325. *** ./cms_rainbow.c    Mon Jun 13 23:53:12 1988
  326. --- ../../Ver2.3/source/cms_rainbow.c    Fri Jun 17 00:27:05 1988
  327. ***************
  328. *** 30,35 ****
  329. --- 30,39 ----
  330.           date:    Tue Mar 22 22:04:58 EST 1988
  331.           author:    rayk
  332.           changes:add comments
  333. +         date:    Sat Jun  4 13:22:45 EST 1988
  334. +         author:    rayk
  335. +         changes:fixed color pallet so that it was continious
  336.   **************************************************************************/
  337.   
  338.   extern unsigned char red[256],green[256],blue[256];
  339. ***************
  340. *** 52,104 ****
  341.       red = blue = green = 0;
  342.   
  343.       for (i = 2; i < 30; i++) {
  344. !     red += 9;
  345. !     set_colorentry(i, red, green, blue);
  346.       }
  347. !     set_colorentry(30, 255, 0, 0);    /* red */
  348.       red = 255; blue = green = 0;
  349.       for (i = 30; i < 62; i++) {
  350. !     green += 6;
  351. !     set_colorentry(i, red, green, blue);
  352.       }
  353. !     set_colorentry(62, 255, 195, 0);    /* orange */ /* note diff = 33 */
  354. !     red = 255; blue = 0; green = 195;
  355.       for (i = 63; i < 96; i++) {
  356. !     green += 2;
  357. !     set_colorentry(i, red, green, blue);
  358.       }
  359. !     set_colorentry(96, 255, 255, 0);    /* yellow */
  360.       red = 255; blue = 0; green = 255;
  361.       for (i = 97; i < 133; i++) {
  362. !     red -= 7;
  363. !     set_colorentry(i, red, green, blue);
  364.       }
  365. !     set_colorentry(133, 0, 255, 0);    /* green */
  366.       red = blue = 0; green = 255;
  367.       for (i = 134; i < 165; i++) {
  368. !     green -= 8;
  369. !     blue += 8;
  370. !     set_colorentry(i, red, green, blue);
  371.       }
  372. !     set_colorentry(165, 0, 0, 255);    /* blue */
  373.       red = green = 0; blue = 255;
  374.       for (i = 165; i < 202; i++) {
  375. !     red += 7;
  376. !     set_colorentry(i, red, green, blue);
  377.       }
  378. !     set_colorentry(202, 255, 0, 255);    /* violet */
  379.       red = blue = 255; green = 0;
  380.       for (i = 203; i < 239; i++) {
  381. !     green += 7;
  382. !     set_colorentry(i, red, green, blue);
  383.       }
  384. !     set_colorentry(239, 255, 255, 255);    /* white */
  385.       red = blue = green = 255;
  386.       for (i = 239; i <= 255; i++) {
  387. !     green -= 9;
  388. !     red -= 9;
  389. !     blue -= 9;
  390. !     set_colorentry(i, red, green, blue);
  391.       }
  392.   }
  393. --- 56,108 ----
  394.       red = blue = green = 0;
  395.   
  396.       for (i = 2; i < 30; i++) {
  397. !         red += 9;
  398. !         set_colorentry(i, red, green, blue);
  399.       }
  400. !     set_colorentry(30, 255, 0, 0);      /* red */
  401.       red = 255; blue = green = 0;
  402.       for (i = 30; i < 62; i++) {
  403. !         green += 6;
  404. !         set_colorentry(i, red, green, blue);
  405.       }
  406. !     set_colorentry(62, 255, 188, 0);    /* orange */ /* note diff = 33 */
  407. !     red = 255; blue = 0; green = 188;
  408.       for (i = 63; i < 96; i++) {
  409. !         green += 2;
  410. !         set_colorentry(i, red, green, blue);
  411.       }
  412. !     set_colorentry(96, 255, 255, 0);    /* yellow */
  413.       red = 255; blue = 0; green = 255;
  414.       for (i = 97; i < 133; i++) {
  415. !         red -= 7;
  416. !         set_colorentry(i, red, green, blue);
  417.       }
  418. !     set_colorentry(133, 0, 255, 0);     /* green */
  419.       red = blue = 0; green = 255;
  420.       for (i = 134; i < 165; i++) {
  421. !         green -= 8;
  422. !         blue += 8;
  423. !         set_colorentry(i, red, green, blue);
  424.       }
  425. !     set_colorentry(165, 0, 0, 255);     /* blue */
  426.       red = green = 0; blue = 255;
  427.       for (i = 165; i < 202; i++) {
  428. !         red += 7;
  429. !         set_colorentry(i, red, green, blue);
  430.       }
  431. !     set_colorentry(201, 255, 0, 255);   /* violet */
  432. !     set_colorentry(202, 255, 0, 255);   /* violet */
  433.       red = blue = 255; green = 0;
  434.       for (i = 203; i < 239; i++) {
  435. !         green += 7;
  436. !         set_colorentry(i, red, green, blue);
  437.       }
  438. !     set_colorentry(239, 255, 255, 255); /* white */
  439.       red = blue = green = 255;
  440.       for (i = 239; i <= 255; i++) {
  441. !         green -= 9;
  442. !         red -= 9;
  443. !         blue -= 9;
  444. !         set_colorentry(i, red, green, blue);
  445.       }
  446.   }
  447. diff -c ./color_palet.c ../../Ver2.3/source/color_palet.c
  448. *** ./color_palet.c    Mon Jun 13 23:53:13 1988
  449. --- ../../Ver2.3/source/color_palet.c    Fri Jun 17 00:27:06 1988
  450. ***************
  451. *** 30,35 ****
  452. --- 30,43 ----
  453.           date:    Tue Mar 22 22:04:58 EST 1988
  454.           author:    rayk
  455.           changes:add comments
  456. +         date:    Thu Jun 16 21:02:52 EDT 1988
  457. +         author:    tnosoes!tom@mcvax.cwi.nl
  458. +         changes:corrected problems with FRAME_INHERIT_COLOR
  459. +             and the problem of the color table flashing
  460. +             on and off when you move the mouse between
  461. +             window.
  462.   **************************************************************************/
  463.   
  464.   #include "header.h"
  465. ***************
  466. *** 52,60 ****
  467.    */
  468.   set_mono()
  469.   {
  470. ! /* set the color map to mono ******** */
  471. !   cms_monochromeload(red,green,blue);
  472. !   my_put_colormap();
  473.     panel_set(color_button,PANEL_SHOW_ITEM, FALSE,0);
  474.     panel_set(mono_cycle,PANEL_SHOW_ITEM, TRUE,0);
  475.   }
  476. --- 60,73 ----
  477.    */
  478.   set_mono()
  479.   {
  480. !   /*
  481. !    * set the color map to mono
  482. !    */
  483. !   if ((pw->pw_pixrect->pr_depth) > 1)
  484. !    {
  485. !      cms_monochromeload(red,green,blue);
  486. !      my_put_colormap();
  487. !    }
  488.     panel_set(color_button,PANEL_SHOW_ITEM, FALSE,0);
  489.     panel_set(mono_cycle,PANEL_SHOW_ITEM, TRUE,0);
  490.   }
  491. ***************
  492. *** 78,83 ****
  493. --- 91,97 ----
  494.     bcopy(red,temp_red,256);
  495.     bcopy(green,temp_green,256);
  496.     bcopy(blue,temp_blue,256);
  497.     temp_red[0] = -1;
  498.     temp_green[0] = -1;
  499.     temp_blue[0] = -1;
  500. ***************
  501. *** 85,110 ****
  502.     temp_green[1] = 0;
  503.     temp_blue[1] = 0;
  504.   
  505.     temp_pw = (Pixwin *)window_get(panel, WIN_PIXWIN);
  506.     pw_setcmsname(temp_pw, "ray kreisel");
  507. !   pw_putcolormap(temp_pw, 0,256,red,green,blue);
  508.   
  509.     temp_pw = (Pixwin *)window_get(command_panel, WIN_PIXWIN);
  510.     pw_setcmsname(temp_pw, "ray kreisel");
  511. !   pw_putcolormap(temp_pw, 0,256,red,green,blue);
  512.   
  513.     temp_pw = (Pixwin *)window_get(region_panel, WIN_PIXWIN);
  514.     pw_setcmsname(temp_pw, "ray kreisel");
  515. !   pw_putcolormap(temp_pw, 0,256,red,green,blue);
  516.   
  517.     temp_pw = (Pixwin *)window_get(pattern_panel, WIN_PIXWIN);
  518.     pw_setcmsname(temp_pw, "ray kreisel");
  519. !   pw_putcolormap(temp_pw, 0,256,red,green,blue);
  520.   
  521.     temp_pw = (Pixwin *)window_get(brush_panel, WIN_PIXWIN);
  522.     pw_setcmsname(temp_pw, "ray kreisel");
  523. !   pw_putcolormap(temp_pw, 0,256,red,green,blue);
  524.   
  525.   }
  526.   
  527.   color_mode(item, event)
  528. --- 99,150 ----
  529.     temp_green[1] = 0;
  530.     temp_blue[1] = 0;
  531.   
  532. +   temp_red[255] = 0;
  533. +   temp_green[255] = 0;
  534. +   temp_blue[255] = 0;
  535. +   temp_red[254] = -1;
  536. +   temp_green[254] = -1;
  537. +   temp_blue[254] = -1;
  538. +   temp_pw = (Pixwin *)window_get(base_frame, WIN_PIXWIN);
  539. +   pw_setcmsname(temp_pw, "ray kreisel");
  540. +   pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
  541.     temp_pw = (Pixwin *)window_get(panel, WIN_PIXWIN);
  542.     pw_setcmsname(temp_pw, "ray kreisel");
  543. !   pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
  544.   
  545.     temp_pw = (Pixwin *)window_get(command_panel, WIN_PIXWIN);
  546.     pw_setcmsname(temp_pw, "ray kreisel");
  547. !   pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
  548.   
  549.     temp_pw = (Pixwin *)window_get(region_panel, WIN_PIXWIN);
  550.     pw_setcmsname(temp_pw, "ray kreisel");
  551. !   pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
  552.   
  553.     temp_pw = (Pixwin *)window_get(pattern_panel, WIN_PIXWIN);
  554.     pw_setcmsname(temp_pw, "ray kreisel");
  555. !   pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
  556.   
  557.     temp_pw = (Pixwin *)window_get(brush_panel, WIN_PIXWIN);
  558.     pw_setcmsname(temp_pw, "ray kreisel");
  559. !   pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
  560.   
  561. +   temp_pw = (Pixwin *)window_get(color_frame, WIN_PIXWIN);
  562. +   pw_setcmsname(temp_pw, "ray kreisel");
  563. +   pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
  564. +   temp_pw = (Pixwin *)window_get(color_panel, WIN_PIXWIN);
  565. +   pw_setcmsname(temp_pw, "ray kreisel");
  566. +   pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
  567. +   temp_pw = (Pixwin *)window_get(fat_frame, WIN_PIXWIN);
  568. +   pw_setcmsname(temp_pw, "ray kreisel");
  569. +   pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
  570. +   temp_pw = (Pixwin *)window_get(fat_panel, WIN_PIXWIN);
  571. +   pw_setcmsname(temp_pw, "ray kreisel");
  572. +   pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
  573.   }
  574.   
  575.   color_mode(item, event)
  576. ***************
  577. *** 150,162 ****
  578.   Event   *event;
  579.   caddr_t arg;
  580.   {
  581. !     if (event_is_up(event))
  582. !        return;
  583. !     switch (event_id(event)) {
  584. !      case MS_LEFT:
  585. !         update_cur_color(event_x(event),event_y(event),0);
  586. !         break;
  587. !     }
  588.   }
  589.   
  590.   
  591. --- 190,197 ----
  592.   Event   *event;
  593.   caddr_t arg;
  594.   {
  595. !     if (event_id(event) == MS_LEFT)
  596. !     update_cur_color(event_x(event),event_y(event),0);
  597.   }
  598.   
  599.   
  600. diff -c ./command.c ../../Ver2.3/source/command.c
  601. *** ./command.c    Mon Jun 13 23:53:14 1988
  602. --- ../../Ver2.3/source/command.c    Fri Jun 17 00:27:08 1988
  603. ***************
  604. *** 152,159 ****
  605.   };
  606.   static mpr_static(reg_command7_pr, 48, 48, 1, reg_command7_data);
  607.   
  608.   static short reg_command8_data[] = {
  609.   #include "move.cicon.pat"
  610.   };
  611.   static mpr_static(reg_command8_pr, 48, 48, 1, reg_command8_data);
  612. --- 152,163 ----
  613.   };
  614.   static mpr_static(reg_command7_pr, 48, 48, 1, reg_command7_data);
  615.   
  616.   static short reg_command8_data[] = {
  617.   #include "move.cicon.pat"
  618.   };
  619.   static mpr_static(reg_command8_pr, 48, 48, 1, reg_command8_data);
  620. + static short reg_command9_data[] = {
  621. + #include "scale.cicon.pat"
  622. + };
  623. + static mpr_static(reg_command9_pr, 48, 48, 1, reg_command9_data);
  624. diff -c ./confirmer.c ../../Ver2.3/source/confirmer.c
  625. *** ./confirmer.c    Mon Jun 13 23:53:16 1988
  626. --- ../../Ver2.3/source/confirmer.c    Fri Jun 17 00:27:09 1988
  627. ***************
  628. *** 28,50 ****
  629.           date:    Tue Mar 22 22:04:58 EST 1988
  630.           author:    rayk
  631.           changes:add comments
  632. - **************************************************************************/
  633.   
  634. ! #include <stdio.h>
  635. ! #include <sys/file.h>
  636. ! #include <suntool/sunview.h>
  637. ! #include <suntool/panel.h>
  638. ! #include <suntool/canvas.h>
  639. ! #include <suntool/walkmenu.h>
  640. ! #include <suntool/scrollbar.h>
  641. ! #include <math.h>
  642. ! #include <pixrect/pixrect_hs.h>
  643.   
  644. - extern Panel panel;
  645.   
  646. ! static Frame  init_confirmer();
  647. ! static void yes_no();
  648.   
  649.   /***************************************************************
  650.           confirm
  651.           purpose: To display a window on the base_frame Sunwindow
  652. --- 28,45 ----
  653.           date:    Tue Mar 22 22:04:58 EST 1988
  654.           author:    rayk
  655.           changes:add comments
  656.   
  657. !         date:    Sun May 15 21:21:01 EDT 1988
  658. !         author:    rayk
  659. !         changes:rewrote the confirmer so that it is NOT created
  660. !             dynamiclly to try to advoid the error in the
  661. !             window creation (no more file descriptors)
  662.   
  663.   
  664. ! **************************************************************************/
  665.   
  666. + #include "header.h"
  667.   /***************************************************************
  668.           confirm
  669.           purpose: To display a window on the base_frame Sunwindow
  670. ***************
  671. *** 56,164 ****
  672.           1 : if the user answered YES
  673.           0 : if the user answered NO
  674.    ***************************************************************/
  675.   int confirm(message)
  676.   char     *message; 
  677.   {
  678. !     Frame     confirmer;
  679. !     int       answer;
  680.   
  681. - /* create the confirmer */
  682. -     confirmer = init_confirmer(message);
  683. -     window_bell(panel);
  684. - /* make the user answer */
  685. -      answer = (int) window_loop(confirmer);
  686.   
  687. ! /* destroy the confirmer */
  688. !     window_set(confirmer, FRAME_NO_CONFIRM, TRUE, 0);
  689. !     window_destroy(confirmer);
  690. !         return answer;
  691.   }
  692.   
  693. - static Frame
  694. - init_confirmer(message)
  695. - char     *message; 
  696. - { 
  697. - extern   Frame  base_frame;
  698. - Frame           confirmer;
  699. - Panel           panel;
  700. - Panel_item      message_item;
  701. - int             left, top, width, height;
  702. - Rect            *r;
  703. - struct pixrect  *pr;
  704.   
  705. - /* create the confirmer base frame */
  706. -     confirmer = window_create(base_frame, FRAME, 
  707. -                                   FRAME_SHOW_LABEL, FALSE,
  708. -                   0);
  709.   
  710. ! /* create the single panel subwindow */
  711. !     panel = window_create(confirmer, PANEL, 0);
  712. ! /* put in the message */
  713. !     message_item = panel_create_item(panel, PANEL_MESSAGE,
  714. !                     PANEL_LABEL_STRING, message,
  715. !                     0);
  716. !     pr = panel_button_image(panel, "NO", 3, 0);
  717. !     width = 2 * pr->pr_width + 10;
  718. !       r = (Rect *) panel_get(message_item, PANEL_ITEM_RECT);
  719. ! /* center the yes/no buttons under the message */
  720. !     left = (r->r_width - width) / 2;
  721. !     if (left < 0)
  722. !         left = 0;
  723. !     top = rect_bottom(r) + 5;
  724. !         panel_create_item(panel, PANEL_BUTTON,
  725. !                   PANEL_ITEM_X, left,
  726. !               PANEL_ITEM_Y, top,
  727. !               PANEL_LABEL_IMAGE, pr,
  728. !               PANEL_CLIENT_DATA, FALSE,
  729. !           PANEL_NOTIFY_PROC, yes_no,
  730. !           0);
  731. !  
  732. !         panel_create_item(panel, PANEL_BUTTON,
  733. !               PANEL_LABEL_IMAGE, panel_button_image(panel, "YES", 3, 0),
  734. !               PANEL_CLIENT_DATA, TRUE,
  735. !           PANEL_NOTIFY_PROC, yes_no,
  736. !           0);
  737. !  
  738. !     window_fit(panel);
  739. !     window_fit(confirmer);
  740. ! /* center the confirmer frame in the base frame */
  741. !     r = (Rect *) window_get(base_frame, WIN_RECT);
  742. !     width = (int) window_get(confirmer, WIN_WIDTH);
  743. !     height = (int) window_get(confirmer, WIN_HEIGHT);
  744. !     left = (r->r_width - width) / 2;
  745. !     top = (r->r_height - height) / 3;
  746. !         if (left < 0) 
  747. !             left = 0; 
  748. !      if (top < 0)
  749. !         top = 0;
  750. !     window_set(confirmer, WIN_X, left, WIN_Y, top,
  751. !             0);
  752. !         left = left + (width - width/3);
  753. !         top = top + height / 2;      
  754. !     window_set(base_frame, WIN_MOUSE_XY, left, top,  0);
  755. !     return confirmer;
  756. ! }
  757. ! /* yes/no notify proc */
  758. ! static void
  759. ! yes_no(item, event)
  760.   Panel_item   item;
  761.   Event        *event;
  762.   {
  763. !     window_return(panel_get(item, PANEL_CLIENT_DATA));
  764.   }
  765. --- 51,94 ----
  766.           1 : if the user answered YES
  767.           0 : if the user answered NO
  768.    ***************************************************************/
  769. + extern Panel_item con_msg_string;
  770.   int confirm(message)
  771.   char     *message; 
  772.   {
  773. !    window_bell(panel);
  774. !    confirm_msg(message);
  775. !    return((int)window_loop(confirmer));
  776. ! }
  777.   
  778.   
  779. ! confirm_msg(string)
  780. ! char *string;
  781. ! {
  782. ! char temp_space[55];
  783. ! char *temp_pt;
  784. ! int i;
  785. !   
  786. !   if (strlen(string) < 50)
  787. !   {
  788. !     for(i=0;i<50;i++)
  789. !       temp_space[i]= ' ';
  790. !     temp_pt = temp_space + (50-strlen(string))/2;
  791. !     strcpy(temp_pt,string);
  792. !     panel_set(con_msg_string,PANEL_LABEL_STRING,temp_space,0);
  793. !   }
  794. !   else
  795. !     panel_set(con_msg_string,PANEL_LABEL_STRING,string,0);
  796.   }
  797.   
  798.   
  799.   
  800. ! /*
  801. !  * yes/no notify proc 
  802. !  */
  803. ! void yes_no(item, event)
  804.   Panel_item   item;
  805.   Event        *event;
  806.   {
  807. !         window_return(panel_get(item, PANEL_CLIENT_DATA));
  808.   }
  809. diff -c ./disk_io.c ../../Ver2.3/source/disk_io.c
  810. *** ./disk_io.c    Mon Jun 13 23:53:19 1988
  811. --- ../../Ver2.3/source/disk_io.c    Fri Jun 17 00:27:12 1988
  812. ***************
  813. *** 30,35 ****
  814. --- 30,54 ----
  815.           date:    Tue Mar 22 22:04:58 EST 1988
  816.           author:    rayk
  817.           changes:add comments
  818. +         date:    Thu Apr 21 20:14:58 EDT 1988
  819. +         author:    rayk
  820. +         changes:when you hit return in filename the caret moves
  821. +             to textstring
  822. +         date:    Thu Apr 21 20:14:58 EDT 1988
  823. +         author:    rayk
  824. +         changes:when you do a load cut/paste buffer it will
  825. +             automagicly bring up the cut/paste command menu
  826. +         date:    Wed Jun 1 1:22:18 EDT 1988
  827. +         author:    rayk
  828. +         changes:fixed bug in resize color canvases
  829. +         date:    Wed Jun 15 14:40:48 EDT 1988
  830. +         author:    rayk
  831. +         changes:added a check in file save to check is the
  832. +             current filename is a directory
  833.   **************************************************************************/
  834.   
  835.   #include "header.h"
  836. ***************
  837. *** 38,43 ****
  838. --- 57,63 ----
  839.   #include <sys/dir.h>
  840.   #include <sys/file.h>
  841.   #include <pwd.h>
  842. + #include <sys/stat.h>
  843.   
  844.   colormap_t colormap;
  845.   
  846. ***************
  847. *** 48,57 ****
  848.   Panel_item      item;
  849.   Event           *event;
  850.   {
  851. !   strcpy(file_name,(char*)panel_get_value(file_panel));
  852. !   if (complete(file_name))
  853. !       window_bell(panel);
  854. !   panel_set(file_panel,PANEL_VALUE,file_name,0);
  855.   }
  856.   
  857.   
  858. --- 68,87 ----
  859.   Panel_item      item;
  860.   Event           *event;
  861.   {
  862. !   if (item == text_panel)
  863. !     window_set(panel,PANEL_CARET_ITEM,file_panel,0);
  864. !   else
  865. !   {
  866. !       if ((char)event_id(event) == '\r')
  867. !         window_set(panel,PANEL_CARET_ITEM,text_panel,0);
  868. !       else
  869. !       {
  870. !         strcpy(file_name,(char*)panel_get_value(file_panel));
  871. !         if (complete(file_name))
  872. !             window_bell(panel);
  873. !         panel_set(file_panel,PANEL_VALUE,file_name,0);
  874. !       }
  875. !   }
  876.   }
  877.   
  878.   
  879. ***************
  880. *** 388,393 ****
  881. --- 418,428 ----
  882.          {
  883.       my_put_colormap();
  884.       set_color();
  885. + /**** new fix for color retained canvases */
  886. +         (void)window_set(canvas,
  887. +         CANVAS_WIDTH,        file_header.ras_width,
  888. +         CANVAS_HEIGHT,        file_header.ras_height,
  889. +         0);
  890.          }
  891.        else
  892.          {
  893. ***************
  894. *** 402,407 ****
  895. --- 437,446 ----
  896.        image_hgt = file_header.ras_height;
  897.        image_depth = file_header.ras_depth;
  898.        pw_write(pw,0,0, image_wid,image_hgt, PIX_SRC, undo_pr,0,0);
  899. +      sprintf(temp_file,"%d",image_hgt);
  900. +      panel_set(height_text,PANEL_VALUE,temp_file,0);
  901. +      sprintf(temp_file,"%d",image_wid);
  902. +      panel_set(width_text,PANEL_VALUE,temp_file,0);
  903.       }
  904.     else
  905.       {
  906. ***************
  907. *** 414,419 ****
  908. --- 453,464 ----
  909.               PIX_SRC,undo_pr,0,0);
  910.       MY_pr_destroy(undo_pr);
  911.       undo_pr = my_mem_create(image_wid,image_hgt,image_depth);
  912. +     panel_set(region_choice,PANEL_VALUE,MOVE,0);
  913. +     panel_set(command_choice,PANEL_VALUE,SEL_REG,0);
  914. +     (void)window_set(brush_panel, WIN_SHOW,FALSE, 0);
  915. +     (void)window_set(region_panel, WIN_SHOW,TRUE, 0);
  916. +     print_msg("Object copied to Cut/Paste buffer. Hold down the RIGHT mouse button to drag the object.");
  917. +     mouse_parms();
  918.       }
  919.   }
  920.   
  921. ***************
  922. *** 432,437 ****
  923. --- 477,483 ----
  924.   int copy_flag = TRUE;
  925.   char temp_file[MAX_FILE_NAME];
  926.   
  927. +  hide_msg();
  928.    /*
  929.     * Is the raster file to be run-length encode or not
  930.     */
  931. ***************
  932. *** 445,453 ****
  933.      */
  934.    strcpy(temp_file,(char*)panel_get_value(file_panel));
  935.    get_full_path(temp_file,file_name);
  936.    if (file_exist(file_name))
  937.       {
  938. !          if (!confirm("Over write existing file ?"))
  939.        return(0);
  940.       }
  941.    /*
  942. --- 491,506 ----
  943.      */
  944.    strcpy(temp_file,(char*)panel_get_value(file_panel));
  945.    get_full_path(temp_file,file_name);
  946. +  if (file_is_dir(file_name))
  947. +     {
  948. +          ERROR("The current filename is a directory !");
  949. +      return(0);
  950. +     }
  951.    if (file_exist(file_name))
  952.       {
  953. !          if (!confirm("Overwrite existing file ?"))
  954.        return(0);
  955.       }
  956.    /*
  957. ***************
  958. *** 461,467 ****
  959.        return(0);
  960.       }
  961.    /*
  962. !   * Save the whole drawing are out to the disk file
  963.     */
  964.    if (SAVE_ALL == (int)panel_get_value(save_cycle))
  965.      {
  966. --- 514,520 ----
  967.        return(0);
  968.       }
  969.    /*
  970. !   * Save the whole drawing area out to the disk file
  971.     */
  972.    if (SAVE_ALL == (int)panel_get_value(save_cycle))
  973.      {
  974. ***************
  975. *** 471,477 ****
  976.        save_screen();
  977.   
  978.        if (!undo_pr)
  979. !     undo_pr = my_mem_create(image_wid,image_hgt,image_depth);
  980.        pr_rop(undo_pr,0,0,image_wid,image_hgt,PIX_SRC,pw->pw_prretained,0,0);
  981.        pr_dump(undo_pr,fp,&colormap,type,copy_flag);
  982.      }
  983. --- 524,530 ----
  984.        save_screen();
  985.   
  986.        if (!undo_pr)
  987. !         undo_pr = my_mem_create(image_wid,image_hgt,image_depth);
  988.        pr_rop(undo_pr,0,0,image_wid,image_hgt,PIX_SRC,pw->pw_prretained,0,0);
  989.        pr_dump(undo_pr,fp,&colormap,type,copy_flag);
  990.      }
  991. ***************
  992. *** 505,510 ****
  993. --- 558,584 ----
  994.       return(TRUE);
  995.     else
  996.       return(FALSE);
  997. + }
  998. + /*
  999. +  * Check if the file is a directory
  1000. +  */
  1001. + file_is_dir(file_name)
  1002. + char *file_name;
  1003. + {
  1004. + struct stat buf;
  1005. +   if (file_exist(file_name))
  1006. +   {
  1007. +     stat(file_name,&buf);
  1008. +     if (buf.st_mode & S_IFDIR)
  1009. +     return(TRUE);
  1010. +     else
  1011. +     return(FALSE);
  1012. +   }
  1013. +   else
  1014. +       return(FALSE);
  1015.   }
  1016.   
  1017.   
  1018. diff -c ./drawing.c ../../Ver2.3/source/drawing.c
  1019. *** ./drawing.c    Mon Jun 13 23:53:22 1988
  1020. --- ../../Ver2.3/source/drawing.c    Fri Jun 17 00:27:15 1988
  1021. ***************
  1022. *** 30,35 ****
  1023. --- 30,63 ----
  1024.           date:    Tue Mar 22 22:04:58 EST 1988
  1025.           author:    rayk
  1026.           changes:add comments
  1027. +         date:    Fri Apr 15 02:08:11 EDT 1988
  1028. +         author:    rayk
  1029. +         changes:added scale cut/paste
  1030. +         date:    Tue Apr 19 14:05:10 EDT 1988
  1031. +         author:    rayk
  1032. +         changes:fixed no-borders on polygons
  1033. +         date:    Fri Apr 22 03:05:28 EDT 1988
  1034. +         author:    rainbow
  1035. +         changes:added FAST rotate
  1036. +         date:    Fri Apr 22 17:11:02 EDT 1988
  1037. +         author:    rayk
  1038. +         changes:added pw_batch to make things much FASTER
  1039. +         date:    Wed Jun 15 14:40:48 EDT 1988
  1040. +         author:    juang@aloft.att.com
  1041. +         changes:worked around bug in pw_stencil that
  1042. +             would not display color paint brushes properly
  1043. +             on Sun 3/160 & Sun 3/260
  1044. +         date:    Wed Jun 15 16:49:43 EDT 1988
  1045. +         author:    rayk
  1046. +         changes:added toggle to make it so that
  1047. +             lasso will clear the area that has been selected
  1048.   **************************************************************************/
  1049.   
  1050.   #include"header.h"
  1051. ***************
  1052. *** 85,109 ****
  1053.    * Take the current text string and put that Baby up on the bitmap
  1054.    * in the right font
  1055.    */
  1056. ! draw_text()
  1057.   {
  1058. ! int x,y;
  1059. !   if (select_pt_x != -1)
  1060. !     {
  1061. !       x = select_pt_x;
  1062. !       y = select_pt_y;
  1063. !       clean_point();
  1064. !       save_screen();
  1065. !       pw_text(pw,x,y,PIX_COLOR(cur_color) | PIX_SRC,font_array[(int)panel_get_value(text_size_item)],
  1066.           (char*)panel_get_value(text_panel));
  1067. -     }
  1068. -   else
  1069. -     {
  1070. -       ERROR("Select a point first, fill in TEXT STRING, then select ABC.");
  1071. -       window_set(panel,PANEL_CARET_ITEM,text_panel,0);
  1072. -       set_select_mode();
  1073. -     }
  1074.   }
  1075.   
  1076.   
  1077. --- 113,123 ----
  1078.    * Take the current text string and put that Baby up on the bitmap
  1079.    * in the right font
  1080.    */
  1081. ! draw_text(x,y,ROP)
  1082. ! int x,y,ROP;
  1083.   {
  1084. !       pw_text(pw,x,y,PIX_COLOR(cur_color) | ROP,font_array[(int)panel_get_value(text_size_item)],
  1085.           (char*)panel_get_value(text_panel));
  1086.   }
  1087.   
  1088.   
  1089. ***************
  1090. *** 123,128 ****
  1091. --- 137,144 ----
  1092.   draw_rectangle(x1,y1,x2,y2)
  1093.   int x1,y1,x2,y2;
  1094.   {
  1095. + int ROP;
  1096.     top_x = x1;
  1097.     top_y = y1;
  1098.     bottom_x = x2;
  1099. ***************
  1100. *** 131,142 ****
  1101.       fill_region();
  1102.     else
  1103.       reset_region();
  1104. !   if ((int)panel_get_value(border_cycle))
  1105.     {
  1106. !     pw_vector(pw,x1,y1,x2,y1,PIX_SRC,cur_color);
  1107. !     pw_vector(pw,x2,y1,x2,y2,PIX_SRC,cur_color);
  1108. !     pw_vector(pw,x2,y2,x1,y2,PIX_SRC,cur_color);
  1109. !     pw_vector(pw,x1,y2,x1,y1,PIX_SRC,cur_color);
  1110.     }
  1111.   }
  1112.   
  1113. --- 147,162 ----
  1114.       fill_region();
  1115.     else
  1116.       reset_region();
  1117. !   if (!(ROP = get_current_ROP()))
  1118. !       ROP = PIX_SRC;
  1119. !   if (((( (int)panel_get_value(border_cycle))
  1120. !        || (int)panel_get_value(command_choice)==RECT_H))
  1121. !        && (ROP != (PIX_XOR)))
  1122.     {
  1123. !     pw_vector(pw,x1,y1,x2,y1,ROP,cur_color);
  1124. !     pw_vector(pw,x2,y1,x2,y2,ROP,cur_color);
  1125. !     pw_vector(pw,x2,y2,x1,y2,ROP,cur_color);
  1126. !     pw_vector(pw,x1,y2,x1,y1,ROP,cur_color);
  1127.     }
  1128.   }
  1129.   
  1130. ***************
  1131. *** 187,220 ****
  1132.   struct pixwin *pw;
  1133.   int x,y;
  1134.   {
  1135.     if (brush_temp_pr == NULL)
  1136. !     brush_temp_pr = my_mem_create(PATTERN_SIZE,PATTERN_SIZE,1);
  1137.   
  1138.   
  1139.     if (((int)panel_get_value(pattern_choice) != 39) || (image_depth == 1))
  1140.     {
  1141. !     if (brush_temp_pr->pr_depth != 1)
  1142. !     {
  1143. !          MY_pr_destroy(brush_temp_pr);
  1144. !         brush_temp_pr = my_mem_create(PATTERN_SIZE,PATTERN_SIZE,1);
  1145. !     }
  1146. !     pr_replrop(brush_temp_pr,0,0,PATTERN_SIZE,PATTERN_SIZE, PIX_SRC,pattern[(int)panel_get_value(pattern_choice)],x,y);
  1147. !         pw_stencil(pw,x-PATTERN_SIZE/2,y-PATTERN_SIZE/2,PATTERN_SIZE,PATTERN_SIZE,PIX_COLOR(cur_color) | PIX_SRC,
  1148. !     brushes[(int)panel_get_value(brush_choice)],0,0,brush_temp_pr,0,0);
  1149.     }
  1150.     else
  1151.     {
  1152. !     if (brush_temp_pr->pr_depth != image_depth)
  1153. !     {
  1154. !          MY_pr_destroy(brush_temp_pr);
  1155. !         brush_temp_pr = my_mem_create(PATTERN_SIZE,PATTERN_SIZE,image_depth);
  1156. !     }
  1157. !     pr_replrop(brush_temp_pr,0,0,PATTERN_SIZE,PATTERN_SIZE, PIX_SRC,pattern[(int)panel_get_value(pattern_choice)],x,y);
  1158. !         pw_stencil(pw,x-PATTERN_SIZE/2,y-PATTERN_SIZE/2,PATTERN_SIZE,PATTERN_SIZE, PIX_SRC,
  1159. !     brushes[(int)panel_get_value(brush_choice)],0,0,brush_temp_pr,0,0);
  1160.     }
  1161.   
  1162.   }
  1163.   
  1164.   
  1165. --- 207,237 ----
  1166.   struct pixwin *pw;
  1167.   int x,y;
  1168.   {
  1169. + int ROP;
  1170. +   if (!(ROP = get_current_ROP()))
  1171. +     ROP = PIX_SRC;
  1172.     if (brush_temp_pr == NULL)
  1173. !     brush_temp_pr = my_mem_create(PATTERN_SIZE,PATTERN_SIZE,image_depth);
  1174.   
  1175. +   if (brush_temp_pr->pr_depth != image_depth)
  1176. +   {
  1177. +         MY_pr_destroy(brush_temp_pr);
  1178. +         brush_temp_pr = my_mem_create(PATTERN_SIZE,PATTERN_SIZE,image_depth);
  1179. +   }
  1180.   
  1181.     if (((int)panel_get_value(pattern_choice) != 39) || (image_depth == 1))
  1182.     {
  1183. !         pr_replrop(brush_temp_pr,0,0,PATTERN_SIZE,PATTERN_SIZE, PIX_COLOR(cur_color) | PIX_SRC,pattern[(int)panel_get_value(pattern_choice)],x,y);
  1184.     }
  1185.     else
  1186.     {
  1187. !         pr_replrop(brush_temp_pr,0,0,PATTERN_SIZE,PATTERN_SIZE, PIX_SRC,pattern[(int)panel_get_value(pattern_choice)],x,y);
  1188.     }
  1189.   
  1190. +   pw_stencil(pw,x-PATTERN_SIZE/2,y-PATTERN_SIZE/2,PATTERN_SIZE,PATTERN_SIZE,
  1191. +   ROP, brushes[(int)panel_get_value(brush_choice)],0,0,brush_temp_pr,0,0);
  1192.   }
  1193.   
  1194.   
  1195. ***************
  1196. *** 247,256 ****
  1197. --- 264,275 ----
  1198.   struct pixwin *pw;
  1199.   int x,y;
  1200.   {
  1201. +   pw_batch_on(pw);
  1202.     select_region(pw,top_x,top_y,top_x+PATTERN_SIZE,top_y+PATTERN_SIZE);
  1203.     pw_rop(pw,x-PATTERN_SIZE/2,y-PATTERN_SIZE/2,PATTERN_SIZE,PATTERN_SIZE, PIX_SRC,0,0,0);
  1204.     top_x = x-PATTERN_SIZE/2; top_y= y-PATTERN_SIZE/2;
  1205.     select_region(pw,top_x,top_y,top_x+PATTERN_SIZE,top_y+PATTERN_SIZE);
  1206. +   pw_batch_off(pw);
  1207.   }
  1208.   
  1209.   
  1210. ***************
  1211. *** 300,329 ****
  1212.   
  1213.   /*
  1214.    * take a currently selected region and rotate around the center
  1215. !  * point.  SLOW !!
  1216.    */
  1217.   rotate_region()
  1218.   {
  1219. ! register i,j,t1,t2;
  1220.   
  1221.     if (top_x || top_y || bottom_x || bottom_y)
  1222.       {
  1223.        select_region(pw,top_x,top_y,bottom_x,bottom_y);
  1224.        region_fix();
  1225. !      MY_pr_destroy(cut_buffer_pr);
  1226. !      cut_buffer_pr = my_mem_create(bottom_x-top_x,bottom_y-top_y,image_depth);
  1227. !      pr_rop(cut_buffer_pr,0,0,bottom_x-top_x,bottom_y-top_y,
  1228. !         PIX_SRC,pw->pw_prretained,top_x,top_y);
  1229. !      t1 = top_x + cut_buffer_pr->pr_size.x/2+ cut_buffer_pr->pr_size.y/2;
  1230. !      t2 = top_y - cut_buffer_pr->pr_size.x/2+ cut_buffer_pr->pr_size.y/2;
  1231. !      for (j = 0; j < cut_buffer_pr->pr_size.y; j++)
  1232. !        for (i = 0; i < cut_buffer_pr->pr_size.x; i++)
  1233. !         pw_rop(pw, t1-j, t2+i, 1,1, PIX_SRC, cut_buffer_pr,i,j);
  1234.   
  1235. !      top_x = top_x + cut_buffer_pr->pr_size.x/2 - cut_buffer_pr->pr_size.y/2;
  1236. !      top_y = top_y - cut_buffer_pr->pr_size.x/2 + cut_buffer_pr->pr_size.y/2;
  1237. !      bottom_x = top_x + cut_buffer_pr->pr_size.y;
  1238. !      bottom_y = top_y + cut_buffer_pr->pr_size.x;
  1239.        select_region(pw,top_x,top_y,bottom_x,bottom_y);
  1240.       }
  1241.     else
  1242. --- 319,365 ----
  1243.   
  1244.   /*
  1245.    * take a currently selected region and rotate around the center
  1246. !  * point.  New FAST version that rotates in 3n bitblt where n is
  1247. !  * number of raster lines in the source
  1248.    */
  1249.   rotate_region()
  1250.   {
  1251. ! int    i, width, height, new_x, new_y, y1, y2, n;
  1252. ! struct pixrect    *tmp1, *tmp2;
  1253.   
  1254.     if (top_x || top_y || bottom_x || bottom_y)
  1255.       {
  1256.        select_region(pw,top_x,top_y,bottom_x,bottom_y);
  1257.        region_fix();
  1258. !      width = bottom_x - top_x;
  1259. !      height = bottom_y - top_y;
  1260. !      new_x = top_x + (width - height) / 2;
  1261. !      new_y = top_y + (height - width ) /2;
  1262. !      tmp1 = my_mem_create(width+height-1, height, image_depth);
  1263. !      tmp2 = my_mem_create(width+height-1, width, image_depth);
  1264.   
  1265. !      for(i=0; i<height; i++)
  1266. !        pr_rop(tmp1, i, i, width, 1, PIX_SRC, pw->pw_prretained, top_x, top_y+i);
  1267. !      for(i=0; i<=width+height-1; i++)
  1268. !         {
  1269. !        n = (i+1<height) ? i+1 : ((i>=width) ? (width+height-1-i) : height);
  1270. !            y1 = (i<width) ? (width-1-i) : 0;
  1271. !            y2 = (i>=width) ? (i-width+1) : 0;
  1272. !            pr_rop(tmp2, i, y1, 1, n, PIX_SRC, tmp1, i, y2);
  1273. !         }
  1274. !      pw_batch_on(pw);
  1275. !      for(i=0; i<width; i++)
  1276. !        pw_rop(pw, new_x, new_y+i, height, 1, PIX_SRC, tmp2, width-1-i, i);
  1277. !      pw_batch_off(pw);
  1278. !      MY_pr_destroy(tmp1);
  1279. !      MY_pr_destroy(tmp2);
  1280. !      top_x = new_x;
  1281. !      top_y = new_y;
  1282. !      bottom_x = new_x+height;
  1283. !      bottom_y = new_y+width;
  1284.        select_region(pw,top_x,top_y,bottom_x,bottom_y);
  1285.       }
  1286.     else
  1287. ***************
  1288. *** 350,360 ****
  1289. --- 386,398 ----
  1290.        cut_buffer_pr = my_mem_create(bottom_x-top_x,bottom_y-top_y,image_depth);
  1291.        pr_rop(cut_buffer_pr,0,0,bottom_x-top_x,bottom_y-top_y,
  1292.           PIX_SRC,pw->pw_prretained,top_x,top_y);
  1293. +      pw_batch_on(pw);
  1294.        for (i = 0; i < cut_buffer_pr->pr_size.x; i++) {
  1295.           pw_rop(pw, top_x+(cut_buffer_pr->pr_size.x - i)-1,top_y,
  1296.               1,cut_buffer_pr->pr_size.y, PIX_SRC, cut_buffer_pr,i,0);
  1297.       }
  1298.        select_region(pw,top_x,top_y,bottom_x,bottom_y);
  1299. +      pw_batch_off(pw);
  1300.       }
  1301.     else
  1302.       {
  1303. ***************
  1304. *** 377,382 ****
  1305. --- 415,421 ----
  1306.        region_fix();
  1307.        MY_pr_destroy(cut_buffer_pr);
  1308.        cut_buffer_pr = my_mem_create(bottom_x-top_x,bottom_y-top_y,image_depth);
  1309. +      pw_batch_on(pw);
  1310.        pr_rop(cut_buffer_pr,0,0,bottom_x-top_x,bottom_y-top_y,
  1311.           PIX_SRC,pw->pw_prretained,top_x,top_y);
  1312.        for (i = 0; i < cut_buffer_pr->pr_size.y; i++) {
  1313. ***************
  1314. *** 384,389 ****
  1315. --- 423,429 ----
  1316.               cut_buffer_pr->pr_size.x, 1, PIX_SRC, cut_buffer_pr, 0, i);
  1317.       }
  1318.        select_region(pw,top_x,top_y,bottom_x,bottom_y);
  1319. +      pw_batch_off(pw);
  1320.       }
  1321.     else
  1322.       {
  1323. ***************
  1324. *** 394,406 ****
  1325.   }
  1326.   
  1327.   
  1328.   
  1329.   /*
  1330.    * grab what is in the Cut/Paste buffer and put it up on the drawing area
  1331.    */
  1332.   paste_region()
  1333.   {
  1334. ! int ROP=PIX_SRC;
  1335.   
  1336.     if (select_pt_x == -1)
  1337.        {
  1338. --- 434,490 ----
  1339.   }
  1340.   
  1341.   
  1342. + /*
  1343. +  * take a current Cut/Paste and scale it
  1344. +  */
  1345. + scale_region()
  1346. + {
  1347. + int ROP;
  1348. + float inc,count;
  1349. + register line;
  1350. + struct pixrect  *temp_pix;
  1351.   
  1352. +   if ((top_x || top_y || bottom_x || bottom_y) && cut_buffer_pr)
  1353. +     {
  1354. +      if (!(ROP = get_current_ROP()))
  1355. +     ROP = PIX_SRC;
  1356. +      select_region(pw,top_x,top_y,bottom_x,bottom_y);
  1357. +      region_fix();
  1358. +      temp_pix = my_mem_create(cut_buffer_pr->pr_size.x,bottom_y-top_y,image_depth);
  1359. +      inc = ((float)cut_buffer_pr->pr_size.y)/(float)(bottom_y-top_y);
  1360. +      for (count = 0.0,line = 0; count < cut_buffer_pr->pr_size.y ; count +=inc, line++)
  1361. +         {
  1362. +        pr_rop(temp_pix,0,line,
  1363. +          cut_buffer_pr->pr_size.x, 1, ROP, cut_buffer_pr, 0, (int)count);
  1364. +     }
  1365. +      inc = ((float)cut_buffer_pr->pr_size.x)/(float)(bottom_x-top_x);
  1366. +      pw_batch_on(pw);
  1367. +      for (count = 0.0, line = 0; count < cut_buffer_pr->pr_size.x;  count +=inc, line++)
  1368. +         {
  1369. +         pw_rop(pw,top_x + line,top_y,
  1370. +         1,temp_pix->pr_size.y, ROP,temp_pix,(int)count,0);
  1371. +     }
  1372. +      pw_batch_off(pw);
  1373. +      reset_region();
  1374. +      MY_pr_destroy(temp_pix);
  1375. +     }
  1376. +   else
  1377. +     {
  1378. +      ERROR("Select a destination region first, then select SCALE.");
  1379. +      panel_set(command_choice,PANEL_VALUE,SEL_REG,0);
  1380. +      mouse_parms();
  1381. +     }
  1382. + }
  1383.   /*
  1384.    * grab what is in the Cut/Paste buffer and put it up on the drawing area
  1385.    */
  1386.   paste_region()
  1387.   {
  1388. ! int ROP;
  1389.   
  1390.     if (select_pt_x == -1)
  1391.        {
  1392. ***************
  1393. *** 410,415 ****
  1394. --- 494,501 ----
  1395.        }
  1396.     if (cut_buffer_pr)
  1397.     {
  1398. +      if (!(ROP = get_current_ROP()))
  1399. +     ROP = PIX_SRC;
  1400.        select_point(select_pt_x,select_pt_y);
  1401.        save_screen();
  1402.        pw_write(pw,select_pt_x,select_pt_y,cut_buffer_pr->pr_size.x,cut_buffer_pr->pr_size.y, ROP, cut_buffer_pr,0,0);
  1403. ***************
  1404. *** 487,492 ****
  1405. --- 573,579 ----
  1406.   {
  1407.     if (cut_buffer_pr)
  1408.       {
  1409. +      pw_batch_on(pw);
  1410.        pw_write(pw,old_x-cut_buffer_pr->pr_size.x/2,
  1411.            old_y-cut_buffer_pr->pr_size.y/2,
  1412.            cut_buffer_pr->pr_size.x,
  1413. ***************
  1414. *** 498,503 ****
  1415. --- 585,591 ----
  1416.            cut_buffer_pr->pr_size.x,
  1417.            cut_buffer_pr->pr_size.y,
  1418.            PIX_XOR, cut_buffer_pr,0,0);
  1419. +      pw_batch_off(pw);
  1420.       }
  1421.      else
  1422.       {
  1423. ***************
  1424. *** 513,523 ****
  1425.   Panel_item      item;
  1426.   Event           *event;
  1427.   {
  1428.      if (top_x || top_y || bottom_x || bottom_y)
  1429.       {
  1430.         select_region(pw,top_x,top_y,bottom_x,bottom_y);
  1431.         region_fix();
  1432. !       pw_replrop(pw,top_x,top_y,bottom_x-top_x,bottom_y-top_y,PIX_COLOR(cur_color) | PIX_SRC,pattern[(int)panel_get_value(pattern_choice)],0,0);
  1433.         reset_region();
  1434.       }
  1435.   }
  1436. --- 601,615 ----
  1437.   Panel_item      item;
  1438.   Event           *event;
  1439.   {
  1440. + int ROP;
  1441.      if (top_x || top_y || bottom_x || bottom_y)
  1442.       {
  1443.         select_region(pw,top_x,top_y,bottom_x,bottom_y);
  1444.         region_fix();
  1445. !       if (!(ROP = get_current_ROP()))
  1446. !     ROP = PIX_SRC;
  1447. !       pw_replrop(pw,top_x,top_y,bottom_x-top_x,bottom_y-top_y,PIX_COLOR(cur_color) | ROP,pattern[(int)panel_get_value(pattern_choice)],0,0);
  1448.         reset_region();
  1449.       }
  1450.   }
  1451. ***************
  1452. *** 542,550 ****
  1453.     while ((i<MAX_PTS) && (ptlist[i++].x != -1));
  1454.     no_points = --i;
  1455.     npts[0] = no_points; 
  1456. -   pw_polygon_2(pw,0,0,1,npts,ptlist,PIX_XOR,pattern[0],0,0);
  1457. -   pw_polygon_2(pw,0,0,1,npts,ptlist,PIX_XOR,pattern[0],0,0);
  1458.   
  1459.     for (i=0;i < no_points;i++)
  1460.       {
  1461.           top_x = MIN(top_x,ptlist[i].x);
  1462. --- 634,650 ----
  1463.     while ((i<MAX_PTS) && (ptlist[i++].x != -1));
  1464.     no_points = --i;
  1465.     npts[0] = no_points; 
  1466.   
  1467. +   /*
  1468. +    * if the user booted with a '-l' option then clear the area in the lasso
  1469. +    * if not then just XOR the area in the lasso
  1470. +    */
  1471. +   if (!(int)panel_get(lasso_remove, PANEL_TOGGLE_VALUE,0))
  1472. +   {
  1473. +     pw_polygon_2(pw,0,0,1,npts,ptlist,PIX_XOR,pattern[0],0,0);
  1474. +     pw_polygon_2(pw,0,0,1,npts,ptlist,PIX_XOR,pattern[0],0,0);
  1475. +   }
  1476.     for (i=0;i < no_points;i++)
  1477.       {
  1478.           top_x = MIN(top_x,ptlist[i].x);
  1479. ***************
  1480. *** 563,568 ****
  1481. --- 663,673 ----
  1482.     MY_pr_destroy(cut_buffer_pr);
  1483.     cut_buffer_pr = my_mem_create(bottom_x-top_x,bottom_y-top_y,image_depth);
  1484.     pr_polygon_2(cut_buffer_pr,0,0,1,npts,ptlist,PIX_SRC,pw->pw_prretained,top_x,top_y);
  1485. +   if ((int)panel_get(lasso_remove, PANEL_TOGGLE_VALUE,0))
  1486. +   {
  1487. +     pw_polygon_2(pw,top_x,top_y,1,npts,ptlist,PIX_CLR,0,0,0);
  1488. +   }
  1489.     reset_region();
  1490.     print_msg("The selected area is now in the Cut/Paste buffer.");
  1491.   }
  1492. ***************
  1493. *** 582,590 ****
  1494.   int i;
  1495.   int npts[1];
  1496.   
  1497. !   found =0;
  1498.     i=0;
  1499. !   while (i<MAX_PTS && !found)
  1500.       {
  1501.         if (py_pts[i++].x == -1)
  1502.       found=TRUE;
  1503. --- 687,695 ----
  1504.   int i;
  1505.   int npts[1];
  1506.   
  1507. !   found = FALSE;
  1508.     i=0;
  1509. !   while ((i<MAX_PTS) && (!found))
  1510.       {
  1511.         if (py_pts[i++].x == -1)
  1512.       found=TRUE;
  1513. ***************
  1514. *** 631,637 ****
  1515.   
  1516.   
  1517.   /*
  1518. !  * take the list of currnet vertexs and draw up the
  1519.    * the polygon and fill it with the current paint pattern
  1520.    */
  1521.   draw_poly(py_pts)
  1522. --- 736,742 ----
  1523.   
  1524.   
  1525.   /*
  1526. !  * take the list of current vertexs and draw up the
  1527.    * the polygon and fill it with the current paint pattern
  1528.    */
  1529.   draw_poly(py_pts)
  1530. ***************
  1531. *** 639,645 ****
  1532.   {
  1533.   int npts[1];
  1534.   int found;
  1535. ! int i;
  1536.   
  1537.     if (py_pts[0].x == 0-1)
  1538.       return(0);
  1539. --- 744,750 ----
  1540.   {
  1541.   int npts[1];
  1542.   int found;
  1543. ! int i,ROP;
  1544.   
  1545.     if (py_pts[0].x == 0-1)
  1546.       return(0);
  1547. ***************
  1548. *** 656,681 ****
  1549.     npts[0] =i;
  1550.   
  1551.     /*
  1552.      * do we want this baby filled ????
  1553.      */ 
  1554.     if ((int)panel_get_value(command_choice)==POLY_F)
  1555. !        pw_polygon_2(pw,0,0,1,npts,py_pts,PIX_COLOR(cur_color) | PIX_SRC,pattern[(int)panel_get_value(pattern_choice)],0,0);
  1556.   
  1557.     /*
  1558.      * do we want to wrap the polygon up in a vector border
  1559.      */
  1560. !   if ((int)panel_get_value(border_cycle))
  1561.     {
  1562.         i=1;
  1563.         while (i<MAX_POLY && (py_pts[i].x != -1))
  1564.           {
  1565.           pw_vector(pw,py_pts[i].x,py_pts[i].y,
  1566. !                  py_pts[i-1].x,py_pts[i-1].y,PIX_SRC,cur_color);
  1567.           i++;
  1568.           }
  1569.         i--;
  1570.         pw_vector(pw,py_pts[i].x,py_pts[i].y,
  1571. !                  py_pts[0].x,py_pts[0].y,PIX_SRC,cur_color);
  1572.     }
  1573.     clean_poly();
  1574.   }
  1575. --- 761,820 ----
  1576.     npts[0] =i;
  1577.   
  1578.     /*
  1579. +    * get the current ROP for drawing or default PIX_SRC
  1580. +    */
  1581. +   if (!(ROP = get_current_ROP()))
  1582. +     ROP = PIX_SRC;
  1583. +   /*
  1584. +    * erase the orginal vectors in the poly, if filled and
  1585. +    * the no-border option is set
  1586. +    */
  1587. + /*****
  1588. +   if ((((int)panel_get_value(command_choice)==POLY_F) &&
  1589. +          ((int)panel_get_value(border_cycle) == 0)) ||
  1590. +       ((int)panel_get_value(command_choice)==POLY_H) &&
  1591. +     (ROP != PIX_SRC))
  1592. + *******/
  1593. +   {
  1594. +       i=1;
  1595. +       while (i<MAX_POLY && (py_pts[i].x != -1))
  1596. +         {
  1597. +         pw_vector(pw,py_pts[i].x,py_pts[i].y,
  1598. +                  py_pts[i-1].x,py_pts[i-1].y, PIX_XOR,1);
  1599. +         i++;
  1600. +         }
  1601. +   }
  1602. +   /*
  1603.      * do we want this baby filled ????
  1604.      */ 
  1605.     if ((int)panel_get_value(command_choice)==POLY_F)
  1606. !        {
  1607. !            if (!(ROP = get_current_ROP()))
  1608. !         ROP = PIX_SRC;
  1609.   
  1610. +        pw_polygon_2(pw,0,0,1,npts,py_pts,PIX_COLOR(cur_color) | ROP,pattern[(int)panel_get_value(pattern_choice)],0,0);
  1611. +        }
  1612.     /*
  1613.      * do we want to wrap the polygon up in a vector border
  1614. +    * but if we on unfilled-poly then always do vectors
  1615.      */
  1616. !   if (((int)panel_get_value(border_cycle)) || 
  1617. !     ((int)panel_get_value(command_choice)==POLY_H))
  1618.     {
  1619.         i=1;
  1620.         while (i<MAX_POLY && (py_pts[i].x != -1))
  1621.           {
  1622.           pw_vector(pw,py_pts[i].x,py_pts[i].y,
  1623. !                  py_pts[i-1].x,py_pts[i-1].y,PIX_COLOR(cur_color) | ROP,cur_color);
  1624.           i++;
  1625.           }
  1626.         i--;
  1627.         pw_vector(pw,py_pts[i].x,py_pts[i].y,
  1628. !                  py_pts[0].x,py_pts[0].y,PIX_COLOR(cur_color) | ROP,cur_color);
  1629.     }
  1630.     clean_poly();
  1631.   }
  1632. diff -c ./fat.c ../../Ver2.3/source/fat.c
  1633. *** ./fat.c    Mon Jun 13 23:53:24 1988
  1634. --- ../../Ver2.3/source/fat.c    Fri Jun 17 00:27:13 1988
  1635. ***************
  1636. *** 30,35 ****
  1637. --- 30,40 ----
  1638.           date:    Tue Mar 22 22:04:58 EST 1988
  1639.           author:    rayk
  1640.           changes:add comments
  1641. +         date:    Sun Jun  5 23:47:42 EDT 1988
  1642. +         author:    rayk
  1643. +         changes:fixed bug in magnify, so that it does
  1644. +             a save_screen when you go into fat_mode
  1645.   **************************************************************************/
  1646.   
  1647.   #include "header.h"
  1648. ***************
  1649. *** 57,62 ****
  1650. --- 62,68 ----
  1651.       fat_source_x = select_pt_x- (int)window_get(fat_canvas, CANVAS_WIDTH)/magnify_fac/2;
  1652.       fat_source_y = select_pt_y- (int)window_get(fat_canvas, CANVAS_HEIGHT)/magnify_fac/2;
  1653.       clean_point();
  1654. +     save_screen();
  1655.       (void)window_set(fat_frame, WIN_SHOW, TRUE, 0);
  1656.       select_fat_region();
  1657.       fat_update(0,0);
  1658. ***************
  1659. *** 137,143 ****
  1660.   {
  1661.     x = fat_source_x + x/magnify_fac;
  1662.     y = fat_source_y + y/magnify_fac;
  1663. !   update_cur_color(0,0,pw_get(pw,x,y));
  1664.   }
  1665.   
  1666.   
  1667. --- 143,150 ----
  1668.   {
  1669.     x = fat_source_x + x/magnify_fac;
  1670.     y = fat_source_y + y/magnify_fac;
  1671. !   if (pw->pw_pixrect->pr_depth > 1)
  1672. !     update_cur_color(0,0,pw_get(pw,x,y));
  1673.   }
  1674.   
  1675.   
  1676. diff -c ./ffill.c ../../Ver2.3/source/ffill.c
  1677. *** ./ffill.c    Mon Jun 13 23:53:25 1988
  1678. --- ../../Ver2.3/source/ffill.c    Fri Jun 17 00:27:15 1988
  1679. ***************
  1680. *** 76,83 ****
  1681.   ffill(x,y,n)
  1682.   int x,y,n;
  1683.   {
  1684. ! int flag;
  1685. ! register i,j,k,bx;
  1686.   
  1687.           if (window_get(canvas, WIN_EVENT_STATE, MS_RIGHT))
  1688.               return(FILL_CANCEL);
  1689. --- 76,83 ----
  1690.   ffill(x,y,n)
  1691.   int x,y,n;
  1692.   {
  1693. ! int flag,bx;
  1694. ! register i,j,k;
  1695.   
  1696.           if (window_get(canvas, WIN_EVENT_STATE, MS_RIGHT))
  1697.               return(FILL_CANCEL);
  1698. ***************
  1699. *** 91,98 ****
  1700. --- 91,141 ----
  1701.               bx = i;
  1702.           else 
  1703.               {
  1704. +             break;
  1705. +             }
  1706. +         }
  1707. +     for (j=x+1;j<image_wid;j++)
  1708. +         if (pw_get(pw,j,y)!=n)
  1709. +             bx = j;
  1710. +         else 
  1711. +              {
  1712.               pw_vector(pw,bx,y,x,y, PIX_SRC,n);
  1713.               break;
  1714. +              }
  1715. +         flag = 0;
  1716. +     for (k=i+1;k<j;k++)
  1717. +     {
  1718. +         if (pr_get(pw->pw_prretained,k,y-1)!=n)
  1719. +            flag = ffill(k-1,y-1,n);
  1720. +         if (pr_get(pw->pw_prretained,k,y+1)!=n)
  1721. +            flag = ffill(k-1,y+1,n);
  1722. +                 if (flag) break;
  1723. +     }
  1724. + return(flag);
  1725. + }
  1726. + /******************************************************
  1727. + ffill(x,y,n)
  1728. + int x,y,n;
  1729. + {
  1730. + int flag,bx;
  1731. + register i,j,k;
  1732. +         if (window_get(canvas, WIN_EVENT_STATE, MS_RIGHT))
  1733. +             return(FILL_CANCEL);
  1734. +     if (x<0 || x>=image_wid || y<0 || y>=image_hgt || pw_get(pw,x,y)==n)
  1735. +         return(0);
  1736. +     pw_put(pw,x,y,n);
  1737. +         bx = x-1;
  1738. +     for (i=x-1;i>=0;i--) {
  1739. +         if (pw_get(pw,i,y)!=n)
  1740. +             bx = i;
  1741. +         else 
  1742. +             {
  1743. +             pw_vector(pw,bx,y,x,y, PIX_SRC,n);
  1744. +             break;
  1745.               }
  1746.           }
  1747.           bx = x+1;
  1748. ***************
  1749. *** 117,119 ****
  1750. --- 160,163 ----
  1751.   return(flag);
  1752.   }
  1753.   
  1754. + **********************************************************/
  1755. diff -c ./header.h ../../Ver2.3/source/header.h
  1756. *** ./header.h    Mon Jun 13 23:51:58 1988
  1757. --- ../../Ver2.3/source/header.h    Fri Jun 17 00:25:27 1988
  1758. ***************
  1759. *** 37,43 ****
  1760.   #include <suntool/canvas.h>
  1761.   #include <suntool/walkmenu.h>
  1762.   #include <suntool/scrollbar.h>
  1763. - #include <math.h>
  1764.   #include <pixrect/pixrect_hs.h>
  1765.   
  1766.   
  1767. --- 37,42 ----
  1768. ***************
  1769. *** 67,75 ****
  1770.   #define INVERSE 2
  1771.   #define ROTATE 3
  1772.   #define COPY 4
  1773. ! #define PASTE 5
  1774.   #define MOVE 6
  1775.   #define CUT 7
  1776.   
  1777.   #define PIX_XOR PIX_SRC^PIX_DST
  1778.   #define MAX_PTS 3000
  1779. --- 66,75 ----
  1780.   #define INVERSE 2
  1781.   #define ROTATE 3
  1782.   #define COPY 4
  1783. ! #define SCALE 5
  1784.   #define MOVE 6
  1785.   #define CUT 7
  1786. + #define PASTE 8
  1787.   
  1788.   #define PIX_XOR PIX_SRC^PIX_DST
  1789.   #define MAX_PTS 3000
  1790. ***************
  1791. *** 128,133 ****
  1792. --- 128,135 ----
  1793.   extern char file_name[MAX_FILE_NAME];
  1794.   extern struct pixrect *cut_buffer_pr,*undo_pr;
  1795.   extern struct pixfont *main_font;
  1796. + extern struct pixrect *brush_temp_pr;
  1797. + extern struct pixrect *brush_temp_pr2;
  1798.   extern struct pixrect *pattern[];
  1799.   extern struct pixrect *brushes[];
  1800.   extern struct  pixfont  *font_array[];
  1801. ***************
  1802. *** 160,175 ****
  1803.   
  1804.   
  1805.   extern Frame base_frame,fat_frame,color_frame;
  1806.   extern Canvas canvas,fat_canvas,color_canvas;
  1807.   extern Pixwin *pw,*fat_pw,*color_pw;
  1808.   extern Scrollbar    vertical_sb, horizontal_sb;
  1809.   extern Panel       panel,fat_panel,color_panel,pattern_panel,
  1810.           brush_panel,region_panel,command_panel;
  1811. ! extern Panel_item magnify_cycle, command_choice,text_size_item;
  1812.   extern Panel_item  text_panel,file_panel,brush_choice,mono_cycle,save_cycle,
  1813.       msg_string,color_button,border_cycle,view_cycle,current_pattern,
  1814.           load_cycle,pattern_choice,region_choice,grid_cycle,
  1815. !         compress_cycle,undo_button;
  1816.   
  1817.   extern struct pixrect            brush1_pr,brush2_pr,brush3_pr,
  1818.                       brush4_pr,brush5_pr,brush6_pr;
  1819. --- 162,179 ----
  1820.   
  1821.   
  1822.   extern Frame base_frame,fat_frame,color_frame;
  1823. + extern Frame confirmer;
  1824.   extern Canvas canvas,fat_canvas,color_canvas;
  1825.   extern Pixwin *pw,*fat_pw,*color_pw;
  1826.   extern Scrollbar    vertical_sb, horizontal_sb;
  1827.   extern Panel       panel,fat_panel,color_panel,pattern_panel,
  1828.           brush_panel,region_panel,command_panel;
  1829. ! extern Panel_item magnify_cycle, command_choice,text_size_item,height_text,width_text;
  1830. ! extern Panel_item lasso_remove;
  1831.   extern Panel_item  text_panel,file_panel,brush_choice,mono_cycle,save_cycle,
  1832.       msg_string,color_button,border_cycle,view_cycle,current_pattern,
  1833.           load_cycle,pattern_choice,region_choice,grid_cycle,
  1834. !         compress_cycle,undo_button,ROP_cycle,yes_button,no_button;
  1835.   
  1836.   extern struct pixrect            brush1_pr,brush2_pr,brush3_pr,
  1837.                       brush4_pr,brush5_pr,brush6_pr;
  1838. ***************
  1839. *** 209,215 ****
  1840.   extern struct pixrect            reg_command1_pr,reg_command2_pr,
  1841.                       reg_command3_pr,reg_command4_pr,
  1842.                       reg_command5_pr,reg_command6_pr,
  1843. !                     reg_command7_pr,reg_command8_pr;
  1844.   
  1845.   extern char *malloc();
  1846.   extern quit();
  1847. --- 213,220 ----
  1848.   extern struct pixrect            reg_command1_pr,reg_command2_pr,
  1849.                       reg_command3_pr,reg_command4_pr,
  1850.                       reg_command5_pr,reg_command6_pr,
  1851. !                     reg_command7_pr,reg_command8_pr,
  1852. !                     reg_command9_pr;
  1853.   
  1854.   extern char *malloc();
  1855.   extern quit();
  1856. ***************
  1857. *** 234,240 ****
  1858.   extern poly_addpt();
  1859.   extern clear_screen();
  1860.   extern clean_poly();
  1861. ! extern confirmer();
  1862.   extern draw_circle();
  1863.   extern draw_oval();
  1864.   extern init_colortable();
  1865. --- 239,245 ----
  1866.   extern poly_addpt();
  1867.   extern clear_screen();
  1868.   extern clean_poly();
  1869. ! extern confirm();
  1870.   extern draw_circle();
  1871.   extern draw_oval();
  1872.   extern init_colortable();
  1873. ***************
  1874. *** 251,253 ****
  1875. --- 256,263 ----
  1876.   extern select_pattern();
  1877.   extern char *expand_file_name();
  1878.   extern make_new_name();
  1879. + extern int get_current_ROP();
  1880. + extern resize_canvas();
  1881. + extern return_true();
  1882. + extern return_false();
  1883. diff -c ./info.c ../../Ver2.3/source/info.c
  1884. *** ./info.c    Mon Jun 13 23:53:33 1988
  1885. --- ../../Ver2.3/source/info.c    Fri Jun 17 00:27:19 1988
  1886. ***************
  1887. *** 32,37 ****
  1888. --- 32,43 ----
  1889.           date:    Tue Mar 22 22:04:58 EST 1988
  1890.           author:    rayk
  1891.           changes:add comments
  1892. +         date:    Wed Jun 15 18:12:16 EDT 1988
  1893. +         author:    rayk
  1894. +         changes:changed error messages for "info" and "help"
  1895. +             suggested by ian%sq.sq.com@RELAY.CS.NET
  1896.   **************************************************************************/
  1897.   
  1898.   #include "header.h"
  1899. ***************
  1900. *** 58,64 ****
  1901.      fp = fopen(INFO_IMAGE,"r");
  1902.      if (!fp)
  1903.      {
  1904. !       ERROR("I Could not find the information file !!!!");
  1905.         view_flag = FALSE;
  1906.         fclose(fp);
  1907.         return(0);
  1908. --- 64,70 ----
  1909.      fp = fopen(INFO_IMAGE,"r");
  1910.      if (!fp)
  1911.      {
  1912. !       ERRORstr("I Could not find the information file : ",INFO_IMAGE);
  1913.         view_flag = FALSE;
  1914.         fclose(fp);
  1915.         return(0);
  1916. ***************
  1917. *** 66,72 ****
  1918.      temp_pr = (struct pixrect *)pr_load(fp,color_map);
  1919.      if (!temp_pr)
  1920.      {
  1921. !       ERROR("I Could not find the information file !!!!");
  1922.         view_flag = FALSE;
  1923.         fclose(fp);
  1924.         return(0);
  1925. --- 72,78 ----
  1926.      temp_pr = (struct pixrect *)pr_load(fp,color_map);
  1927.      if (!temp_pr)
  1928.      {
  1929. !       ERRORstr("I could not load the information file : ",INFO_IMAGE);
  1930.         view_flag = FALSE;
  1931.         fclose(fp);
  1932.         return(0);
  1933. ***************
  1934. *** 136,141 ****
  1935. --- 142,148 ----
  1936.   char *frame_label;
  1937.   {
  1938.   Rect *r;
  1939. + Pixwin *temp_pw;
  1940.   
  1941.      if (view_flag)
  1942.      {
  1943. ***************
  1944. *** 146,203 ****
  1945.       r = (Rect *) window_get(base_frame, WIN_RECT);
  1946.       view_frame = window_create(base_frame,FRAME,
  1947.           FRAME_LABEL,    frame_label,
  1948.               FRAME_SHOW_LABEL, TRUE,
  1949. -         WIN_SHOW,    TRUE,
  1950.           WIN_FONT,    main_font,
  1951. -         WIN_WIDTH,    view_pr->pr_size.x+20,
  1952. -         WIN_HEIGHT,    view_pr->pr_size.y+60,
  1953.               WIN_X,        (r->r_width - view_pr->pr_size.x+20)/2,
  1954.               WIN_Y,        (r->r_height - view_pr->pr_size.y+50)/4,
  1955.           0);
  1956.   
  1957.       view_canvas = 
  1958.           window_create(view_frame, CANVAS, 
  1959. !         WIN_CONSUME_PICK_EVENTS,    WIN_NO_EVENTS,WIN_MOUSE_BUTTONS,
  1960. !                     LOC_DRAG, LOC_WINENTER,
  1961. !                     LOC_MOVE, 
  1962. !                     0,
  1963. !         WIN_X,        0,
  1964. !         WIN_Y,        ATTR_ROW(2)+5,
  1965. !         CANVAS_WIDTH,        view_pr->pr_size.x+5,
  1966. !         CANVAS_HEIGHT,        view_pr->pr_size.y+5,
  1967. !         CANVAS_AUTO_SHRINK,        TRUE,
  1968. !         CANVAS_FIXED_IMAGE,        FALSE,
  1969. !         CANVAS_AUTO_EXPAND,        TRUE,
  1970. !         CANVAS_RETAINED,        TRUE,
  1971. !         0),
  1972.       view_pw = canvas_pixwin(view_canvas);
  1973.   
  1974.       if (view_pr->pr_depth > 1)
  1975.       {
  1976.       pw_setcmsname(view_pw, "ray kreisel");
  1977.       pw_putcolormap(view_pw, 0,256,temp_red,temp_green,temp_blue);
  1978.       }
  1979.   
  1980. -     view_panel = window_create(view_frame, PANEL,
  1981. -          PANEL_LABEL_BOLD,         TRUE,
  1982. -         WIN_FONT,    main_font,
  1983. -          WIN_X,             0,
  1984. -          WIN_Y,             3,
  1985. -          WIN_HEIGHT,         ATTR_ROW(1)+4,
  1986. -         0);
  1987. -    
  1988. -    (void)panel_create_item(view_panel, PANEL_BUTTON, 
  1989. -      PANEL_ITEM_X, ATTR_COL(0),
  1990. -      PANEL_ITEM_Y, ATTR_ROW(0),
  1991. -      PANEL_LABEL_IMAGE, panel_button_image(view_panel, "done", 5, (Pixfont *)0),
  1992. -      PANEL_NOTIFY_PROC, view_done,
  1993. -      0);
  1994.   
  1995.     /* write the image files to the canvas */
  1996.   
  1997.      pw_write(view_pw,0,0,view_pr->pr_size.x,
  1998.            view_pr->pr_size.y,PIX_SRC, view_pr,0,0);
  1999.   }   
  2000.   
  2001.   
  2002. --- 153,221 ----
  2003.       r = (Rect *) window_get(base_frame, WIN_RECT);
  2004.       view_frame = window_create(base_frame,FRAME,
  2005.           FRAME_LABEL,    frame_label,
  2006. +                 FRAME_INHERIT_COLORS,   TRUE,
  2007.               FRAME_SHOW_LABEL, TRUE,
  2008.           WIN_FONT,    main_font,
  2009.               WIN_X,        (r->r_width - view_pr->pr_size.x+20)/2,
  2010.               WIN_Y,        (r->r_height - view_pr->pr_size.y+50)/4,
  2011.           0);
  2012.   
  2013. +     view_panel = window_create(view_frame, PANEL,
  2014. +              PANEL_LABEL_BOLD,           TRUE,
  2015. +                 WIN_FONT,       main_font,
  2016. +                 0);
  2017. +    
  2018. +    (void)panel_create_item(view_panel, PANEL_BUTTON, 
  2019. +      PANEL_ITEM_X, ATTR_COL(0),
  2020. +      PANEL_ITEM_Y, ATTR_ROW(0),
  2021. +      PANEL_LABEL_IMAGE, panel_button_image(view_panel, "done", 5, (Pixfont *)0),
  2022. +      PANEL_NOTIFY_PROC, view_done,
  2023. +      0);
  2024. +     window_fit(view_panel);
  2025.       view_canvas = 
  2026.           window_create(view_frame, CANVAS, 
  2027. !             WIN_CONSUME_PICK_EVENTS,    WIN_NO_EVENTS,WIN_MOUSE_BUTTONS,
  2028. !                                         LOC_DRAG, LOC_WINENTER,
  2029. !                                         LOC_MOVE, 
  2030. !                                         0,
  2031. !                 WIN_X,          0,
  2032. !                 WIN_BELOW,      view_panel,
  2033. !             WIN_WIDTH,          view_pr->pr_size.x,
  2034. !             WIN_HEIGHT,         view_pr->pr_size.y,
  2035. !             CANVAS_WIDTH,               view_pr->pr_size.x,
  2036. !             CANVAS_HEIGHT,              view_pr->pr_size.y,
  2037. !             CANVAS_AUTO_SHRINK,         FALSE,
  2038. !             CANVAS_FIXED_IMAGE,         TRUE,
  2039. !             CANVAS_AUTO_EXPAND,         FALSE,
  2040. !             CANVAS_RETAINED,            TRUE,
  2041. !             0),
  2042. !  
  2043.       view_pw = canvas_pixwin(view_canvas);
  2044.   
  2045.       if (view_pr->pr_depth > 1)
  2046.       {
  2047.       pw_setcmsname(view_pw, "ray kreisel");
  2048.       pw_putcolormap(view_pw, 0,256,temp_red,temp_green,temp_blue);
  2049. +       temp_pw = (Pixwin *)window_get(view_frame, WIN_PIXWIN);
  2050. +       pw_setcmsname(temp_pw, "ray kreisel");
  2051. +       pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
  2052. +       temp_pw = (Pixwin *)window_get(view_panel, WIN_PIXWIN);
  2053. +       pw_setcmsname(temp_pw, "ray kreisel");
  2054. +       pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
  2055.       }
  2056.   
  2057.   
  2058.     /* write the image files to the canvas */
  2059.   
  2060.      pw_write(view_pw,0,0,view_pr->pr_size.x,
  2061.            view_pr->pr_size.y,PIX_SRC, view_pr,0,0);
  2062. +    window_fit(view_frame);
  2063. +    window_set(view_frame, WIN_SHOW, TRUE, 0);
  2064.   }   
  2065.   
  2066.   
  2067. ***************
  2068. *** 211,217 ****
  2069.   
  2070.      if (!file_exist(HELP_FILE))
  2071.      {
  2072. !       ERROR("I cannot find the man page for touchup !!!");
  2073.         return(0);
  2074.      }
  2075.   
  2076. --- 229,235 ----
  2077.   
  2078.      if (!file_exist(HELP_FILE))
  2079.      {
  2080. !       ERRORstr("I cannot find the man page for touchup : ",HELP_FILE);
  2081.         return(0);
  2082.      }
  2083.   
  2084. ***************
  2085. *** 231,237 ****
  2086.       view_frame = window_create(base_frame,FRAME,
  2087.           FRAME_LABEL,    "Help window",
  2088.               FRAME_SHOW_LABEL, TRUE,
  2089. -         WIN_SHOW,    TRUE,
  2090.           WIN_FONT,    main_font,
  2091.               WIN_X,        (r->r_width - 600+20)/2,
  2092.               WIN_Y,        (r->r_height - 512+50)/4,
  2093. --- 249,254 ----
  2094. ***************
  2095. *** 258,264 ****
  2096.                   WIN_X,                  0,
  2097.           WIN_Y,            ATTR_ROW(2)+5,
  2098.                   WIN_HEIGHT,             512,
  2099. !                 WIN_WIDTH,              600,
  2100.           TEXTSW_FONT,        main_font,
  2101.                   TEXTSW_IGNORE_LIMIT,    TEXTSW_INFINITY,
  2102.                   TEXTSW_AUTO_INDENT,     TRUE,
  2103. --- 275,281 ----
  2104.                   WIN_X,                  0,
  2105.           WIN_Y,            ATTR_ROW(2)+5,
  2106.                   WIN_HEIGHT,             512,
  2107. !                 WIN_WIDTH,              620,
  2108.           TEXTSW_FONT,        main_font,
  2109.                   TEXTSW_IGNORE_LIMIT,    TEXTSW_INFINITY,
  2110.                   TEXTSW_AUTO_INDENT,     TRUE,
  2111. ***************
  2112. *** 269,274 ****
  2113. --- 286,292 ----
  2114.                   0);
  2115.   
  2116.     window_fit(view_frame);
  2117. +   window_set(view_frame, WIN_SHOW, TRUE, 0);
  2118.   }   
  2119.   
  2120.   
  2121.  
  2122.