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

  1. diff -c ./interface.c ../../Ver2.3/source/interface.c
  2. *** ./interface.c    Mon Jun 13 23:53:36 1988
  3. --- ../../Ver2.3/source/interface.c    Fri Jun 17 00:27:22 1988
  4. ***************
  5. *** 29,65 ****
  6.           date:    Tue Mar 22 22:04:58 EST 1988
  7.           author:    rayk
  8.           changes:add comments
  9.   **************************************************************************/
  10.   
  11.   #include"header.h"
  12.   Cursor fat_cursor;
  13.   
  14.   static short icon_data[] = {
  15.   #include "touchup.icon"
  16.   };
  17.   static mpr_static(touchup_pr, 64, 64, 1, icon_data);
  18.   
  19. - static short cursor_data[] = {
  20. - #include "fat_cursor"
  21. - };
  22. - static mpr_static(my_fat_cursor, 16, 16, 1, cursor_data);
  23.   
  24. !     Frame base_frame,fat_frame,color_frame,command_frame;
  25.       Canvas canvas,fat_canvas,color_canvas;
  26.       Pixwin *pw,*fat_pw,*color_pw;
  27. - static Scrollbar    vertical_sb, horizontal_sb;
  28.       Panel       panel,fat_panel,color_panel,pattern_panel,
  29.           brush_panel,region_panel,command_panel;
  30. !     Panel_item magnify_cycle,grid_cycle,view_cycle;
  31.       Panel_item  file_panel,brush_choice,mono_cycle,save_cycle,border_cycle,
  32.           msg_string,color_button,text_panel,current_pattern,
  33.           load_cycle,pattern_choice,command_choice,region_choice,
  34. !         compress_cycle,text_size_item,undo_button;
  35.   
  36.      struct pixrect *pattern[PATTERN_NO];
  37.      struct pixrect *brushes[BRUSH_NO];
  38. --- 29,65 ----
  39.           date:    Tue Mar 22 22:04:58 EST 1988
  40.           author:    rayk
  41.           changes:add comments
  42. +         date:    Fri Apr 15 01:18:05 EDT 1988
  43. +         author:    rayk
  44. +         changes:added scroll by line to drawing area
  45.   **************************************************************************/
  46.   
  47.   #include"header.h"
  48. ! extern void yes_no();
  49.   Cursor fat_cursor;
  50.   
  51.   static short icon_data[] = {
  52.   #include "touchup.icon"
  53.   };
  54.   static mpr_static(touchup_pr, 64, 64, 1, icon_data);
  55.   
  56.   
  57. !     Frame base_frame,fat_frame,color_frame;
  58. !     Frame confirmer;
  59.       Canvas canvas,fat_canvas,color_canvas;
  60.       Pixwin *pw,*fat_pw,*color_pw;
  61.       Panel       panel,fat_panel,color_panel,pattern_panel,
  62.           brush_panel,region_panel,command_panel;
  63. !     Panel_item magnify_cycle,grid_cycle,view_cycle,ROP_cycle;
  64.       Panel_item  file_panel,brush_choice,mono_cycle,save_cycle,border_cycle,
  65.           msg_string,color_button,text_panel,current_pattern,
  66.           load_cycle,pattern_choice,command_choice,region_choice,
  67. !         compress_cycle,text_size_item,undo_button,width_text,
  68. !         height_text,resize_button,yes_button,no_button,
  69. !         lasso_remove;
  70. !    Panel    con_panel;
  71. !    Panel_item con_msg_string;
  72.   
  73.      struct pixrect *pattern[PATTERN_NO];
  74.      struct pixrect *brushes[BRUSH_NO];
  75. ***************
  76. *** 68,104 ****
  77.   /*
  78.    * Build all of the window that we need for touchup
  79.    */
  80. ! init_windows(argc,argv) int argc; char *argv[];
  81.   {
  82.   
  83.       base_frame = window_create(NULL,FRAME,
  84. !         FRAME_ARGS,    argc,argv,
  85. !         FRAME_LABEL,    "TouchUp version 2.2",
  86.           FRAME_ICON,        icon_create(ICON_IMAGE, &touchup_pr, 0),
  87.           FRAME_INHERIT_COLORS,  TRUE,
  88.           WIN_FONT,    main_font,
  89.           WIN_WIDTH,    1030,
  90. !         WIN_HEIGHT,    675+ATTR_ROW(10),
  91.           WIN_X,        10,
  92.           WIN_Y,        10,
  93.           0);
  94.       panel = window_create(base_frame, PANEL,
  95.            PANEL_LABEL_BOLD,         TRUE,
  96.            WIN_FONT,              main_font,
  97.            WIN_X,             0,
  98.            WIN_Y,             3,
  99. !          WIN_HEIGHT,         ATTR_ROW(5),
  100.           0);
  101.   
  102.   
  103. -     vertical_sb = scrollbar_create((char*)0);
  104. -     horizontal_sb = scrollbar_create((char*)0);
  105.       canvas = 
  106.           window_create(base_frame, CANVAS, 
  107. !         WIN_VERTICAL_SCROLLBAR,    vertical_sb,
  108. !         WIN_HORIZONTAL_SCROLLBAR,    horizontal_sb,
  109.           WIN_CONSUME_PICK_EVENTS,    WIN_NO_EVENTS,WIN_MOUSE_BUTTONS,
  110.                       LOC_DRAG,
  111.                       LOC_MOVE, 
  112. --- 68,104 ----
  113.   /*
  114.    * Build all of the window that we need for touchup
  115.    */
  116. ! init_windows(argcp,argvp) int *argcp; char **argvp;
  117.   {
  118.   
  119.       base_frame = window_create(NULL,FRAME,
  120. !         FRAME_LABEL,    "TouchUp version 2.3",
  121.           FRAME_ICON,        icon_create(ICON_IMAGE, &touchup_pr, 0),
  122. +         FRAME_ARGC_PTR_ARGV,    argcp,argvp,
  123.           FRAME_INHERIT_COLORS,  TRUE,
  124.           WIN_FONT,    main_font,
  125.           WIN_WIDTH,    1030,
  126. !         WIN_HEIGHT,    675+ATTR_ROW(11),
  127.           WIN_X,        10,
  128.           WIN_Y,        10,
  129.           0);
  130.       panel = window_create(base_frame, PANEL,
  131. + /*         WIN_VERTICAL_SCROLLBAR,     scrollbar_create(SCROLL_LINE_HEIGHT,20,0), */
  132.            PANEL_LABEL_BOLD,         TRUE,
  133.            WIN_FONT,              main_font,
  134.            WIN_X,             0,
  135.            WIN_Y,             3,
  136. ! /*         PANEL_PAINT,         PANEL_NO_CLEAR, */
  137. !          WIN_HEIGHT,         ATTR_ROW(6),
  138. !           PANEL_HEIGHT,         ATTR_ROW(11),
  139.           0);
  140.   
  141.   
  142.       canvas = 
  143.           window_create(base_frame, CANVAS, 
  144. !         WIN_VERTICAL_SCROLLBAR,    scrollbar_create(SCROLL_LINE_HEIGHT,20,0),
  145. !         WIN_HORIZONTAL_SCROLLBAR,    scrollbar_create(SCROLL_LINE_HEIGHT,20,0),
  146.           WIN_CONSUME_PICK_EVENTS,    WIN_NO_EVENTS,WIN_MOUSE_BUTTONS,
  147.                       LOC_DRAG,
  148.                       LOC_MOVE, 
  149. ***************
  150. *** 107,117 ****
  151.           WIN_WIDTH,            780,
  152.   /*        WIN_HEIGHT,             650, */
  153.           WIN_X,            PATTERN_SIZE*2+70,
  154. !         WIN_Y,            ATTR_ROW(7)+12,
  155.           CANVAS_AUTO_SHRINK,        FALSE,
  156.           CANVAS_AUTO_EXPAND,        FALSE,
  157.           CANVAS_FIXED_IMAGE,        FALSE,
  158. !         CANVAS_RETAINED,        TRUE,
  159.           CANVAS_WIDTH,        image_wid,
  160.           CANVAS_HEIGHT,        image_hgt,
  161.           WIN_BELOW,            panel,
  162. --- 107,117 ----
  163.           WIN_WIDTH,            780,
  164.   /*        WIN_HEIGHT,             650, */
  165.           WIN_X,            PATTERN_SIZE*2+70,
  166. !         WIN_Y,            ATTR_ROW(8)+12,
  167.           CANVAS_AUTO_SHRINK,        FALSE,
  168.           CANVAS_AUTO_EXPAND,        FALSE,
  169.           CANVAS_FIXED_IMAGE,        FALSE,
  170. !         CANVAS_RETAINED,        FALSE,
  171.           CANVAS_WIDTH,        image_wid,
  172.           CANVAS_HEIGHT,        image_hgt,
  173.           WIN_BELOW,            panel,
  174. ***************
  175. *** 124,131 ****
  176.       command_panel = window_create(base_frame, PANEL,
  177.            WIN_FONT,            main_font,
  178.   /*         WIN_X,             1000-(COMMAND_SIZE*2+32), */
  179. !          WIN_Y,             ATTR_ROW(6)+12,
  180.            WIN_WIDTH,             COMMAND_SIZE*2+5,
  181.            WIN_HEIGHT,         COMMAND_SIZE*COMMAND_NO/2+9,
  182.            WIN_RIGHT_OF,         canvas,
  183.            WIN_BELOW,             panel,
  184. --- 124,132 ----
  185.       command_panel = window_create(base_frame, PANEL,
  186.            WIN_FONT,            main_font,
  187.   /*         WIN_X,             1000-(COMMAND_SIZE*2+32), */
  188. !          WIN_Y,             ATTR_ROW(7)+12,
  189.            WIN_WIDTH,             COMMAND_SIZE*2+5,
  190.            WIN_HEIGHT,         COMMAND_SIZE*COMMAND_NO/2+9,
  191.            WIN_RIGHT_OF,         canvas,
  192.            WIN_BELOW,             panel,
  193. ***************
  194. *** 171,177 ****
  195.            WIN_FONT,            main_font,
  196.            WIN_SHOW,            TRUE,
  197.            WIN_X,             1000-(COMMAND_SIZE*2+32),
  198. !          WIN_Y,             COMMAND_SIZE*COMMAND_NO/2+9+ATTR_ROW(6)+14,
  199.            WIN_WIDTH,             COMMAND_SIZE*2+5,
  200.   /*         WIN_HEIGHT,         COMMAND_SIZE*4+15, */
  201.            WIN_BELOW,             command_panel,
  202. --- 172,178 ----
  203.            WIN_FONT,            main_font,
  204.            WIN_SHOW,            TRUE,
  205.            WIN_X,             1000-(COMMAND_SIZE*2+32),
  206. !          WIN_Y,             COMMAND_SIZE*COMMAND_NO/2+9+ATTR_ROW(7)+14,
  207.            WIN_WIDTH,             COMMAND_SIZE*2+5,
  208.   /*         WIN_HEIGHT,         COMMAND_SIZE*4+15, */
  209.            WIN_BELOW,             command_panel,
  210. ***************
  211. *** 223,229 ****
  212.            WIN_FONT,            main_font,
  213.            WIN_SHOW,            FALSE,
  214.            WIN_X,             1000-(COMMAND_SIZE*2+32),
  215. !          WIN_Y,             COMMAND_SIZE*COMMAND_NO/2+9+ATTR_ROW(6)+14,
  216.            WIN_WIDTH,             COMMAND_SIZE*2+5,
  217.   /*         WIN_HEIGHT,         COMMAND_SIZE*4+4, */
  218.            WIN_BELOW,             command_panel,
  219. --- 224,230 ----
  220.            WIN_FONT,            main_font,
  221.            WIN_SHOW,            FALSE,
  222.            WIN_X,             1000-(COMMAND_SIZE*2+32),
  223. !          WIN_Y,             COMMAND_SIZE*COMMAND_NO/2+9+ATTR_ROW(7)+14,
  224.            WIN_WIDTH,             COMMAND_SIZE*2+5,
  225.   /*         WIN_HEIGHT,         COMMAND_SIZE*4+4, */
  226.            WIN_BELOW,             command_panel,
  227. ***************
  228. *** 234,240 ****
  229.            PANEL_LABEL_BOLD,         TRUE,
  230.            PANEL_SHOW_MENU,         FALSE,
  231.            PANEL_LAYOUT,        PANEL_VERTICAL,
  232. !          PANEL_VALUE,         5,
  233.            PANEL_LABEL_X,        10,
  234.            PANEL_LABEL_Y,        4,
  235.            PANEL_DISPLAY_LEVEL,    PANEL_ALL,
  236. --- 235,241 ----
  237.            PANEL_LABEL_BOLD,         TRUE,
  238.            PANEL_SHOW_MENU,         FALSE,
  239.            PANEL_LAYOUT,        PANEL_VERTICAL,
  240. !          PANEL_VALUE,         PASTE,
  241.            PANEL_LABEL_X,        10,
  242.            PANEL_LABEL_Y,        4,
  243.            PANEL_DISPLAY_LEVEL,    PANEL_ALL,
  244. ***************
  245. *** 241,250 ****
  246.            PANEL_FEEDBACK,        PANEL_INVERTED,
  247.            PANEL_CHOICE_IMAGES,    ®_command2_pr,®_command3_pr,
  248.                       ®_command4_pr,®_command7_pr,
  249. !                     ®_command5_pr,®_command6_pr,
  250.                       ®_command8_pr,®_command1_pr,
  251.                       0,
  252. !          PANEL_CHOICE_XS,        1,51,1,51,1,51,1,51,
  253.                       0,
  254.            
  255.            PANEL_CHOICE_YS,        1,1,
  256. --- 242,252 ----
  257.            PANEL_FEEDBACK,        PANEL_INVERTED,
  258.            PANEL_CHOICE_IMAGES,    ®_command2_pr,®_command3_pr,
  259.                       ®_command4_pr,®_command7_pr,
  260. !                     ®_command5_pr,®_command9_pr,
  261.                       ®_command8_pr,®_command1_pr,
  262. +                     ®_command6_pr,
  263.                       0,
  264. !          PANEL_CHOICE_XS,        1,51,1,51,1,51,1,51,51,
  265.                       0,
  266.            
  267.            PANEL_CHOICE_YS,        1,1,
  268. ***************
  269. *** 251,256 ****
  270. --- 253,259 ----
  271.                       50,50,
  272.                       99,99,
  273.                       148,148,
  274. +                     197,
  275.                       0,
  276.            PANEL_NOTIFY_PROC,     region_handle,
  277.            0);
  278. ***************
  279. *** 259,265 ****
  280.       pattern_panel = window_create(base_frame, PANEL,
  281.            WIN_FONT,            main_font,
  282.            WIN_X,             0,
  283. !          WIN_Y,            ATTR_ROW(6)+12,
  284.             WIN_BELOW,            panel,
  285.            WIN_WIDTH,             PATTERN_SIZE*2+65,
  286.   /*         WIN_HEIGHT,         PATTERN_SIZE*PATTERN_NO/2+22, */
  287. --- 262,268 ----
  288.       pattern_panel = window_create(base_frame, PANEL,
  289.            WIN_FONT,            main_font,
  290.            WIN_X,             0,
  291. !          WIN_Y,            ATTR_ROW(7)+12,
  292.             WIN_BELOW,            panel,
  293.            WIN_WIDTH,             PATTERN_SIZE*2+65,
  294.   /*         WIN_HEIGHT,         PATTERN_SIZE*PATTERN_NO/2+22, */
  295. ***************
  296. *** 363,371 ****
  297.        PANEL_LABEL_IMAGE, &pattern1_pr,
  298.        0);
  299.   
  300. !     color_frame = window_create(base_frame,FRAME,
  301.           FRAME_LABEL,    "Color Pallet",
  302.               FRAME_SHOW_LABEL, TRUE,
  303.           WIN_FONT,    main_font,
  304.           WIN_WIDTH,    PALET_BLOCK*16+9,
  305.           WIN_HEIGHT,    PALET_BLOCK*(16+3)+20+ATTR_ROW(2),
  306. --- 366,378 ----
  307.        PANEL_LABEL_IMAGE, &pattern1_pr,
  308.        0);
  309.   
  310. !   image_depth = pw->pw_pixrect->pr_depth;
  311. !   if (image_depth > 1)
  312. !     {
  313. !          color_frame = window_create(base_frame,FRAME,
  314.           FRAME_LABEL,    "Color Pallet",
  315.               FRAME_SHOW_LABEL, TRUE,
  316. +         FRAME_INHERIT_COLORS,  TRUE,
  317.           WIN_FONT,    main_font,
  318.           WIN_WIDTH,    PALET_BLOCK*16+9,
  319.           WIN_HEIGHT,    PALET_BLOCK*(16+3)+20+ATTR_ROW(2),
  320. ***************
  321. *** 373,383 ****
  322.           WIN_Y,        10,
  323.           0);
  324.   
  325. !     color_canvas = 
  326. !         window_create(color_frame, CANVAS, 
  327. !         WIN_CONSUME_PICK_EVENTS,    WIN_NO_EVENTS, WIN_MOUSE_BUTTONS,
  328. !                     LOC_DRAG,
  329. !                     LOC_MOVE, 
  330.                       0,
  331.           WIN_EVENT_PROC,         color_handle_event,
  332.           WIN_X,        0,
  333. --- 380,388 ----
  334.           WIN_Y,        10,
  335.           0);
  336.   
  337. !           color_canvas = 
  338. !             window_create(color_frame, CANVAS, 
  339. !         WIN_CONSUME_PICK_EVENTS,     WIN_NO_EVENTS,WIN_MOUSE_BUTTONS,
  340.                       0,
  341.           WIN_EVENT_PROC,         color_handle_event,
  342.           WIN_X,        0,
  343. ***************
  344. *** 391,399 ****
  345.           CANVAS_RESIZE_PROC,        draw_colormap,
  346.           0),
  347.   
  348. !     color_pw = canvas_pixwin(color_canvas);
  349.   
  350. !     color_panel = window_create(color_frame, PANEL,
  351.            PANEL_LABEL_BOLD,         TRUE,
  352.           WIN_FONT,    main_font,
  353.            WIN_X,             0,
  354. --- 396,404 ----
  355.           CANVAS_RESIZE_PROC,        draw_colormap,
  356.           0),
  357.   
  358. !         color_pw = canvas_pixwin(color_canvas);
  359.   
  360. !         color_panel = window_create(color_frame, PANEL,
  361.            PANEL_LABEL_BOLD,         TRUE,
  362.           WIN_FONT,    main_font,
  363.            WIN_X,             0,
  364. ***************
  365. *** 403,422 ****
  366.           0);
  367.   
  368.   
  369. !    (void)panel_create_item(color_panel, PANEL_BUTTON, 
  370. !      PANEL_ITEM_X, ATTR_COL(0),
  371. !      PANEL_ITEM_Y, ATTR_ROW(0),
  372. !      PANEL_LABEL_IMAGE, panel_button_image(color_panel, "done", 5, (Pixfont *)0),
  373. !      PANEL_NOTIFY_PROC, color_done,
  374. !      0);
  375.   
  376.   
  377.      
  378.       fat_frame = window_create(base_frame,FRAME,
  379.           FRAME_LABEL,    "Big bits",
  380.               FRAME_SHOW_LABEL, TRUE,
  381. !         WIN_CURSOR,    cursor_create(CURSOR_IMAGE, &my_fat_cursor,0),
  382.           WIN_FONT,    main_font,
  383.           WIN_WIDTH,    ATTR_COL(31),
  384.           WIN_HEIGHT,    ATTR_ROW(24),
  385. --- 408,427 ----
  386.           0);
  387.   
  388.   
  389. !        (void)panel_create_item(color_panel, PANEL_BUTTON, 
  390. !          PANEL_ITEM_X, ATTR_COL(0),
  391. !          PANEL_ITEM_Y, ATTR_ROW(0),
  392. !          PANEL_LABEL_IMAGE, panel_button_image(color_panel, "done", 5, (Pixfont *)0),
  393. !          PANEL_NOTIFY_PROC, color_done,
  394. !          0);
  395. !     }
  396.   
  397.   
  398.      
  399.       fat_frame = window_create(base_frame,FRAME,
  400.           FRAME_LABEL,    "Big bits",
  401.               FRAME_SHOW_LABEL, TRUE,
  402. !         FRAME_INHERIT_COLORS,  TRUE,
  403.           WIN_FONT,    main_font,
  404.           WIN_WIDTH,    ATTR_COL(31),
  405.           WIN_HEIGHT,    ATTR_ROW(24),
  406. ***************
  407. *** 430,436 ****
  408.                       LOC_DRAG,
  409.                       LOC_MOVE, 
  410.                       0,
  411. -         WIN_CURSOR,            cursor_create(CURSOR_IMAGE, &my_fat_cursor,0),
  412.           WIN_EVENT_PROC,         fat_handle_event,
  413.           WIN_X,        0,
  414.           WIN_Y,        ATTR_ROW(2)+5,
  415. --- 435,440 ----
  416. ***************
  417. *** 527,533 ****
  418.           PANEL_ITEM_X, ATTR_COL(53),
  419.           PANEL_ITEM_Y, ATTR_ROW(1),
  420.           PANEL_LABEL_STRING, "Save:",
  421. !         PANEL_CHOICE_STRINGS, "Standard format","Compressed",0,
  422.           PANEL_VALUE, 0,
  423.           0);
  424.   
  425. --- 531,537 ----
  426.           PANEL_ITEM_X, ATTR_COL(53),
  427.           PANEL_ITEM_Y, ATTR_ROW(1),
  428.           PANEL_LABEL_STRING, "Save:",
  429. !         PANEL_CHOICE_STRINGS, "Standard format","Byte_Encoded",0,
  430.           PANEL_VALUE, 0,
  431.           0);
  432.   
  433. ***************
  434. *** 545,550 ****
  435. --- 549,564 ----
  436.        PANEL_NOTIFY_PROC, undo_screen,
  437.        0);
  438.   
  439. +     ROP_cycle =
  440. +     panel_create_item(panel, PANEL_CYCLE,
  441. +         PANEL_ITEM_X, ATTR_COL(0),
  442. +         PANEL_ITEM_Y, ATTR_ROW(3),
  443. +         PANEL_LABEL_STRING, "Bitmap OP:",
  444. +         PANEL_CHOICE_STRINGS, "default","XOR","AND","OR","SRC",0,
  445. +         PANEL_VALUE, grid_size,
  446. +         PANEL_NOTIFY_PROC, change_parms,
  447. +         0);
  448.       grid_cycle =
  449.       panel_create_item(panel, PANEL_CYCLE,
  450.           PANEL_ITEM_X, ATTR_COL(8),
  451. ***************
  452. *** 571,581 ****
  453.        PANEL_VALUE_DISPLAY_LENGTH, 35,
  454.        PANEL_LABEL_STRING, "Filename:",
  455.        PANEL_NOTIFY_PROC, make_new_name,
  456. !      PANEL_NOTIFY_STRING, "\033",
  457.        PANEL_VALUE_STORED_LENGTH, MAX_FILE_NAME,
  458.        PANEL_SHOW_MENU, FALSE,
  459.        0);
  460.   
  461.      text_panel=panel_create_item(panel, PANEL_TEXT, 
  462.        PANEL_ITEM_X, ATTR_COL(80),
  463.        PANEL_ITEM_Y, ATTR_ROW(1),
  464. --- 585,604 ----
  465.        PANEL_VALUE_DISPLAY_LENGTH, 35,
  466.        PANEL_LABEL_STRING, "Filename:",
  467.        PANEL_NOTIFY_PROC, make_new_name,
  468. !      PANEL_NOTIFY_STRING, "\033\r",
  469.        PANEL_VALUE_STORED_LENGTH, MAX_FILE_NAME,
  470.        PANEL_SHOW_MENU, FALSE,
  471.        0);
  472.   
  473. +    lasso_remove=panel_create_item(panel, PANEL_TOGGLE, 
  474. +      PANEL_ITEM_X, ATTR_COL(111),
  475. +      PANEL_ITEM_Y, ATTR_ROW(2),
  476. +      PANEL_SHOW_MENU, FALSE,
  477. +      PANEL_LABEL_STRING, "lasso clear:",
  478. +      PANEL_CHOICE_STRINGS, "",0,
  479. +      PANEL_TOGGLE_VALUE, 0, TRUE,
  480. +      0);
  481.      text_panel=panel_create_item(panel, PANEL_TEXT, 
  482.        PANEL_ITEM_X, ATTR_COL(80),
  483.        PANEL_ITEM_Y, ATTR_ROW(1),
  484. ***************
  485. *** 584,589 ****
  486. --- 607,614 ----
  487.        PANEL_LABEL_STRING, "Text string:",
  488.        PANEL_VALUE_STORED_LENGTH, MAX_FILE_NAME,
  489.        PANEL_SHOW_MENU, FALSE,
  490. +      PANEL_NOTIFY_PROC, make_new_name,
  491. +      PANEL_NOTIFY_STRING, "\r",
  492.        0);
  493.   
  494.   
  495. ***************
  496. *** 656,666 ****
  497.   
  498.      msg_string = panel_create_item(panel, PANEL_MESSAGE, 
  499.        PANEL_ITEM_X, ATTR_COL(0),
  500. !      PANEL_ITEM_Y, ATTR_ROW(4),
  501.        PANEL_LABEL_BOLD,    TRUE,
  502.        PANEL_LABEL_STRING, "",
  503.        0);
  504.   
  505.     fat_cursor = window_get(canvas,WIN_CURSOR);
  506.     cursor_set(fat_cursor,CURSOR_OP,PIX_SRC^PIX_DST,0);
  507.     window_set(canvas,WIN_CURSOR,fat_cursor,0);
  508. --- 681,761 ----
  509.   
  510.      msg_string = panel_create_item(panel, PANEL_MESSAGE, 
  511.        PANEL_ITEM_X, ATTR_COL(0),
  512. !      PANEL_ITEM_Y, ATTR_ROW(5),
  513.        PANEL_LABEL_BOLD,    TRUE,
  514.        PANEL_LABEL_STRING, "",
  515.        0);
  516.   
  517. + /*
  518. +  * Confirmer window
  519. +  */
  520. +    confirmer = window_create(base_frame, FRAME, 
  521. +                 WIN_WIDTH,      300,
  522. +                 WIN_HEIGHT,     150,
  523. +         WIN_SHOW,    FALSE,
  524. +         WIN_X,        1152/2 - 390/2,
  525. +         WIN_Y,        900/2 - 140/2,
  526. +                 FRAME_SHOW_LABEL, FALSE,
  527. +                                   0);
  528. +    con_panel = window_create(confirmer, PANEL,
  529. +                 WIN_WIDTH,      390,
  530. +                 WIN_HEIGHT,     60,
  531. +                                  0);
  532. +    con_msg_string = panel_create_item(con_panel, PANEL_MESSAGE,
  533. +           PANEL_ITEM_X, 0,
  534. +           PANEL_ITEM_Y, 10,
  535. +                   PANEL_LABEL_STRING, "",
  536. +                                         0);
  537. +    panel_create_item(con_panel, PANEL_BUTTON,
  538. +                   PANEL_ITEM_X, 130,
  539. +                   PANEL_ITEM_Y, 35,
  540. +                   PANEL_LABEL_IMAGE, panel_button_image(con_panel,"NO",3,0),
  541. +                   PANEL_CLIENT_DATA, FALSE,
  542. +                   PANEL_NOTIFY_PROC, yes_no,
  543. +                   0);
  544. +    panel_create_item(con_panel, PANEL_BUTTON,
  545. +                   PANEL_ITEM_X, 205,
  546. +                   PANEL_ITEM_Y, 35,
  547. +                   PANEL_LABEL_IMAGE, panel_button_image(con_panel, "YES", 3, 0),
  548. +                   PANEL_CLIENT_DATA, TRUE,
  549. +                   PANEL_NOTIFY_PROC, yes_no,
  550. +                   0);
  551. +    window_fit(confirmer);
  552. +    
  553. +    resize_button = panel_create_item(panel, PANEL_BUTTON, 
  554. +      PANEL_ITEM_X, ATTR_COL(30),
  555. +      PANEL_ITEM_Y, ATTR_ROW(3),
  556. +      PANEL_LABEL_IMAGE, panel_button_image(panel, "resize", 5, (Pixfont *)0),
  557. +      PANEL_NOTIFY_PROC, resize_canvas,
  558. +      0);
  559. +    width_text=panel_create_item(panel, PANEL_TEXT, 
  560. +      PANEL_ITEM_X, ATTR_COL(39),
  561. +      PANEL_ITEM_Y, ATTR_ROW(3),
  562. +      PANEL_VALUE, "1152",
  563. +      PANEL_VALUE_DISPLAY_LENGTH, 6,
  564. +      PANEL_LABEL_STRING, "Width:",
  565. +      PANEL_VALUE_STORED_LENGTH, 6,
  566. +      PANEL_SHOW_MENU, FALSE,
  567. +      0);
  568. +    height_text=panel_create_item(panel, PANEL_TEXT, 
  569. +      PANEL_ITEM_X, ATTR_COL(53),
  570. +      PANEL_ITEM_Y, ATTR_ROW(3),
  571. +      PANEL_VALUE, "900",
  572. +      PANEL_VALUE_DISPLAY_LENGTH, 6,
  573. +      PANEL_LABEL_STRING, "Heigth:",
  574. +      PANEL_VALUE_STORED_LENGTH, 6,
  575. +      PANEL_SHOW_MENU, FALSE,
  576. +      0);
  577.     fat_cursor = window_get(canvas,WIN_CURSOR);
  578.     cursor_set(fat_cursor,CURSOR_OP,PIX_SRC^PIX_DST,0);
  579.     window_set(canvas,WIN_CURSOR,fat_cursor,0);
  580. ***************
  581. *** 670,673 ****
  582. --- 765,772 ----
  583.     window_set(fat_canvas,WIN_CURSOR,fat_cursor,0);
  584.   
  585.   }
  586.   
  587. diff -c ./oval.c ../../Ver2.3/source/oval.c
  588. *** ./oval.c    Mon Jun 13 23:53:38 1988
  589. --- ../../Ver2.3/source/oval.c    Fri Jun 17 00:27:22 1988
  590. ***************
  591. *** 37,47 ****
  592.   /*
  593.    * draw an oval by making the sides by vectors and ends by semicircles
  594.    */
  595. !      draw_oval(pw, center_x,center_y, curr_pos_x,curr_pos_y,flag)
  596.   
  597.          Pixwin            *pw;
  598.          int         center_x,center_y,curr_pos_x,curr_pos_y;
  599. !        int                flag;
  600.      
  601.        {    
  602.          struct  pr_pos     center,
  603. --- 37,47 ----
  604.   /*
  605.    * draw an oval by making the sides by vectors and ends by semicircles
  606.    */
  607. !      draw_oval(pw, center_x,center_y, curr_pos_x,curr_pos_y,ROP,flag)
  608.   
  609.          Pixwin            *pw;
  610.          int         center_x,center_y,curr_pos_x,curr_pos_y;
  611. !        int                flag,ROP;
  612.      
  613.        {    
  614.          struct  pr_pos     center,
  615. ***************
  616. *** 49,66 ****
  617.           int             x, y, radius,
  618.               error, npts,
  619.                   h_width, h_height,
  620. !             x_off, y_off,ROP;
  621.   
  622. -     if (flag)
  623. -      {
  624. -       if (image_depth > 1)
  625. -           ROP = PIX_SRC;
  626. -       else
  627. -         ROP = PIX_SET;
  628. -      }
  629. -         else
  630. -        ROP = PIX_XOR;
  631.       center.x = center_x;
  632.       center.y = center_y;
  633.       curr_pos.x = curr_pos_x;
  634. --- 49,56 ----
  635.           int             x, y, radius,
  636.               error, npts,
  637.                   h_width, h_height,
  638. !             x_off, y_off;
  639.   
  640.       center.x = center_x;
  641.       center.y = center_y;
  642.       curr_pos.x = curr_pos_x;
  643. ***************
  644. *** 119,124 ****
  645.              ptlist[npts].x=center.x-(x+x_off); ptlist[npts++].y=center.y-(y+y_off);
  646.             }
  647.             if (flag)
  648. !         my_pw_polypoint(pw,0,0,npts,ptlist,ROP);
  649.   }  /* end of function draw_oval() */
  650.   
  651. --- 109,114 ----
  652.              ptlist[npts].x=center.x-(x+x_off); ptlist[npts++].y=center.y-(y+y_off);
  653.             }
  654.             if (flag)
  655. !         my_pw_polypoint(0,0,npts,ptlist,ROP);
  656.   }  /* end of function draw_oval() */
  657.   
  658. Only in ../../Ver2.3/source: scale.cicon
  659. diff -c ./touchup.c ../../Ver2.3/source/touchup.c
  660. *** ./touchup.c    Mon Jun 13 23:53:42 1988
  661. --- ../../Ver2.3/source/touchup.c    Fri Jun 17 00:27:28 1988
  662. ***************
  663. *** 1,4 ****
  664. --- 1,5 ----
  665.   
  666.   /**************************************************************************
  667.      Touchup a bitmap graphics editor for the Sun Workstation running SunView
  668.      Copyright (c) 1988 by Raymond Kreisel
  669. ***************
  670. *** 30,35 ****
  671. --- 31,73 ----
  672.           date:    Tue Mar 22 22:04:58 EST 1988
  673.           author:    rayk
  674.           changes:add comments
  675. +         date:    Fri Apr 15 00:33:52 EDT 1988
  676. +         author:    rayk
  677. +         changes:added user definable ROPs and default ROPs
  678. +         date:    Tue Apr 19 21:45:52 EDT 1988
  679. +         author:    rayk
  680. +         changes:added LOC_TRAJECTORY for paint command so that
  681. +             it does not skip that much when you move the cursor
  682. +             quickly
  683. +         date:    Thu Apr 21 20:14:58 EDT 1988
  684. +         author:    rayk
  685. +         changes:change the interface to text, so that you can
  686. +             drag the text
  687. +         date:    Thu Apr 25 3:02:23  EDT 1988
  688. +         author:    rainbow
  689. +         changes:made "undo" so that it toggle between buffers
  690. +         date:    Mon May  2 22:18:11 EDT 1988
  691. +         author:    rayk
  692. +         changes:corrected a bug of not setting the correct
  693. +             colormap fields on boot up, bug noted by:
  694. +                mcgill-vision!amadeus!gamin
  695. +         date:    Fri Jun  3 22:13:11 EDT 1988
  696. +         author:    rayk
  697. +         changes:corrected a bug of returning the pointer
  698. +             to a pixrect in my_mem_create, bug noted by:
  699. +                weiser.pa@Xerox.com
  700. +             
  701. +         date:    Wed Jun 15 22:04:25 EDT 1988
  702. +         author:    juang@aloft.att.com
  703. +         changes:fixed SunView command line arguments that
  704. +             are passsed to the base frame
  705.   **************************************************************************/
  706.   
  707.   #include "header.h"
  708. ***************
  709. *** 43,48 ****
  710. --- 81,87 ----
  711.   int select_pt_x=0-1,select_pt_y=0-1;
  712.   int old_x=0; old_y=0;
  713.   int start_x=0; start_y=0;
  714. + int paint_first=TRUE;
  715.   char file_name[MAX_FILE_NAME];
  716.   struct pixrect *cut_buffer_pr=NULL,
  717.           *undo_pr=NULL;
  718. ***************
  719. *** 49,55 ****
  720. --- 88,145 ----
  721.   
  722.   struct pixfont *main_font=NULL;
  723.   
  724.   /*
  725. +  * this event proc will resize the canvas the size given in
  726. +  * width_text and height_text, in the EXPERT command panel
  727. +  */
  728. + resize_canvas()
  729. + {
  730. + int width, height;
  731. +   width = atoi((char*)panel_get_value(width_text));
  732. +   height = atoi((char*)panel_get_value(height_text));
  733. +   if ((width > 0) &&
  734. +      (height > 0) &&
  735. +      (width < 10000) &&
  736. +      (height < 10000))
  737. +   {
  738. +     image_wid = width;
  739. +     image_hgt = height;
  740. +         (void)window_set(canvas,
  741. +           CANVAS_WIDTH,        image_wid,
  742. +             CANVAS_HEIGHT,        image_hgt,
  743. +             0);
  744. +     if (undo_flag)
  745. +       {
  746. +          MY_pr_destroy(undo_pr);
  747. +          undo_pr = my_mem_create(image_wid,image_hgt,image_depth);
  748. +       }
  749. +   }
  750. +   else
  751. +      ERROR("Bad canvas size, either too small or too large");
  752. + }
  753. + /*
  754. +  * Get_ROP: this function will get the check user specified bitmap OP
  755. +  * sot that we know how to paint the new objects on to the bitmap
  756. +  */
  757. + int get_current_ROP()
  758. + {
  759. +   switch((int)panel_get_value(ROP_cycle)) {
  760. +      case 0 : return(0);
  761. +      case 1 : return(PIX_XOR);
  762. +      case 2 : return(PIX_SRC & PIX_DST);
  763. +      case 3 : return(PIX_SRC | PIX_DST);
  764. +      case 4 : return(PIX_SRC);
  765. +   }
  766. + }
  767. + /*
  768.    * this is the event handler for the special cut/paste command menu
  769.    */
  770.   region_handle(item, event)
  771. ***************
  772. *** 83,88 ****
  773. --- 173,181 ----
  774.       case MOVE:
  775.           print_msg("Hold down the RIGHT mouse button and drag the object.");
  776.               break;
  777. +     case SCALE:
  778. +         scale_region();
  779. +                         break;
  780.       }
  781.   
  782.   }
  783. ***************
  784. *** 96,110 ****
  785.   Event           *event;
  786.   {
  787.     hide_msg();
  788.     if ((int)panel_get_value(command_choice) != GET_PT)
  789.       {
  790.         (void)window_set(region_panel, WIN_SHOW, FALSE, 0);
  791. !       panel_set(region_choice,PANEL_VALUE,5,0);
  792.       }
  793.     (void)window_set(brush_panel, WIN_SHOW, FALSE, 0);
  794.       switch((int)panel_get_value(command_choice)) {
  795.       case TEXT:
  796. !           draw_text();
  797.               break;
  798.       case LASO:
  799.             print_msg("Hold down the LEFT mouse button and encircle a object.");
  800. --- 189,221 ----
  801.   Event           *event;
  802.   {
  803.     hide_msg();
  804. +                
  805. +   /*
  806. +    * if we were just in paint mode and we change reset the events for
  807. +    * the canvas and get rid of LOC_TRAJ
  808. +    */
  809. +   if (!paint_first)
  810. +   {
  811. +     window_set(canvas,WIN_CONSUME_PICK_EVENTS,
  812. +     WIN_NO_EVENTS,
  813. +     WIN_MOUSE_BUTTONS,
  814. +     LOC_DRAG,
  815. +     LOC_MOVE, 
  816. +     0,0);
  817. +         paint_first = TRUE;
  818. +   }
  819.     if ((int)panel_get_value(command_choice) != GET_PT)
  820.       {
  821.         (void)window_set(region_panel, WIN_SHOW, FALSE, 0);
  822. !       panel_set(region_choice,PANEL_VALUE,PASTE,0);
  823.       }
  824.     (void)window_set(brush_panel, WIN_SHOW, FALSE, 0);
  825.       switch((int)panel_get_value(command_choice)) {
  826.       case TEXT:
  827. !           print_msg("Hold down the RIGHT mouse button and drag text to proper place.");
  828. !           mouse_parms();
  829.               break;
  830.       case LASO:
  831.             print_msg("Hold down the LEFT mouse button and encircle a object.");
  832. ***************
  833. *** 128,133 ****
  834. --- 239,245 ----
  835.               break;
  836.       case FFILL:
  837.             fill_mode(item, event);
  838. +             panel_set(command_choice,PANEL_VALUE, GET_PT,0);
  839.             mouse_parms();
  840.               break;
  841.       case OVAL:
  842. ***************
  843. *** 159,164 ****
  844. --- 271,277 ----
  845.                     bottom_x = image_wid;
  846.                 bottom_y = image_hgt;
  847.                 select_region(pw,top_x,top_y,bottom_x,bottom_y);
  848. +               print_msg("Entire drawing area is now selected.");
  849.               }
  850.             else
  851.               {
  852. ***************
  853. *** 175,184 ****
  854.             if ((mouse_left == ERASE) &&  (confirm("Erase entire drawing area ?")))
  855.               {
  856.               clear_screen();
  857. -             (void)window_set(canvas,
  858. -                   CANVAS_WIDTH,        DEFAULT_IMAGE_WID,
  859. -                   CANVAS_HEIGHT,    DEFAULT_IMAGE_HGT,
  860. -                 0);
  861.               }
  862.             else
  863.                       if (top_x || top_y || bottom_x || bottom_y)
  864. --- 288,293 ----
  865. ***************
  866. *** 218,223 ****
  867. --- 327,333 ----
  868.   Panel_item      item;
  869.   Event           *event;
  870.   {
  871.     if (undo_flag)
  872.     {
  873.       clean_region();
  874. ***************
  875. *** 224,235 ****
  876.       clean_point();
  877.       clean_poly();
  878.       fat_done();
  879. !     pw_write(pw,0,0, image_wid,image_hgt, PIX_SRC, undo_pr,0,0);
  880.     }
  881.   }     
  882.   
  883.   
  884.   
  885.   /*
  886.    * clear the drawing area
  887.    */
  888. --- 334,387 ----
  889.       clean_point();
  890.       clean_poly();
  891.       fat_done();
  892. !     pw_batch_on(pw);
  893. !     pr_swap(pw,undo_pr);
  894. !     pw_batch_off(pw);
  895.     }
  896.   }     
  897.   
  898.   
  899. + /*
  900. +  * this funxtion was written by rainbow@sbcs.sunsb.edu (Hong Min)
  901. +  *
  902. +  * this function will swap the pixrect "pr2" with the pixwin "pw" by
  903. +  * coping 25 lines at a time. This is needed so that full size color
  904. +  * pixwins (1 meg of memory) can be exchanged with out the need of
  905. +  * a third buffer
  906. +  */
  907. + pr_swap(pw, pr2)
  908. +     Pixwin         *pw;
  909. +     struct pixrect     *pr2;
  910. + {
  911. +     struct pixrect        *buf;
  912. +     int     i, start, loop, rem, width, height, buf_size;
  913.   
  914. +     width = pr2->pr_size.x;
  915. +     height = pr2->pr_size.y;
  916. +     buf_size = 25;
  917. +     buf = mem_create(width, buf_size, image_depth);
  918. +     loop = height / buf_size;
  919. +     rem = height % buf_size;
  920. +     
  921. +     for(i=0; i<loop; i++)
  922. +     {
  923. +        pr_rop(buf, 0, 0, width, buf_size, PIX_SRC, pw->pw_prretained, 0, i*buf_size);
  924. +        pw_rop(pw, 0, i*buf_size, width, buf_size, PIX_SRC, pr2, 0, i*buf_size);
  925. +        pr_rop(pr2, 0, i*buf_size, width, buf_size, PIX_SRC, buf, 0, 0);
  926. +     }
  927. +     if (rem != 0)
  928. +     {
  929. +        start = (loop-1)*buf_size;
  930. +        pr_rop(buf, 0, 0, width, rem, PIX_SRC, pw->pw_prretained, 0, start);
  931. +        pw_rop(pw, 0, start, width, rem, PIX_SRC, pr2, 0, start);
  932. +        pr_rop(pr2, 0, start, width, rem, PIX_SRC, buf, 0, 0);
  933. +     }
  934. + }
  935.   /*
  936.    * clear the drawing area
  937.    */
  938. ***************
  939. *** 308,314 ****
  940. --- 460,468 ----
  941.   caddr_t arg;
  942.   {
  943.       Pixwin      *pw     = canvas_pixwin(canvas_local);
  944. +     int ROP;
  945.   
  946.       if (grid_size)
  947.        {
  948.       event_set_x(event,event_x(event) + grid_size/2 - (event_x(event)%grid_size));
  949. ***************
  950. *** 319,352 ****
  951.       {
  952.           if (event_id(event) == MS_LEFT)
  953.           {
  954. !         if ((mouse_left == RECT_H) || (mouse_left == RECT_F))
  955. !            draw_rectangle(start_x,start_y,event_x(event), event_y(event));
  956. !         if (mouse_left == LINE)
  957. !            draw_line(start_x,start_y,event_x(event), event_y(event),PIX_SRC,cur_color);
  958. !         if (mouse_left == ERASE)
  959. !              {
  960.                      select_region(pw,top_x,top_y,top_x+PATTERN_SIZE,top_y+PATTERN_SIZE);
  961.                  reset_region();
  962. !              }
  963.   
  964. !         if (mouse_left == CIRCLE)
  965. !                      {
  966. !                  draw_line(start_x,start_y,old_x,old_y,PIX_XOR,1);
  967. !                 draw_circle(pw,start_x,start_y,distance(old_x,old_y,start_x,start_y),1,PIX_SET);
  968. !              }
  969.   
  970. !         if (mouse_left == OVAL)
  971. !            draw_oval(pw,start_x,start_y,old_x,old_y,TRUE);
  972.   
  973. !                 if (fat_source_x != -1)
  974. !                    fat_update(0,0);
  975. !         if (mouse_left == GET_PT)
  976. !          {
  977.                select_pt_x = event_x(event);
  978.              select_pt_y = event_y(event);
  979. !          }
  980. !         if (mouse_left == LASO)
  981. !         {
  982.              laso_cut_paste();
  983.              panel_set(region_choice,PANEL_VALUE,MOVE,0);
  984.              panel_set(command_choice,PANEL_VALUE,SEL_REG,0);
  985. --- 473,517 ----
  986.       {
  987.           if (event_id(event) == MS_LEFT)
  988.           {
  989. !         switch(mouse_left) {
  990. !         case RECT_H :
  991. !         case RECT_F :
  992. !            draw_rectangle(start_x,start_y,event_x(event), event_y(event),ROP);
  993. !            break;
  994. !         case LINE :
  995. !            if (!(ROP = get_current_ROP()))
  996. !             ROP = PIX_SRC | PIX_DST;
  997. !            if (ROP != (PIX_XOR))
  998. !                 draw_line(start_x,start_y,event_x(event), event_y(event),ROP,cur_color);
  999. !            break;
  1000. !         case ERASE :
  1001.                      select_region(pw,top_x,top_y,top_x+PATTERN_SIZE,top_y+PATTERN_SIZE);
  1002.                  reset_region();
  1003. !            break;
  1004.   
  1005. !         case CIRCLE :
  1006. !            if (!(ROP = get_current_ROP()))
  1007. !             ROP = PIX_SRC;
  1008. !             draw_line(start_x,start_y,old_x,old_y,PIX_XOR,1);
  1009. !            draw_circle(pw,start_x,start_y,distance(old_x,old_y,start_x,start_y),ROP);
  1010. !            break;
  1011.   
  1012. !         case OVAL :
  1013. !            if (!(ROP = get_current_ROP()))
  1014. !             ROP = PIX_SRC;
  1015. !            if (ROP == (PIX_XOR))
  1016. !                 draw_oval(pw,start_x,start_y,old_x,old_y,ROP,FALSE);
  1017. !            draw_oval(pw,start_x,start_y,old_x,old_y,ROP,TRUE);
  1018. !            break;
  1019.   
  1020. !         case GET_PT :
  1021.                select_pt_x = event_x(event);
  1022.              select_pt_y = event_y(event);
  1023. !            break;
  1024. !         case LASO :
  1025.              laso_cut_paste();
  1026.              panel_set(region_choice,PANEL_VALUE,MOVE,0);
  1027.              panel_set(command_choice,PANEL_VALUE,SEL_REG,0);
  1028. ***************
  1029. *** 354,365 ****
  1030. --- 519,543 ----
  1031.                  (void)window_set(region_panel, WIN_SHOW,TRUE, 0);
  1032.              print_msg("Object copied to Cut/Paste buffer. Hold down the RIGHT mouse button to drag the object.");
  1033.              mouse_parms();
  1034. +            break;
  1035.           }
  1036. +                 if (fat_source_x != -1)
  1037. +                    fat_update(0,0);
  1038.             }
  1039.           if (event_id(event) == MS_RIGHT)
  1040.           {
  1041. +           if (mouse_left == TEXT)
  1042. +             {
  1043. +              if (!(ROP = get_current_ROP()))
  1044. +             ROP = PIX_SRC;
  1045. +              if (ROP != (PIX_XOR))
  1046. +                 draw_text(event_x(event), event_y(event),ROP);
  1047. +             }
  1048. +           else
  1049.                     if (((int)panel_get_value(region_choice) == MOVE) && (cut_buffer_pr != NULL))
  1050.               {
  1051. +                  if (!(ROP = get_current_ROP()))
  1052. +                 ROP = PIX_SRC | PIX_DST;
  1053.                    pw_write(pw,old_x- cut_buffer_pr->pr_size.x/2,
  1054.                        old_y- cut_buffer_pr->pr_size.y/2,
  1055.                        cut_buffer_pr->pr_size.x,
  1056. ***************
  1057. *** 369,375 ****
  1058.                      event_y(event)-cut_buffer_pr->pr_size.y/2,
  1059.                    cut_buffer_pr->pr_size.x,
  1060.                    cut_buffer_pr->pr_size.y,
  1061. !                  PIX_SRC | PIX_DST, cut_buffer_pr,0,0);
  1062.               }
  1063.           }
  1064.            return;
  1065. --- 547,553 ----
  1066.                      event_y(event)-cut_buffer_pr->pr_size.y/2,
  1067.                    cut_buffer_pr->pr_size.x,
  1068.                    cut_buffer_pr->pr_size.y,
  1069. !                  ROP, cut_buffer_pr,0,0);
  1070.               }
  1071.           }
  1072.            return;
  1073. ***************
  1074. *** 380,387 ****
  1075.               save_screen();
  1076.           old_x = event_x(event);
  1077.           old_y = event_y(event);
  1078. !         start_x = event_x(event);
  1079. !         start_y = event_y(event);
  1080.           switch(mouse_left) {
  1081.   
  1082.           case LINE:
  1083. --- 558,565 ----
  1084.               save_screen();
  1085.           old_x = event_x(event);
  1086.           old_y = event_y(event);
  1087. !         start_x = old_x;
  1088. !         start_y = old_y;
  1089.           switch(mouse_left) {
  1090.   
  1091.           case LINE:
  1092. ***************
  1093. *** 398,403 ****
  1094. --- 576,592 ----
  1095.                  draw_point(pw,event_x(event), event_y(event));
  1096.                  break;
  1097.           case PAINT:
  1098. +                if (paint_first)
  1099. +                {
  1100. +                  window_set(canvas,WIN_CONSUME_PICK_EVENTS,
  1101. +                     WIN_NO_EVENTS,
  1102. +                     WIN_MOUSE_BUTTONS,
  1103. +                     LOC_DRAG,
  1104. +                     LOC_MOVE, 
  1105. +                     LOC_TRAJECTORY,
  1106. +                     0,0);
  1107. +                      paint_first = FALSE;
  1108. +                }
  1109.                  draw_brush(pw, event_x(event), event_y(event));
  1110.                  break;
  1111.           case ERASE:
  1112. ***************
  1113. *** 409,415 ****
  1114.                       draw_line(start_x,start_y,old_x,old_y,PIX_XOR,1);
  1115.                  break;
  1116.           case OVAL:
  1117. !                    draw_oval(pw,start_x,start_y,old_x,old_y,FALSE);
  1118.                  break;
  1119.           case GET_PT:
  1120.                       if (select_pt_x != -1)
  1121. --- 598,604 ----
  1122.                       draw_line(start_x,start_y,old_x,old_y,PIX_XOR,1);
  1123.                  break;
  1124.           case OVAL:
  1125. !                    draw_oval(pw,start_x,start_y,old_x,old_y,PIX_XOR,FALSE);
  1126.                  break;
  1127.           case GET_PT:
  1128.                       if (select_pt_x != -1)
  1129. ***************
  1130. *** 452,457 ****
  1131. --- 641,657 ----
  1132.           }      
  1133.           break;
  1134.             case MS_RIGHT:
  1135. +         if (mouse_left== TEXT)
  1136. +             {
  1137. +                save_screen();
  1138. +                  old_x = event_x(event);
  1139. +                old_y = event_y(event);
  1140. +                if ((char*)panel_get_value(text_panel)[0] == 0)
  1141. +                    ERROR("The current TEXT STRING is empty.");
  1142. +                draw_text(old_x,old_y,PIX_XOR);
  1143. +             }
  1144. +         else
  1145.           if (((mouse_left==POLY_F) || (mouse_left ==POLY_H))
  1146.              && (poly_points[0].x != -1))
  1147.            {
  1148. ***************
  1149. *** 488,504 ****
  1150. --- 688,708 ----
  1151.               erase_brush(pw, event_x(event), event_y(event));
  1152.               break;
  1153.           case LINE:
  1154. +                pw_batch_on(pw);
  1155.                  draw_line(old_x,old_y,start_x,start_y,PIX_XOR,1);
  1156.                    old_x = event_x(event);
  1157.                  old_y = event_y(event);
  1158.                  draw_line(old_x,old_y,start_x,start_y,PIX_XOR,1);
  1159. +                pw_batch_off(pw);
  1160.               break;
  1161.           case RECT_F :
  1162.           case RECT_H :
  1163. +                pw_batch_on(pw);
  1164.                  select_region(pw,old_x,old_y,start_x,start_y);
  1165.                    old_x = event_x(event);
  1166.                  old_y = event_y(event);
  1167.                  select_region(pw,old_x,old_y,start_x,start_y);
  1168. +                pw_batch_off(pw);
  1169.               break;
  1170.           case CIRCLE:
  1171.                  draw_line(old_x,old_y,start_x,start_y,PIX_XOR,1);
  1172. ***************
  1173. *** 507,516 ****
  1174.                  draw_line(old_x,old_y,start_x,start_y,PIX_XOR,1);
  1175.               break;
  1176.           case OVAL:
  1177. !                draw_oval(pw,start_x,start_y,old_x,old_y,FALSE);
  1178.                    old_x = event_x(event);
  1179.                  old_y = event_y(event);
  1180. !                draw_oval(pw,start_x,start_y,old_x,old_y,FALSE);
  1181.               break;
  1182.           case GET_PT:
  1183.                  select_point(old_x,old_y);
  1184. --- 711,722 ----
  1185.                  draw_line(old_x,old_y,start_x,start_y,PIX_XOR,1);
  1186.               break;
  1187.           case OVAL:
  1188. !                pw_batch_on(pw);
  1189. !                draw_oval(pw,start_x,start_y,old_x,old_y,PIX_XOR,FALSE);
  1190.                    old_x = event_x(event);
  1191.                  old_y = event_y(event);
  1192. !                draw_oval(pw,start_x,start_y,old_x,old_y,PIX_XOR,FALSE);
  1193. !                pw_batch_off(pw);
  1194.               break;
  1195.           case GET_PT:
  1196.                  select_point(old_x,old_y);
  1197. ***************
  1198. *** 521,530 ****
  1199. --- 727,738 ----
  1200.                  select_point(old_x,old_y);
  1201.               break;
  1202.           case SEL_REG:
  1203. +               pw_batch_on(pw);
  1204.                 select_region(pw,top_x,top_y,bottom_x,bottom_y);
  1205.                       bottom_x = event_x(event);
  1206.                 bottom_y = event_y(event);
  1207.                  select_region(pw,top_x,top_y,bottom_x,bottom_y);
  1208. +               pw_batch_off(pw);
  1209.               break;
  1210.           case LASO:
  1211.                  laso_addpt(ptlist,event_x(event),event_y(event));
  1212. ***************
  1213. *** 541,546 ****
  1214. --- 749,764 ----
  1215.             }
  1216.               if (window_get(canvas_local, WIN_EVENT_STATE, MS_RIGHT))
  1217.           {
  1218. +         if (mouse_left == TEXT)
  1219. +              {
  1220. +                pw_batch_on(pw);
  1221. +                draw_text(old_x,old_y,PIX_XOR);
  1222. +                  old_x = event_x(event);
  1223. +                old_y = event_y(event);
  1224. +                draw_text(old_x,old_y,PIX_XOR);
  1225. +                pw_batch_off(pw);
  1226. +              }
  1227. +         else
  1228.                   if ((int)panel_get_value(region_choice) == MOVE)
  1229.               {
  1230.                 move_region(old_x,old_y,event_x(event),event_y(event));
  1231. ***************
  1232. *** 597,631 ****
  1233.    */
  1234.   main(argc,argv) int argc; char *argv[];
  1235.   {
  1236.   char *s;
  1237.   
  1238.   /*
  1239. !  * do some agr checking
  1240.    */
  1241. !      while (--argc > 0 && (*++argv)[0] == '-')
  1242. !     for (s = argv[0]+1;*s != '\0';s++)
  1243. !                 switch (*s) {
  1244. !           case 'n':
  1245. !                 undo_flag = FALSE;
  1246. !                 break;
  1247. !           case 'p':
  1248. !                 image_hgt = DEFAULT_IMAGE_WID;
  1249. !                 image_wid = DEFAULT_IMAGE_HGT;
  1250. !                 break;
  1251. !           case 'y': ++argv; argc--;
  1252. !                 image_hgt = atoi(argv[0]);
  1253. !                 break;
  1254. !           case 'x': ++argv; argc--;
  1255. !                    image_wid = atoi(argv[0]);
  1256. !                   break;
  1257. !           default:  printf("Usage: touchup [-x width] [-y height] [-n] [-p]\n");
  1258. !                 exit(0);
  1259. !         }
  1260. !   if (argc > 0)
  1261. !     {
  1262. !       printf("Usage: touchup [-x width] [-y height] [-n] [-p]\n");
  1263. !       exit(0);
  1264. !     }
  1265.   
  1266.     clean_poly();
  1267.   
  1268. --- 815,854 ----
  1269.    */
  1270.   main(argc,argv) int argc; char *argv[];
  1271.   {
  1272. + int targc;
  1273. + char **targv;
  1274.   char *s;
  1275. + char temp_str[10];
  1276. + extern colormap_t colormap;
  1277.   
  1278.   /*
  1279. !  * get the options
  1280.    */
  1281. !         targc = argc; targv = argv;
  1282. !         while (--argc > 0 && (*++argv)[0] == '-')
  1283. !                 for (s = argv[0]+1;*s != '\0';s++)
  1284. !           switch (*s) {
  1285. !                   case 'n':
  1286. !                             undo_flag = FALSE;
  1287. !                             break;
  1288. !                   case 'p':
  1289. !                             image_hgt = DEFAULT_IMAGE_WID;
  1290. !                             image_wid = DEFAULT_IMAGE_HGT;
  1291. !                             break;
  1292. !                   case 'y':
  1293. !                                 ++argv; argc--;
  1294. !                             image_hgt = atoi(argv[0]);
  1295. !                             break;
  1296. !                   case 'x':
  1297. !                                 ++argv; argc--;
  1298. !                             image_wid = atoi(argv[0]);
  1299. !                             break;
  1300. !                   default:
  1301. !                             break;
  1302. !       }
  1303. ! /*
  1304. !  * leftovers are potential window option arguments
  1305. !  */
  1306.   
  1307.     clean_poly();
  1308.   
  1309. ***************
  1310. *** 642,667 ****
  1311.     init_font();
  1312.     getcwd(file_name,MAX_FILE_NAME-2);
  1313.     strcat(file_name,"/");
  1314. !   init_windows(argc,argv);
  1315.     /*
  1316.      * are we on a color machine ????
  1317.      */
  1318.     image_depth = pw->pw_pixrect->pr_depth;
  1319. !   if (image_depth == 8)
  1320.       {
  1321.       init_colortable();
  1322.       my_put_colormap();
  1323.       set_color();
  1324.       }
  1325.     else
  1326.       set_mono();
  1327.   
  1328.     if (undo_flag)
  1329.        undo_pr = my_mem_create(image_wid,image_hgt,image_depth);
  1330.     else
  1331.        panel_set(undo_button,PANEL_SHOW_ITEM, FALSE,0);
  1332.   
  1333.     init_mag();
  1334.     window_main_loop(base_frame);
  1335.   }
  1336.   
  1337. --- 865,929 ----
  1338.     init_font();
  1339.     getcwd(file_name,MAX_FILE_NAME-2);
  1340.     strcat(file_name,"/");
  1341. !   init_windows(&targc,targv);
  1342. ! /*
  1343. !  * some sanity check for option arguments
  1344. !  */
  1345. !         while (--targc > 0 && (*++targv)[0] == '-')
  1346. !                 for (s = targv[0]+1;*s != '\0';s++)
  1347. !           switch (*s) {
  1348. !                   case 'n':
  1349. !                   case 'p':
  1350. !                             break;
  1351. !                   case 'y':
  1352. !                   case 'x':
  1353. !                                 ++targv; targc--;
  1354. !                             break;
  1355. !                   default:
  1356. !                         printf("Usage: touchup [-x width] [-y height] [-n] [-p]\n");
  1357. !                                 exit(0);
  1358. !                             break;
  1359. !       }
  1360. !   if (targc > 0)
  1361. !     {
  1362. !       printf("Usage: touchup [-x width] [-y height] [-n] [-p]\n");
  1363. !       exit(0);
  1364. !     }
  1365. !                 
  1366. !   sprintf(temp_str,"%d",image_hgt);
  1367. !   panel_set(height_text,PANEL_VALUE,temp_str,0);
  1368. !   sprintf(temp_str,"%d",image_wid);
  1369. !   panel_set(width_text,PANEL_VALUE,temp_str,0);
  1370.     /*
  1371.      * are we on a color machine ????
  1372.      */
  1373.     image_depth = pw->pw_pixrect->pr_depth;
  1374. !   if (image_depth > 1)
  1375.       {
  1376.       init_colortable();
  1377.       my_put_colormap();
  1378.       set_color();
  1379. +     colormap.map[0] = red;
  1380. +     colormap.map[1] = green;
  1381. +     colormap.map[2] = blue;
  1382. +     colormap.type = RMT_EQUAL_RGB;
  1383. +     colormap.length = 256;
  1384.       }
  1385.     else
  1386.       set_mono();
  1387.   
  1388. +   window_set(canvas, CANVAS_RETAINED, TRUE, 0);
  1389.     if (undo_flag)
  1390.        undo_pr = my_mem_create(image_wid,image_hgt,image_depth);
  1391.     else
  1392.        panel_set(undo_button,PANEL_SHOW_ITEM, FALSE,0);
  1393.   
  1394. +   brush_temp_pr = my_mem_create(PATTERN_SIZE,PATTERN_SIZE,1);
  1395.     init_mag();
  1396. +   print_msg("Press the LEFT mouse button to PAINT.");
  1397.     window_main_loop(base_frame);
  1398.   }
  1399.   
  1400. ***************
  1401. *** 775,778 ****
  1402. --- 1037,1041 ----
  1403.         printf("Not enough memory, memory allocation problems!!!\n");
  1404.         exit(0);
  1405.           }
  1406. +     return(temp_pr);  /* this is line that was missing in version 2.2 */
  1407.   }
  1408. diff -c ./touchup.man ../../Ver2.3/source/touchup.man
  1409. *** ./touchup.man    Mon Jun 13 23:52:05 1988
  1410. --- ../../Ver2.3/source/touchup.man    Fri Jun 17 00:25:36 1988
  1411. ***************
  1412. *** 1,4 ****
  1413. ! .TH Touchup 1 "26 March 1988"
  1414.   .SH NAME
  1415.   touchup \- a bitmap graphics editor for Sun raster files
  1416.   .SH SYNOPSIS
  1417. --- 1,4 ----
  1418. ! .TH TOUCHUP 1 "4 June 1988"
  1419.   .SH NAME
  1420.   touchup \- a bitmap graphics editor for Sun raster files
  1421.   .SH SYNOPSIS
  1422. ***************
  1423. *** 34,40 ****
  1424.   will require less memory.  The use of this
  1425.   option will make the color version much more
  1426.   usable, by freeing up a large amount of the memory.
  1427.   .SH COMMANDS
  1428.   .LP
  1429.   To edit a bitmap, type `\fBtouchup\fP'.  
  1430. --- 34,39 ----
  1431. ***************
  1432. *** 74,80 ****
  1433.   .IP "\fBSave:standard format\fP" 10
  1434.   When the save cycle is set to this mode the current image
  1435.   will be saved out in the standard Sun raster file format.
  1436. ! .IP "\fBSave:compress\fP" 10
  1437.   When the save cycle is set to this mode the current image 
  1438.   will be saved out in the Sun raster file
  1439.   BYTE_ENCODED format.  This will often compress the file to one half
  1440. --- 73,79 ----
  1441.   .IP "\fBSave:standard format\fP" 10
  1442.   When the save cycle is set to this mode the current image
  1443.   will be saved out in the standard Sun raster file format.
  1444. ! .IP "\fBSave:Byte_Encoded\fP" 10
  1445.   When the save cycle is set to this mode the current image 
  1446.   will be saved out in the Sun raster file
  1447.   BYTE_ENCODED format.  This will often compress the file to one half
  1448. ***************
  1449. *** 90,102 ****
  1450.   When Grid is set to some value other that "none" every bitmap operation
  1451.   will be forced to the closest grid point.  The number after Grid is the number of
  1452.   pixels between each grid point.  The actual grid is not visible.
  1453.   .IP "\fB(undo)\fP"
  1454. ! When this button pressed the last operation effecting the drawing area will be removed.
  1455.   .IP "\fB(view)\fP"
  1456.   When this button is pressed a window will be displayed containing
  1457.   one of two possible images, depending on the "view" cycle.
  1458.   .IP "\fBview:man page\fP"
  1459. ! This will set the view to the manual page entry for Touchup, so that when
  1460.   the "view" button is pressed, a window containing the manual page
  1461.   will be displayed.
  1462.   .IP "\fBview:Cut/Paste\fP"
  1463. --- 89,116 ----
  1464.   When Grid is set to some value other that "none" every bitmap operation
  1465.   will be forced to the closest grid point.  The number after Grid is the number of
  1466.   pixels between each grid point.  The actual grid is not visible.
  1467. + .IP "\fBBitmap OP: default\fP"
  1468. + The BITMAP OP setting determines what boolean operation is to be performed
  1469. + between the drawing primitive and the destination bitmap. The possible
  1470. + boolean operations are default, which uses default settings for each
  1471. + command, XOR which does a exclusive-or (invert), AND which will do
  1472. + a AND between the bits in the drawing area and the ones you are drawing,
  1473. + OR which will just set bits in the drawing area but not rest any bits,
  1474. + and SRC, which will just copy the source drawing directly on to the
  1475. + drawing area.
  1476. + For example,
  1477. + if you wanted to place white text in to a black region of the drawing area.
  1478. + You would first set BITMAP OP to XOR (exlusive or) and do the normal
  1479. + commands to place text in the drawing area.
  1480.   .IP "\fB(undo)\fP"
  1481. ! When this button pressed the last operation effecting the drawing area will be removed. If this button is pressed again, the last operation effecting the drawing area will be redisplayed.
  1482.   .IP "\fB(view)\fP"
  1483.   When this button is pressed a window will be displayed containing
  1484.   one of two possible images, depending on the "view" cycle.
  1485.   .IP "\fBview:man page\fP"
  1486. ! This will set the view to the manual page entry for
  1487. ! .IR Touchup ,
  1488. ! so that when
  1489.   the "view" button is pressed, a window containing the manual page
  1490.   will be displayed.
  1491.   .IP "\fBview:Cut/Paste\fP"
  1492. ***************
  1493. *** 104,112 ****
  1494.   the "view" button is pressed, a window with current Cut/Paste buffer
  1495.   will be displayed.
  1496.   .IP "\fBview:Touchup info\fP"
  1497. ! This will set the view to the copyright notice for touchup, so that when
  1498.   the "view" button is pressed, a window with the copyright notice
  1499.   will appear.
  1500.   .IP "\fBBorders:Yes\fP"
  1501.   This cycle determines is borders are drawn on filled reactangles
  1502.   and filled polygons.
  1503. --- 118,138 ----
  1504.   the "view" button is pressed, a window with current Cut/Paste buffer
  1505.   will be displayed.
  1506.   .IP "\fBview:Touchup info\fP"
  1507. ! This will set the view to the copyright notice for
  1508. ! .IR Touchup ,
  1509. ! so that when
  1510.   the "view" button is pressed, a window with the copyright notice
  1511.   will appear.
  1512. + .IP "\fB(resize)\fP"
  1513. + When this button is pressed the current value of the "height" and "width"
  1514. + fields will be used to resize the drawing area.  For example if you want to
  1515. + change the drawing area to a space of 512 by 512 pixels, you would simple
  1516. + select the "height" field and type in 512 and then select the "width" field
  1517. + and type 512 then press the "resize" button.
  1518. + .IP "\fBHeight: xxx\fP"
  1519. + This field displays the current height of the drawing area in pixels.
  1520. + .IP "\fBWidth: xxx\fP"
  1521. + This field displays the current width of the drawing area in pixels.
  1522.   .IP "\fBBorders:Yes\fP"
  1523.   This cycle determines is borders are drawn on filled reactangles
  1524.   and filled polygons.
  1525. ***************
  1526. *** 117,122 ****
  1527. --- 143,157 ----
  1528.   This is the string that is copied to the bitmap when the TEXT command is used.
  1529.   .IP "\fBfonts:ABC\fP"
  1530.   This cycle determines the font for the text when the TEXT command is used.
  1531. + .IP "\fBlasso clear:X\fP"
  1532. + If this option is turned on (it turned on by default),
  1533. + then when a region is selected
  1534. + with the LASSO it will first copy the region to the Cut/Paste
  1535. + buffer and then it will clear the selected region.  If you place the
  1536. + mouse on top of the box after "lasso clear" and press the LEFT mouse
  1537. + button you can toggle this
  1538. + option on and off.  When this option is turned off the region that
  1539. + selected by LASSO is not cleared.
  1540.   .IP "\fBMessages\fP"
  1541.   The bottom line of this window is a message subwindow, which displays
  1542.   messages, prompts, and warnings.
  1543. ***************
  1544. *** 140,149 ****
  1545.   mouse button.
  1546.   .IP "\fBTEXT\fP" 10
  1547.   First move to the Text string field in the topmost window and type in the
  1548. ! text that you wish to place on the bitmap.  Then use the SELECT POINT mode
  1549. ! to select a point within the drawing area.  Once both of these two things are
  1550. ! done press the TEXT command icon with "ABC" on it, and the current
  1551. ! text string will be placed on to the bitmap in the currently selected font.
  1552.   .IP "\fBMAGNIFY\fP" 10
  1553.   First use the SELECT POINT mode to select a point within the drawing area that
  1554.   you wish to look at in detail.  Then press the command icon for MAGNIFY
  1555. --- 175,185 ----
  1556.   mouse button.
  1557.   .IP "\fBTEXT\fP" 10
  1558.   First move to the Text string field in the topmost window and type in the
  1559. ! text that you wish to place on the bitmap.  Then press the TEXT command icon
  1560. ! with "ABC" on it, move the cursor to the drawing and hold down the
  1561. ! RIGHT mouse button. You can then drag the text to the desired location
  1562. ! on the drawing area, release the RIGHT button when you want to place a copy
  1563. ! of the text on to the bitmap.
  1564.   .IP "\fBMAGNIFY\fP" 10
  1565.   First use the SELECT POINT mode to select a point within the drawing area that
  1566.   you wish to look at in detail.  Then press the command icon for MAGNIFY
  1567. ***************
  1568. *** 227,233 ****
  1569.   and then release the LEFT mouse button.
  1570.   .IP "\fBOVAL\fP"
  1571.   Like \fBCIRCLE\fP except draws a oval.
  1572.   .IP "\fBPOLYGON\fP"
  1573.   Once this command is selected, move to the drawing area and press the LEFT mouse
  1574.   button when the cursor is at the first vertex of the polygon that
  1575. --- 263,268 ----
  1576. ***************
  1577. *** 257,267 ****
  1578.   .IP "\fBCOPY\fP"
  1579.   This command will place a copy of the currently selected region into the
  1580.   Cut/Paste buffer.
  1581. ! .IP "\fBPASTE\fP"
  1582. ! First use the SELECT POINT command to select the upper right hand corner
  1583. ! of where you wish to place the Cut/Paste buffer.  Then press the PASTE
  1584. ! command icon and the contents of the current Cut/Paste buffer will be copied
  1585. ! to the drawing area.
  1586.   .IP "\fBMOVE\fP"
  1587.   First use either COPY, CUT, or Load:Cut/Paste buffer to put an image into
  1588.   the current Cut/Paste buffer.  Once the MOVE command has been selected,
  1589. --- 292,306 ----
  1590.   .IP "\fBCOPY\fP"
  1591.   This command will place a copy of the currently selected region into the
  1592.   Cut/Paste buffer.
  1593. ! .IP "\fBSCALE\fP"
  1594. ! First use either COPY, CUT, or Load:Cut/Paste buffer to put an image into
  1595. ! the current Cut/Paste buffer.  Then press SELECT REGION so that you will
  1596. ! in the correct mode.  Now hold down the LEFT mouse button and select
  1597. ! the destination region for the Cut/Paste buffer.  If the size of the
  1598. ! destination region is different from the size of the original image
  1599. ! then the image will be SCALED to the fix into the destination area.
  1600. ! In this way the SCALE command can be used to enlarge, shrink, and stretch
  1601. ! images.
  1602.   .IP "\fBMOVE\fP"
  1603.   First use either COPY, CUT, or Load:Cut/Paste buffer to put an image into
  1604.   the current Cut/Paste buffer.  Once the MOVE command has been selected,
  1605. ***************
  1606. *** 269,278 ****
  1607. --- 308,328 ----
  1608.   As long as the RIGHT mouse button is held down, you can position the image
  1609.   where you like.  Then let go of the RIGHT mouse button to place a copy of
  1610.   the image on the drawing area.
  1611. + NOTE: If you are using the MOVE command with a color image you will
  1612. + probabilly want to set the "Bitmap OP" to "SRC" so that the colors are
  1613. + not messed up when the Cut/Paste buffer is copied onto the bitmap.
  1614.   .IP "\fBCUT\fP"
  1615.   This command will place a copy of the currently selected region into the
  1616.   Cut/Paste buffer and then it will fill the selected region with the
  1617.   currently selected pattern.
  1618. + .IP "\fBPASTE\fP"
  1619. + First use the SELECT POINT command to select the upper right hand corner
  1620. + of where you wish to place the Cut/Paste buffer.  Then press the PASTE
  1621. + command icon and the contents of the current Cut/Paste buffer will be copied
  1622. + to the drawing area.
  1623. + NOTE: If you are using the PASTE command with a color image you will
  1624. + probabilly want to set the "Bitmap OP" to "SRC" so that the colors are
  1625. + not messed up when the Cut/Paste buffer is copied onto the bitmap.
  1626.   .IP "5)" 5
  1627.   The last subwindow is the drawing area, which is in the center of the main
  1628.   window.
  1629. ***************
  1630. *** 282,304 ****
  1631.   Save a image out to a file and use the following Unix command to
  1632.   dump the image to a full page picture on an Apple Laser Writer or any
  1633.   other PostScript laser printer, where
  1634. ! file_name is the file name of an image created in Touchup.
  1635.   .LP
  1636.   When the picture is wider than it is high use the following command:
  1637.   
  1638. !      % pssun -s 8 10.5 -r file_name | lpr -Plw
  1639.   .LP
  1640.   When the picture is higher than it is wide use this command:
  1641.   
  1642. !      % pssun -s 8 10.5 file_name | lpr -Plw
  1643.   .LP
  1644.   When the picture is part of a document use this command:
  1645.   
  1646. !           % pssun -S 6 -l 1.5 3 file_name | lpr -Plw
  1647.   .LP
  1648.   Images can also to sent to a IMPRESS laser printers with a command
  1649.   similar to the following, where "/u5/sr/local/bin/imPf2" is the location
  1650. --- 332,351 ----
  1651.   Save a image out to a file and use the following Unix command to
  1652.   dump the image to a full page picture on an Apple Laser Writer or any
  1653.   other PostScript laser printer, where
  1654. ! file_name is the file name of an image created in
  1655. ! .IR Touchup .
  1656.   .LP
  1657.   When the picture is wider than it is high use the following command:
  1658.   
  1659. !      % pssun -s 8 10.5 -r file_name | lpr -Plw 
  1660.   .LP
  1661.   When the picture is higher than it is wide use this command:
  1662.   
  1663. !      % pssun -s 8 10.5 file_name | lpr -Plw 
  1664.   .LP
  1665.   When the picture is part of a document use this command:
  1666.   
  1667. !           % pssun -S 6 -l 1.5 3 file_name | lpr -Plw 
  1668.   .LP
  1669.   Images can also to sent to a IMPRESS laser printers with a command
  1670.   similar to the following, where "/u5/sr/local/bin/imPf2" is the location
  1671. ***************
  1672. *** 320,336 ****
  1673.   
  1674.   .IP "\fBHow do I merge two different pictures in to one picture ???\fP" 5
  1675.   .LP
  1676. ! When booting up Touchup the default drawing area is 1152 x 900,
  1677.   which is the full screen size of the Sun graphics screen.  When
  1678.   you load a new picture
  1679.   the drawing area is restricted to the size of the picture that you loaded.
  1680. ! What you need to do is start up Touchup and load the first picture
  1681.   into the Cut/Paste buffer by changing the cycle next to the load
  1682.   button from "Load: Entire image" to "Load: Cut/Paste buffer" and then
  1683.   press the load button.  The file will then be in the cut/paste
  1684.   buffer and you can PASTE it or MOVE it to where ever you like.
  1685.   Then load the second picture into the Cut/Paste buffer and PASTE that
  1686. ! picture where ever you like.
  1687.   
  1688.   
  1689.   .IP "\fBHow do I make part of a picture into an icon ???\fP" 5
  1690. --- 367,387 ----
  1691.   
  1692.   .IP "\fBHow do I merge two different pictures in to one picture ???\fP" 5
  1693.   .LP
  1694. ! When booting up
  1695. ! .IR Touchup ,
  1696. ! the default drawing area is 1152 x 900,
  1697.   which is the full screen size of the Sun graphics screen.  When
  1698.   you load a new picture
  1699.   the drawing area is restricted to the size of the picture that you loaded.
  1700. ! What you need to do is start up
  1701. ! .I Touchup
  1702. ! and load the first picture
  1703.   into the Cut/Paste buffer by changing the cycle next to the load
  1704.   button from "Load: Entire image" to "Load: Cut/Paste buffer" and then
  1705.   press the load button.  The file will then be in the cut/paste
  1706.   buffer and you can PASTE it or MOVE it to where ever you like.
  1707.   Then load the second picture into the Cut/Paste buffer and PASTE that
  1708. ! picture whereever you like.
  1709.   
  1710.   
  1711.   .IP "\fBHow do I make part of a picture into an icon ???\fP" 5
  1712. ***************
  1713. *** 338,347 ****
  1714.   .LP
  1715.   Use a program such as the "The Portable Bitmap Toolkit" by Jef
  1716.   Poskanzer(jef@lbl-rtsg.arpa)
  1717. ! This can be ftped from zap.mit.edu, I also have a copy
  1718.   rolled out on tape if you do not have access to zap.mit.edu.
  1719.   
  1720.   
  1721.   .IP "\fBHow do I convert other image format to Sun rasterfile format ???\fP" 5
  1722.   .IP "\fBHow do I convert Sun rasterfile format to other image formats ???\fP" 5
  1723.   
  1724. --- 389,414 ----
  1725.   .LP
  1726.   Use a program such as the "The Portable Bitmap Toolkit" by Jef
  1727.   Poskanzer(jef@lbl-rtsg.arpa)
  1728. ! This can be
  1729. ! .IR ftp ed
  1730. ! from zap.mit.edu, I also have a copy
  1731.   rolled out on tape if you do not have access to zap.mit.edu.
  1732.   
  1733.   
  1734. + .IP "\fBHow do I make my own paint or brush patterns ???\fP" 5
  1735. + .LP
  1736. + First find a pattern that you want to change, they are in
  1737. + standard icon format files names 'patternXX.icon'.  Then load the pattern
  1738. + file into iconedit and make any modifications (NOTE: the paint patterns
  1739. + only use the upper lefthand quarter of the drawing space in iconedit).
  1740. + After you have changed the pattern file, just type 'touch pattern.c ;
  1741. + strip_icon32x32 ; make' to recompile
  1742. + .IR Touchup .
  1743. + You can do the same thing to change the brush patterns, the brushes
  1744. + are in the files 'brushX.icon'.
  1745.   .IP "\fBHow do I convert other image format to Sun rasterfile format ???\fP" 5
  1746.   .IP "\fBHow do I convert Sun rasterfile format to other image formats ???\fP" 5
  1747.   
  1748. ***************
  1749. *** 348,358 ****
  1750.   .LP
  1751.   Use a program such as the "The Portable Bitmap Toolkit" by Jef
  1752.   Poskanzer(jef@lbl-rtsg.arpa)
  1753. ! This can be ftped from zap.mit.edu, I also have a copy
  1754.   rolled out on tape if you do not have access to zap.mit.edu.
  1755.   
  1756.   
  1757. ! .IP "\fBWhat does SAVE COMPRESSED mean ???\fP" 5
  1758.   
  1759.   .LP
  1760.   This means that the image will be saved out in the Sun rasterfile
  1761. --- 415,427 ----
  1762.   .LP
  1763.   Use a program such as the "The Portable Bitmap Toolkit" by Jef
  1764.   Poskanzer(jef@lbl-rtsg.arpa)
  1765. ! This can be
  1766. ! .IR ftp ed
  1767. ! from zap.mit.edu, I also have a copy
  1768.   rolled out on tape if you do not have access to zap.mit.edu.
  1769.   
  1770.   
  1771. ! .IP "\fBWhat does SAVE Byte_Encoded mean ???\fP" 5
  1772.   
  1773.   .LP
  1774.   This means that the image will be saved out in the Sun rasterfile
  1775. ***************
  1776. *** 373,382 ****
  1777.   .IR rasterfile (5)
  1778.   .SH BUGS
  1779.   .LP
  1780. ! Touchup has not been totally debugged for use with color images.
  1781.   .LP
  1782.   If you try to FLOOD FILL an area that has a VERY complex pattern and covers
  1783. ! a large area it is possible to over flow the stack and cause a core dump.
  1784.   .SH Author
  1785.    Ray Kreisel
  1786.    Computer Science Department
  1787. --- 442,452 ----
  1788.   .IR rasterfile (5)
  1789.   .SH BUGS
  1790.   .LP
  1791. ! .I Touchup
  1792. ! has not been totally debugged for use with color images.
  1793.   .LP
  1794.   If you try to FLOOD FILL an area that has a VERY complex pattern and covers
  1795. ! a large area it is possible to overflow the stack and cause a core dump.
  1796.   .SH Author
  1797.    Ray Kreisel
  1798.    Computer Science Department
  1799. ***************
  1800. *** 383,390 ****
  1801. --- 453,464 ----
  1802.    SUNY at Stony Brook
  1803.    Stony Brook NY 11794
  1804.   .LP
  1805. +  PLEASE send comments and bug reports to one of the following addresses:
  1806.    UUCP: {allegra, philabs, pyramid, research}!sbcs!rayk   
  1807.    ARPA-Internet: rayk@sbcs.sunysb.edu
  1808.    CSnet: rayk@suny-sb
  1809. +  (If nobody is home at any of the above addresses try:
  1810. +     S72QKRE@TOWSONVX.BITNET       )
  1811.   .LP
  1812.   "If I get home before daylight, I just might get some sleep tonight...."
  1813.