home *** CD-ROM | disk | FTP | other *** search
Text File | 1988-06-30 | 59.6 KB | 2,211 lines |
- diff -c ./INSTALL ../../Ver2.3/source/INSTALL
- *** ./INSTALL Mon Jun 13 23:52:01 1988
- --- ../../Ver2.3/source/INSTALL Fri Jun 17 00:25:31 1988
- ***************
- *** 35,38 ****
-
- If you are using Touchup on a color Sun you may want to
- use the -n option (you can read about this in the man page)
- ! so the it will run faster.
- --- 35,48 ----
-
- If you are using Touchup on a color Sun you may want to
- use the -n option (you can read about this in the man page)
- ! so that it will run faster.
- !
- ! After you have installed touchup, these are the files
- ! you must have in order to run the execuatble code:
- !
- ! touchup*
- ! info.image
- ! touchup.cat
- !
- ! The rest of the files can be removed.
- !
- diff -c ./Makefile ../../Ver2.3/source/Makefile
- *** ./Makefile Mon Jun 13 23:52:00 1988
- --- ../../Ver2.3/source/Makefile Fri Jun 17 00:25:29 1988
- ***************
- *** 1,6 ****
- ! CFLAGS = -O
- ! OPTIONS =
- ! LIBS = -lsuntool -lsunwindow -lpixrect -lm
- EXE = touchup
- OBJ = ffill.o cms_rainbow.o oval.o circle.o confirmer.o fat.o touchup.o \
- info.o fonts.o brush.o command.o color_palet.o \
- --- 1,6 ----
- ! CFLAGS = -g
- ! OPTIONS = -DSunOS_3.4
- ! LIBS = -lsuntool -lsunwindow -lpixrect
- EXE = touchup
- OBJ = ffill.o cms_rainbow.o oval.o circle.o confirmer.o fat.o touchup.o \
- info.o fonts.o brush.o command.o color_palet.o \
- ***************
- *** 20,25 ****
- --- 20,29 ----
- ################################################################
- # change these dirs if you move the files
- ################################################################
- + # next line must be hard coded if not using csh; no trailing space!
- + # remove the comment at the begining of the next line if you are
- + # not using csh and set the path to the path of the dir that touchup is in.
- + #PWD=/usr/yourlogin/src/touchup
- BASE_DIR = $(PWD)
- PATTERNS_DIR = $(BASE_DIR)
- COMMANDS_DIR = $(BASE_DIR)
- ***************
- *** 30,63 ****
-
-
- $(EXE): $(OBJ) touchup.cat
- ! cc $(CFLAGS) -o $(EXE) $(OBJ) $(OPTIONS) $(LIBS)
-
-
- -
- lint_it: $(SRC)
- lint $(SRC) $(OPTIONS) $(LIBS)
-
-
- interface.o :
- ! cc $(CFLAGS) -mc68020 -c interface.c -I$(PATTERNS_DIR)
-
- pattern.o:
- ! cc $(CFLAGS) -mc68020 -c pattern.c -I$(PATTERNS_DIR)
-
- brush.o:
- ! cc $(CFLAGS) -mc68020 -c brush.c -I$(PATTERNS_DIR)
-
- command.o:
- ! cc $(CFLAGS) -mc68020 -c command.c -I$(COMMANDS_DIR)
-
- fat.o:
- ! cc $(CFLAGS) -mc68020 -c fat.c $(OPTIONS) -DNO_FASTAN
-
- info.o:
- ! cc $(CFLAGS) -mc68020 -c info.c $(OPTIONS) -DINFO_IMAGE='"$(INFO_PICTURE)"' -DHELP_FILE='"$(MAN_PAGE)"'
-
- touchup.o:
- ! cc $(CFLAGS) -mc68020 -c touchup.c $(OPTIONS)
-
-
- touchup.cat: touchup.man
- --- 34,70 ----
-
-
- $(EXE): $(OBJ) touchup.cat
- ! $(CC) $(CFLAGS) -o $(EXE) $(OBJ) $(OPTIONS) $(LIBS)
- ! strip touchup #final version
-
-
- lint_it: $(SRC)
- lint $(SRC) $(OPTIONS) $(LIBS)
-
-
- interface.o :
- ! $(CC) $(CFLAGS) -c interface.c -I$(PATTERNS_DIR) $(OPTIONS)
-
- pattern.o:
- ! $(CC) $(CFLAGS) -c pattern.c -I$(PATTERNS_DIR) $(OPTIONS)
-
- brush.o:
- ! $(CC) $(CFLAGS) -c brush.c -I$(PATTERNS_DIR) $(OPTIONS)
-
- command.o:
- ! $(CC) $(CFLAGS) -c command.c -I$(COMMANDS_DIR) $(OPTIONS)
-
- fat.o:
- ! $(CC) $(CFLAGS) -c fat.c $(OPTIONS) -DNO_FASTAN
-
- + circle.o:
- + $(CC) $(CFLAGS) -c circle.c $(OPTIONS)
- +
- info.o:
- ! $(CC) $(CFLAGS) -c info.c $(OPTIONS) -DINFO_IMAGE='"$(INFO_PICTURE)"' -DHELP_FILE='"$(MAN_PAGE)"'
-
- touchup.o:
- ! $(CC) $(CFLAGS) -c touchup.c $(OPTIONS)
-
-
- touchup.cat: touchup.man
- ***************
- *** 66,82 ****
-
- shar:
- uuencode info.image info.image > temp_image
- ! shar -b -n1 -e6 *.h Makefile INSTALL README touchup.man \
- fixman.sed temp_image touchup.icon \
- $(SH_PATTERNS_DIR)/fat_cursor \
- $(SH_PATTERNS_DIR)/strip_icon32x32 \
- $(SH_COMMANDS_DIR)/strip_icon48x48 > touchup.shar1
- ! shar -b -n2 -e6 $(SH_COMMANDS_DIR)/*.cicon > touchup.shar2
- ! shar -b -n3 -e6 $(SH_PATTERNS_DIR)/pattern[1-2]*.icon > touchup.shar3
- ! shar -b -n4 -e6 $(SH_PATTERNS_DIR)/pattern[3-9]*.icon \
- $(SH_PATTERNS_DIR)/brush[1-9].icon > touchup.shar4
- ! shar -b -n5 -e6 [a-h]*.c > touchup.shar5
- ! shar -b -n6 -e6 [h-z]*.c > touchup.shar6
- rm -f temp_image
-
- install:
- --- 73,90 ----
-
- shar:
- uuencode info.image info.image > temp_image
- ! shar -b -n1 -e7 *.h Makefile INSTALL README touchup.man \
- fixman.sed temp_image touchup.icon \
- $(SH_PATTERNS_DIR)/fat_cursor \
- $(SH_PATTERNS_DIR)/strip_icon32x32 \
- $(SH_COMMANDS_DIR)/strip_icon48x48 > touchup.shar1
- ! shar -b -n2 -e7 $(SH_COMMANDS_DIR)/*.cicon > touchup.shar2
- ! shar -b -n3 -e7 $(SH_PATTERNS_DIR)/pattern[1-2]*.icon > touchup.shar3
- ! shar -b -n4 -e7 $(SH_PATTERNS_DIR)/pattern[3-9]*.icon \
- $(SH_PATTERNS_DIR)/brush[1-9].icon > touchup.shar4
- ! shar -b -n5 -e7 [a-d]*.c > touchup.shar5
- ! shar -b -n6 -e7 [e-n]*.c > touchup.shar6
- ! shar -b -n7 -e7 [o-z]*.c > touchup.shar7
- rm -f temp_image
-
- install:
- diff -c ./README ../../Ver2.3/source/README
- *** ./README Mon Jun 13 23:52:02 1988
- --- ../../Ver2.3/source/README Fri Jun 17 00:25:33 1988
- ***************
- *** 21,40 ****
-
- **************************************************************************/
-
- ! Be sure to read the instructions in INSTALL first.
-
- ! There in is a manual in file touchup.man
-
-
- ! After you have installed touchup these are the files
- ! you must have in order to run the execuatble code:
-
- - touchup*
- - info.image
- - touchup.cat
- -
- -
- - The rest of the files can be removed.
-
- If you are using Touchup on a color Sun you may want to
- use the -n option (you can read about this in the man page)
- --- 21,45 ----
-
- **************************************************************************/
-
- ! =====> Be sure to read the instructions in INSTALL first. <=====
-
- ! Touchup is a public domain bitmap editor for Sun workstations
- ! that is very useful for "fixing" screen dumps and doing other
- ! types of bitmap editing. Touchup is a powerful bitmap editor,
- ! a few of the capabilities are listed below:
-
- + - paint with different textures
- + - draw circles, rectangles, ovals, lines, and polygons
- + - examine and modify a region at magnification 1-20
- + - use text in many fonts
- + - flood fill an area
- + - lasso a free form region within a bitmap
- + - scale-stretch a region of a bitmap
- + - rotate a region
- + - move a region
-
- ! There in is a manual in file touchup.man
-
-
- If you are using Touchup on a color Sun you may want to
- use the -n option (you can read about this in the man page)
- diff -c ./circle.c ../../Ver2.3/source/circle.c
- *** ./circle.c Mon Jun 13 23:53:10 1988
- --- ../../Ver2.3/source/circle.c Fri Jun 17 00:27:03 1988
- ***************
- *** 25,31 ****
- /**************************************************************************
- file: circle.c
- purpose: This file contains that routines that draw circles
- ! on the screen. A UNDOCUMENTED Sunview function "pw_polypoint"
- is used to get the list of points that make the circle
- on to the screen AMAZINGLY FAST.
- The points that make up the circle are calculated with
- --- 25,31 ----
- /**************************************************************************
- file: circle.c
- purpose: This file contains that routines that draw circles
- ! on the screen. A Sunview 3.4 function "pw_polypoint"
- is used to get the list of points that make the circle
- on to the screen AMAZINGLY FAST.
- The points that make up the circle are calculated with
- ***************
- *** 35,40 ****
- --- 35,44 ----
- date: Tue Mar 22 22:04:58 EST 1988
- author: rayk
- changes:add comments
- +
- + date: Fri Apr 22 17:11:02 EDT 1988
- + author: rayk
- + changes:added pw_batching and bitops
- **************************************************************************/
-
- #include "header.h"
- ***************
- *** 74,79 ****
- --- 78,88 ----
- else
- error = error + ((x-y--) << 2) + 10;
- x++;
- + if (numpts > MAX_PTS-8)
- + {
- + ERROR("Circle is too larege !");
- + return(0);
- + }
- } /* end of while (x , y) */
-
- if (x == y)
- ***************
- *** 84,111 ****
- ptlist[numpts].x=center.x-x; ptlist[numpts++].y=center.y-y;
- }
-
- ! my_pw_polypoint(pw,0,0,numpts,ptlist,PIX_SET);
- } /* end of function draw_circle() */
-
-
-
- ! my_pw_polypoint(temp_pw,off_x,off_y,count_pts,ptlist, ROP)
- ! Pixwin *temp_pw;
- int off_x,off_y,count_pts;
- struct pr_pos ptlist[];
- int ROP;
- {
-
- ! if (image_depth > 1)
- {
- while(--count_pts > 0)
- {
- ! pw_rop(temp_pw,off_x+ptlist[count_pts].x,off_y+ptlist[count_pts].y,1,1
- ! ,PIX_COLOR(cur_color) | PIX_SRC ,pattern[0],0,0);
- }
- }
- else
- {
- ! pw_polypoint(temp_pw,off_x,off_y,count_pts,ptlist,ROP);
- }
- }
- --- 93,129 ----
- ptlist[numpts].x=center.x-x; ptlist[numpts++].y=center.y-y;
- }
-
- ! my_pw_polypoint(0,0,numpts,ptlist,ROP);
- } /* end of function draw_circle() */
-
-
-
- ! my_pw_polypoint(off_x,off_y,count_pts,ptlist, ROP)
- int off_x,off_y,count_pts;
- struct pr_pos ptlist[];
- int ROP;
- {
-
- ! if (((ROP == (PIX_SRC)) || (ROP == (PIX_SRC | PIX_DST)))
- ! && (image_depth == 1))
- ! ROP = PIX_SET;
- !
- ! #ifdef SunOS_3.4
- ! if ((image_depth > 1) || (ROP != (PIX_SET)))
- {
- + #endif
- + pw_batch_on(pw);
- while(--count_pts > 0)
- {
- ! pw_rop(pw,off_x+ptlist[count_pts].x,off_y+ptlist[count_pts].y,1,1
- ! ,PIX_COLOR(cur_color) | ROP ,pattern[0],0,0);
- }
- + pw_batch_off(pw);
- + #ifdef SunOS_3.4
- }
- else
- {
- ! pw_polypoint(pw,off_x,off_y,count_pts,ptlist,PIX_SET);
- }
- + #endif
- }
- diff -c ./cms_rainbow.c ../../Ver2.3/source/cms_rainbow.c
- *** ./cms_rainbow.c Mon Jun 13 23:53:12 1988
- --- ../../Ver2.3/source/cms_rainbow.c Fri Jun 17 00:27:05 1988
- ***************
- *** 30,35 ****
- --- 30,39 ----
- date: Tue Mar 22 22:04:58 EST 1988
- author: rayk
- changes:add comments
- +
- + date: Sat Jun 4 13:22:45 EST 1988
- + author: rayk
- + changes:fixed color pallet so that it was continious
- **************************************************************************/
-
- extern unsigned char red[256],green[256],blue[256];
- ***************
- *** 52,104 ****
- red = blue = green = 0;
-
- for (i = 2; i < 30; i++) {
- ! red += 9;
- ! set_colorentry(i, red, green, blue);
- }
- ! set_colorentry(30, 255, 0, 0); /* red */
- red = 255; blue = green = 0;
- for (i = 30; i < 62; i++) {
- ! green += 6;
- ! set_colorentry(i, red, green, blue);
- }
- ! set_colorentry(62, 255, 195, 0); /* orange */ /* note diff = 33 */
- ! red = 255; blue = 0; green = 195;
- for (i = 63; i < 96; i++) {
- ! green += 2;
- ! set_colorentry(i, red, green, blue);
- }
- ! set_colorentry(96, 255, 255, 0); /* yellow */
- red = 255; blue = 0; green = 255;
- for (i = 97; i < 133; i++) {
- ! red -= 7;
- ! set_colorentry(i, red, green, blue);
- }
- ! set_colorentry(133, 0, 255, 0); /* green */
- red = blue = 0; green = 255;
- for (i = 134; i < 165; i++) {
- ! green -= 8;
- ! blue += 8;
- ! set_colorentry(i, red, green, blue);
- }
- ! set_colorentry(165, 0, 0, 255); /* blue */
- red = green = 0; blue = 255;
- for (i = 165; i < 202; i++) {
- ! red += 7;
- ! set_colorentry(i, red, green, blue);
- }
- ! set_colorentry(202, 255, 0, 255); /* violet */
- red = blue = 255; green = 0;
- for (i = 203; i < 239; i++) {
- ! green += 7;
- ! set_colorentry(i, red, green, blue);
- }
- ! set_colorentry(239, 255, 255, 255); /* white */
- red = blue = green = 255;
- for (i = 239; i <= 255; i++) {
- ! green -= 9;
- ! red -= 9;
- ! blue -= 9;
- ! set_colorentry(i, red, green, blue);
- }
- }
- -
- --- 56,108 ----
- red = blue = green = 0;
-
- for (i = 2; i < 30; i++) {
- ! red += 9;
- ! set_colorentry(i, red, green, blue);
- }
- ! set_colorentry(30, 255, 0, 0); /* red */
- red = 255; blue = green = 0;
- for (i = 30; i < 62; i++) {
- ! green += 6;
- ! set_colorentry(i, red, green, blue);
- }
- ! set_colorentry(62, 255, 188, 0); /* orange */ /* note diff = 33 */
- ! red = 255; blue = 0; green = 188;
- for (i = 63; i < 96; i++) {
- ! green += 2;
- ! set_colorentry(i, red, green, blue);
- }
- ! set_colorentry(96, 255, 255, 0); /* yellow */
- red = 255; blue = 0; green = 255;
- for (i = 97; i < 133; i++) {
- ! red -= 7;
- ! set_colorentry(i, red, green, blue);
- }
- ! set_colorentry(133, 0, 255, 0); /* green */
- red = blue = 0; green = 255;
- for (i = 134; i < 165; i++) {
- ! green -= 8;
- ! blue += 8;
- ! set_colorentry(i, red, green, blue);
- }
- ! set_colorentry(165, 0, 0, 255); /* blue */
- red = green = 0; blue = 255;
- for (i = 165; i < 202; i++) {
- ! red += 7;
- ! set_colorentry(i, red, green, blue);
- }
- ! set_colorentry(201, 255, 0, 255); /* violet */
- ! set_colorentry(202, 255, 0, 255); /* violet */
- red = blue = 255; green = 0;
- for (i = 203; i < 239; i++) {
- ! green += 7;
- ! set_colorentry(i, red, green, blue);
- }
- ! set_colorentry(239, 255, 255, 255); /* white */
- red = blue = green = 255;
- for (i = 239; i <= 255; i++) {
- ! green -= 9;
- ! red -= 9;
- ! blue -= 9;
- ! set_colorentry(i, red, green, blue);
- }
- }
- diff -c ./color_palet.c ../../Ver2.3/source/color_palet.c
- *** ./color_palet.c Mon Jun 13 23:53:13 1988
- --- ../../Ver2.3/source/color_palet.c Fri Jun 17 00:27:06 1988
- ***************
- *** 30,35 ****
- --- 30,43 ----
- date: Tue Mar 22 22:04:58 EST 1988
- author: rayk
- changes:add comments
- +
- + date: Thu Jun 16 21:02:52 EDT 1988
- + author: tnosoes!tom@mcvax.cwi.nl
- + changes:corrected problems with FRAME_INHERIT_COLOR
- + and the problem of the color table flashing
- + on and off when you move the mouse between
- + window.
- +
- **************************************************************************/
-
- #include "header.h"
- ***************
- *** 52,60 ****
- */
- set_mono()
- {
- ! /* set the color map to mono ******** */
- ! cms_monochromeload(red,green,blue);
- ! my_put_colormap();
- panel_set(color_button,PANEL_SHOW_ITEM, FALSE,0);
- panel_set(mono_cycle,PANEL_SHOW_ITEM, TRUE,0);
- }
- --- 60,73 ----
- */
- set_mono()
- {
- ! /*
- ! * set the color map to mono
- ! */
- ! if ((pw->pw_pixrect->pr_depth) > 1)
- ! {
- ! cms_monochromeload(red,green,blue);
- ! my_put_colormap();
- ! }
- panel_set(color_button,PANEL_SHOW_ITEM, FALSE,0);
- panel_set(mono_cycle,PANEL_SHOW_ITEM, TRUE,0);
- }
- ***************
- *** 78,83 ****
- --- 91,97 ----
- bcopy(red,temp_red,256);
- bcopy(green,temp_green,256);
- bcopy(blue,temp_blue,256);
- +
- temp_red[0] = -1;
- temp_green[0] = -1;
- temp_blue[0] = -1;
- ***************
- *** 85,110 ****
- temp_green[1] = 0;
- temp_blue[1] = 0;
-
- temp_pw = (Pixwin *)window_get(panel, WIN_PIXWIN);
- pw_setcmsname(temp_pw, "ray kreisel");
- ! pw_putcolormap(temp_pw, 0,256,red,green,blue);
-
- temp_pw = (Pixwin *)window_get(command_panel, WIN_PIXWIN);
- pw_setcmsname(temp_pw, "ray kreisel");
- ! pw_putcolormap(temp_pw, 0,256,red,green,blue);
-
- temp_pw = (Pixwin *)window_get(region_panel, WIN_PIXWIN);
- pw_setcmsname(temp_pw, "ray kreisel");
- ! pw_putcolormap(temp_pw, 0,256,red,green,blue);
-
- temp_pw = (Pixwin *)window_get(pattern_panel, WIN_PIXWIN);
- pw_setcmsname(temp_pw, "ray kreisel");
- ! pw_putcolormap(temp_pw, 0,256,red,green,blue);
-
- temp_pw = (Pixwin *)window_get(brush_panel, WIN_PIXWIN);
- pw_setcmsname(temp_pw, "ray kreisel");
- ! pw_putcolormap(temp_pw, 0,256,red,green,blue);
-
- }
-
- color_mode(item, event)
- --- 99,150 ----
- temp_green[1] = 0;
- temp_blue[1] = 0;
-
- + temp_red[255] = 0;
- + temp_green[255] = 0;
- + temp_blue[255] = 0;
- + temp_red[254] = -1;
- + temp_green[254] = -1;
- + temp_blue[254] = -1;
- +
- + temp_pw = (Pixwin *)window_get(base_frame, WIN_PIXWIN);
- + pw_setcmsname(temp_pw, "ray kreisel");
- + pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
- +
- temp_pw = (Pixwin *)window_get(panel, WIN_PIXWIN);
- pw_setcmsname(temp_pw, "ray kreisel");
- ! pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
-
- temp_pw = (Pixwin *)window_get(command_panel, WIN_PIXWIN);
- pw_setcmsname(temp_pw, "ray kreisel");
- ! pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
-
- temp_pw = (Pixwin *)window_get(region_panel, WIN_PIXWIN);
- pw_setcmsname(temp_pw, "ray kreisel");
- ! pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
-
- temp_pw = (Pixwin *)window_get(pattern_panel, WIN_PIXWIN);
- pw_setcmsname(temp_pw, "ray kreisel");
- ! pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
-
- temp_pw = (Pixwin *)window_get(brush_panel, WIN_PIXWIN);
- pw_setcmsname(temp_pw, "ray kreisel");
- ! pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
-
- + temp_pw = (Pixwin *)window_get(color_frame, WIN_PIXWIN);
- + pw_setcmsname(temp_pw, "ray kreisel");
- + pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
- +
- + temp_pw = (Pixwin *)window_get(color_panel, WIN_PIXWIN);
- + pw_setcmsname(temp_pw, "ray kreisel");
- + pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
- +
- + temp_pw = (Pixwin *)window_get(fat_frame, WIN_PIXWIN);
- + pw_setcmsname(temp_pw, "ray kreisel");
- + pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
- +
- + temp_pw = (Pixwin *)window_get(fat_panel, WIN_PIXWIN);
- + pw_setcmsname(temp_pw, "ray kreisel");
- + pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
- }
-
- color_mode(item, event)
- ***************
- *** 150,162 ****
- Event *event;
- caddr_t arg;
- {
- ! if (event_is_up(event))
- ! return;
- ! switch (event_id(event)) {
- ! case MS_LEFT:
- ! update_cur_color(event_x(event),event_y(event),0);
- ! break;
- ! }
- }
-
-
- --- 190,197 ----
- Event *event;
- caddr_t arg;
- {
- ! if (event_id(event) == MS_LEFT)
- ! update_cur_color(event_x(event),event_y(event),0);
- }
-
-
- diff -c ./command.c ../../Ver2.3/source/command.c
- *** ./command.c Mon Jun 13 23:53:14 1988
- --- ../../Ver2.3/source/command.c Fri Jun 17 00:27:08 1988
- ***************
- *** 152,159 ****
- };
- static mpr_static(reg_command7_pr, 48, 48, 1, reg_command7_data);
-
- -
- static short reg_command8_data[] = {
- #include "move.cicon.pat"
- };
- static mpr_static(reg_command8_pr, 48, 48, 1, reg_command8_data);
- --- 152,163 ----
- };
- static mpr_static(reg_command7_pr, 48, 48, 1, reg_command7_data);
-
- static short reg_command8_data[] = {
- #include "move.cicon.pat"
- };
- static mpr_static(reg_command8_pr, 48, 48, 1, reg_command8_data);
- +
- + static short reg_command9_data[] = {
- + #include "scale.cicon.pat"
- + };
- + static mpr_static(reg_command9_pr, 48, 48, 1, reg_command9_data);
- diff -c ./confirmer.c ../../Ver2.3/source/confirmer.c
- *** ./confirmer.c Mon Jun 13 23:53:16 1988
- --- ../../Ver2.3/source/confirmer.c Fri Jun 17 00:27:09 1988
- ***************
- *** 28,50 ****
- date: Tue Mar 22 22:04:58 EST 1988
- author: rayk
- changes:add comments
- - **************************************************************************/
-
- ! #include <stdio.h>
- ! #include <sys/file.h>
- ! #include <suntool/sunview.h>
- ! #include <suntool/panel.h>
- ! #include <suntool/canvas.h>
- ! #include <suntool/walkmenu.h>
- ! #include <suntool/scrollbar.h>
- ! #include <math.h>
- ! #include <pixrect/pixrect_hs.h>
-
- - extern Panel panel;
-
- ! static Frame init_confirmer();
- ! static void yes_no();
-
- /***************************************************************
- confirm
- purpose: To display a window on the base_frame Sunwindow
- --- 28,45 ----
- date: Tue Mar 22 22:04:58 EST 1988
- author: rayk
- changes:add comments
-
- ! date: Sun May 15 21:21:01 EDT 1988
- ! author: rayk
- ! changes:rewrote the confirmer so that it is NOT created
- ! dynamiclly to try to advoid the error in the
- ! window creation (no more file descriptors)
-
-
- ! **************************************************************************/
-
- + #include "header.h"
- +
- /***************************************************************
- confirm
- purpose: To display a window on the base_frame Sunwindow
- ***************
- *** 56,164 ****
- 1 : if the user answered YES
- 0 : if the user answered NO
- ***************************************************************/
- int confirm(message)
- char *message;
- {
- ! Frame confirmer;
- ! int answer;
-
- - /* create the confirmer */
- - confirmer = init_confirmer(message);
- - window_bell(panel);
- - /* make the user answer */
- - answer = (int) window_loop(confirmer);
-
- ! /* destroy the confirmer */
- ! window_set(confirmer, FRAME_NO_CONFIRM, TRUE, 0);
- ! window_destroy(confirmer);
- !
- ! return answer;
- }
-
- - static Frame
- - init_confirmer(message)
- - char *message;
- - {
- - extern Frame base_frame;
- - Frame confirmer;
- - Panel panel;
- - Panel_item message_item;
- - int left, top, width, height;
- - Rect *r;
- - struct pixrect *pr;
-
- - /* create the confirmer base frame */
- - confirmer = window_create(base_frame, FRAME,
- - FRAME_SHOW_LABEL, FALSE,
- - 0);
-
- ! /* create the single panel subwindow */
- ! panel = window_create(confirmer, PANEL, 0);
- !
- ! /* put in the message */
- ! message_item = panel_create_item(panel, PANEL_MESSAGE,
- ! PANEL_LABEL_STRING, message,
- ! 0);
- !
- ! pr = panel_button_image(panel, "NO", 3, 0);
- ! width = 2 * pr->pr_width + 10;
- !
- ! r = (Rect *) panel_get(message_item, PANEL_ITEM_RECT);
- !
- ! /* center the yes/no buttons under the message */
- ! left = (r->r_width - width) / 2;
- ! if (left < 0)
- ! left = 0;
- ! top = rect_bottom(r) + 5;
- !
- ! panel_create_item(panel, PANEL_BUTTON,
- ! PANEL_ITEM_X, left,
- ! PANEL_ITEM_Y, top,
- ! PANEL_LABEL_IMAGE, pr,
- ! PANEL_CLIENT_DATA, FALSE,
- ! PANEL_NOTIFY_PROC, yes_no,
- ! 0);
- !
- ! panel_create_item(panel, PANEL_BUTTON,
- ! PANEL_LABEL_IMAGE, panel_button_image(panel, "YES", 3, 0),
- ! PANEL_CLIENT_DATA, TRUE,
- ! PANEL_NOTIFY_PROC, yes_no,
- ! 0);
- !
- !
- ! window_fit(panel);
- ! window_fit(confirmer);
- !
- ! /* center the confirmer frame in the base frame */
- ! r = (Rect *) window_get(base_frame, WIN_RECT);
- !
- ! width = (int) window_get(confirmer, WIN_WIDTH);
- ! height = (int) window_get(confirmer, WIN_HEIGHT);
- !
- ! left = (r->r_width - width) / 2;
- ! top = (r->r_height - height) / 3;
- !
- ! if (left < 0)
- ! left = 0;
- ! if (top < 0)
- ! top = 0;
- !
- ! window_set(confirmer, WIN_X, left, WIN_Y, top,
- ! 0);
- !
- ! left = left + (width - width/3);
- ! top = top + height / 2;
- ! window_set(base_frame, WIN_MOUSE_XY, left, top, 0);
- !
- ! return confirmer;
- ! }
- !
- ! /* yes/no notify proc */
- ! static void
- ! yes_no(item, event)
- Panel_item item;
- Event *event;
- {
- ! window_return(panel_get(item, PANEL_CLIENT_DATA));
- }
- -
- --- 51,94 ----
- 1 : if the user answered YES
- 0 : if the user answered NO
- ***************************************************************/
- + extern Panel_item con_msg_string;
- +
- int confirm(message)
- char *message;
- {
- ! window_bell(panel);
- ! confirm_msg(message);
- ! return((int)window_loop(confirmer));
- ! }
-
-
- ! confirm_msg(string)
- ! char *string;
- ! {
- ! char temp_space[55];
- ! char *temp_pt;
- ! int i;
- !
- ! if (strlen(string) < 50)
- ! {
- ! for(i=0;i<50;i++)
- ! temp_space[i]= ' ';
- ! temp_pt = temp_space + (50-strlen(string))/2;
- ! strcpy(temp_pt,string);
- ! panel_set(con_msg_string,PANEL_LABEL_STRING,temp_space,0);
- ! }
- ! else
- ! panel_set(con_msg_string,PANEL_LABEL_STRING,string,0);
- }
-
-
-
- ! /*
- ! * yes/no notify proc
- ! */
- ! void yes_no(item, event)
- Panel_item item;
- Event *event;
- {
- ! window_return(panel_get(item, PANEL_CLIENT_DATA));
- }
- diff -c ./disk_io.c ../../Ver2.3/source/disk_io.c
- *** ./disk_io.c Mon Jun 13 23:53:19 1988
- --- ../../Ver2.3/source/disk_io.c Fri Jun 17 00:27:12 1988
- ***************
- *** 30,35 ****
- --- 30,54 ----
- date: Tue Mar 22 22:04:58 EST 1988
- author: rayk
- changes:add comments
- +
- + date: Thu Apr 21 20:14:58 EDT 1988
- + author: rayk
- + changes:when you hit return in filename the caret moves
- + to textstring
- +
- + date: Thu Apr 21 20:14:58 EDT 1988
- + author: rayk
- + changes:when you do a load cut/paste buffer it will
- + automagicly bring up the cut/paste command menu
- +
- + date: Wed Jun 1 1:22:18 EDT 1988
- + author: rayk
- + changes:fixed bug in resize color canvases
- +
- + date: Wed Jun 15 14:40:48 EDT 1988
- + author: rayk
- + changes:added a check in file save to check is the
- + current filename is a directory
- **************************************************************************/
-
- #include "header.h"
- ***************
- *** 38,43 ****
- --- 57,63 ----
- #include <sys/dir.h>
- #include <sys/file.h>
- #include <pwd.h>
- + #include <sys/stat.h>
-
- colormap_t colormap;
-
- ***************
- *** 48,57 ****
- Panel_item item;
- Event *event;
- {
- ! strcpy(file_name,(char*)panel_get_value(file_panel));
- ! if (complete(file_name))
- ! window_bell(panel);
- ! panel_set(file_panel,PANEL_VALUE,file_name,0);
- }
-
-
- --- 68,87 ----
- Panel_item item;
- Event *event;
- {
- ! if (item == text_panel)
- ! window_set(panel,PANEL_CARET_ITEM,file_panel,0);
- ! else
- ! {
- ! if ((char)event_id(event) == '\r')
- ! window_set(panel,PANEL_CARET_ITEM,text_panel,0);
- ! else
- ! {
- ! strcpy(file_name,(char*)panel_get_value(file_panel));
- ! if (complete(file_name))
- ! window_bell(panel);
- ! panel_set(file_panel,PANEL_VALUE,file_name,0);
- ! }
- ! }
- }
-
-
- ***************
- *** 388,393 ****
- --- 418,428 ----
- {
- my_put_colormap();
- set_color();
- + /**** new fix for color retained canvases */
- + (void)window_set(canvas,
- + CANVAS_WIDTH, file_header.ras_width,
- + CANVAS_HEIGHT, file_header.ras_height,
- + 0);
- }
- else
- {
- ***************
- *** 402,407 ****
- --- 437,446 ----
- image_hgt = file_header.ras_height;
- image_depth = file_header.ras_depth;
- pw_write(pw,0,0, image_wid,image_hgt, PIX_SRC, undo_pr,0,0);
- + sprintf(temp_file,"%d",image_hgt);
- + panel_set(height_text,PANEL_VALUE,temp_file,0);
- + sprintf(temp_file,"%d",image_wid);
- + panel_set(width_text,PANEL_VALUE,temp_file,0);
- }
- else
- {
- ***************
- *** 414,419 ****
- --- 453,464 ----
- PIX_SRC,undo_pr,0,0);
- MY_pr_destroy(undo_pr);
- undo_pr = my_mem_create(image_wid,image_hgt,image_depth);
- + panel_set(region_choice,PANEL_VALUE,MOVE,0);
- + panel_set(command_choice,PANEL_VALUE,SEL_REG,0);
- + (void)window_set(brush_panel, WIN_SHOW,FALSE, 0);
- + (void)window_set(region_panel, WIN_SHOW,TRUE, 0);
- + print_msg("Object copied to Cut/Paste buffer. Hold down the RIGHT mouse button to drag the object.");
- + mouse_parms();
- }
- }
-
- ***************
- *** 432,437 ****
- --- 477,483 ----
- int copy_flag = TRUE;
- char temp_file[MAX_FILE_NAME];
-
- + hide_msg();
- /*
- * Is the raster file to be run-length encode or not
- */
- ***************
- *** 445,453 ****
- */
- strcpy(temp_file,(char*)panel_get_value(file_panel));
- get_full_path(temp_file,file_name);
- if (file_exist(file_name))
- {
- ! if (!confirm("Over write existing file ?"))
- return(0);
- }
- /*
- --- 491,506 ----
- */
- strcpy(temp_file,(char*)panel_get_value(file_panel));
- get_full_path(temp_file,file_name);
- +
- + if (file_is_dir(file_name))
- + {
- + ERROR("The current filename is a directory !");
- + return(0);
- + }
- +
- if (file_exist(file_name))
- {
- ! if (!confirm("Overwrite existing file ?"))
- return(0);
- }
- /*
- ***************
- *** 461,467 ****
- return(0);
- }
- /*
- ! * Save the whole drawing are out to the disk file
- */
- if (SAVE_ALL == (int)panel_get_value(save_cycle))
- {
- --- 514,520 ----
- return(0);
- }
- /*
- ! * Save the whole drawing area out to the disk file
- */
- if (SAVE_ALL == (int)panel_get_value(save_cycle))
- {
- ***************
- *** 471,477 ****
- save_screen();
-
- if (!undo_pr)
- ! undo_pr = my_mem_create(image_wid,image_hgt,image_depth);
- pr_rop(undo_pr,0,0,image_wid,image_hgt,PIX_SRC,pw->pw_prretained,0,0);
- pr_dump(undo_pr,fp,&colormap,type,copy_flag);
- }
- --- 524,530 ----
- save_screen();
-
- if (!undo_pr)
- ! undo_pr = my_mem_create(image_wid,image_hgt,image_depth);
- pr_rop(undo_pr,0,0,image_wid,image_hgt,PIX_SRC,pw->pw_prretained,0,0);
- pr_dump(undo_pr,fp,&colormap,type,copy_flag);
- }
- ***************
- *** 505,510 ****
- --- 558,584 ----
- return(TRUE);
- else
- return(FALSE);
- + }
- +
- +
- + /*
- + * Check if the file is a directory
- + */
- + file_is_dir(file_name)
- + char *file_name;
- + {
- + struct stat buf;
- +
- + if (file_exist(file_name))
- + {
- + stat(file_name,&buf);
- + if (buf.st_mode & S_IFDIR)
- + return(TRUE);
- + else
- + return(FALSE);
- + }
- + else
- + return(FALSE);
- }
-
-
- diff -c ./drawing.c ../../Ver2.3/source/drawing.c
- *** ./drawing.c Mon Jun 13 23:53:22 1988
- --- ../../Ver2.3/source/drawing.c Fri Jun 17 00:27:15 1988
- ***************
- *** 30,35 ****
- --- 30,63 ----
- date: Tue Mar 22 22:04:58 EST 1988
- author: rayk
- changes:add comments
- +
- + date: Fri Apr 15 02:08:11 EDT 1988
- + author: rayk
- + changes:added scale cut/paste
- +
- + date: Tue Apr 19 14:05:10 EDT 1988
- + author: rayk
- + changes:fixed no-borders on polygons
- +
- + date: Fri Apr 22 03:05:28 EDT 1988
- + author: rainbow
- + changes:added FAST rotate
- +
- + date: Fri Apr 22 17:11:02 EDT 1988
- + author: rayk
- + changes:added pw_batch to make things much FASTER
- +
- + date: Wed Jun 15 14:40:48 EDT 1988
- + author: juang@aloft.att.com
- + changes:worked around bug in pw_stencil that
- + would not display color paint brushes properly
- + on Sun 3/160 & Sun 3/260
- +
- + date: Wed Jun 15 16:49:43 EDT 1988
- + author: rayk
- + changes:added toggle to make it so that
- + lasso will clear the area that has been selected
- +
- **************************************************************************/
-
- #include"header.h"
- ***************
- *** 85,109 ****
- * Take the current text string and put that Baby up on the bitmap
- * in the right font
- */
- ! draw_text()
- {
- ! int x,y;
- !
- ! if (select_pt_x != -1)
- ! {
- ! x = select_pt_x;
- ! y = select_pt_y;
- ! clean_point();
- ! save_screen();
- ! pw_text(pw,x,y,PIX_COLOR(cur_color) | PIX_SRC,font_array[(int)panel_get_value(text_size_item)],
- (char*)panel_get_value(text_panel));
- - }
- - else
- - {
- - ERROR("Select a point first, fill in TEXT STRING, then select ABC.");
- - window_set(panel,PANEL_CARET_ITEM,text_panel,0);
- - set_select_mode();
- - }
- }
-
-
- --- 113,123 ----
- * Take the current text string and put that Baby up on the bitmap
- * in the right font
- */
- ! draw_text(x,y,ROP)
- ! int x,y,ROP;
- {
- ! pw_text(pw,x,y,PIX_COLOR(cur_color) | ROP,font_array[(int)panel_get_value(text_size_item)],
- (char*)panel_get_value(text_panel));
- }
-
-
- ***************
- *** 123,128 ****
- --- 137,144 ----
- draw_rectangle(x1,y1,x2,y2)
- int x1,y1,x2,y2;
- {
- + int ROP;
- +
- top_x = x1;
- top_y = y1;
- bottom_x = x2;
- ***************
- *** 131,142 ****
- fill_region();
- else
- reset_region();
- ! if ((int)panel_get_value(border_cycle))
- {
- ! pw_vector(pw,x1,y1,x2,y1,PIX_SRC,cur_color);
- ! pw_vector(pw,x2,y1,x2,y2,PIX_SRC,cur_color);
- ! pw_vector(pw,x2,y2,x1,y2,PIX_SRC,cur_color);
- ! pw_vector(pw,x1,y2,x1,y1,PIX_SRC,cur_color);
- }
- }
-
- --- 147,162 ----
- fill_region();
- else
- reset_region();
- ! if (!(ROP = get_current_ROP()))
- ! ROP = PIX_SRC;
- ! if (((( (int)panel_get_value(border_cycle))
- ! || (int)panel_get_value(command_choice)==RECT_H))
- ! && (ROP != (PIX_XOR)))
- {
- ! pw_vector(pw,x1,y1,x2,y1,ROP,cur_color);
- ! pw_vector(pw,x2,y1,x2,y2,ROP,cur_color);
- ! pw_vector(pw,x2,y2,x1,y2,ROP,cur_color);
- ! pw_vector(pw,x1,y2,x1,y1,ROP,cur_color);
- }
- }
-
- ***************
- *** 187,220 ****
- struct pixwin *pw;
- int x,y;
- {
- if (brush_temp_pr == NULL)
- ! brush_temp_pr = my_mem_create(PATTERN_SIZE,PATTERN_SIZE,1);
-
-
- if (((int)panel_get_value(pattern_choice) != 39) || (image_depth == 1))
- {
- ! if (brush_temp_pr->pr_depth != 1)
- ! {
- ! MY_pr_destroy(brush_temp_pr);
- ! brush_temp_pr = my_mem_create(PATTERN_SIZE,PATTERN_SIZE,1);
- ! }
- ! pr_replrop(brush_temp_pr,0,0,PATTERN_SIZE,PATTERN_SIZE, PIX_SRC,pattern[(int)panel_get_value(pattern_choice)],x,y);
- ! pw_stencil(pw,x-PATTERN_SIZE/2,y-PATTERN_SIZE/2,PATTERN_SIZE,PATTERN_SIZE,PIX_COLOR(cur_color) | PIX_SRC,
- ! brushes[(int)panel_get_value(brush_choice)],0,0,brush_temp_pr,0,0);
- }
- else
- {
- ! if (brush_temp_pr->pr_depth != image_depth)
- ! {
- ! MY_pr_destroy(brush_temp_pr);
- ! brush_temp_pr = my_mem_create(PATTERN_SIZE,PATTERN_SIZE,image_depth);
- ! }
- ! pr_replrop(brush_temp_pr,0,0,PATTERN_SIZE,PATTERN_SIZE, PIX_SRC,pattern[(int)panel_get_value(pattern_choice)],x,y);
- ! pw_stencil(pw,x-PATTERN_SIZE/2,y-PATTERN_SIZE/2,PATTERN_SIZE,PATTERN_SIZE, PIX_SRC,
- ! brushes[(int)panel_get_value(brush_choice)],0,0,brush_temp_pr,0,0);
- !
- }
-
- }
-
-
- --- 207,237 ----
- struct pixwin *pw;
- int x,y;
- {
- + int ROP;
- +
- + if (!(ROP = get_current_ROP()))
- + ROP = PIX_SRC;
- +
- if (brush_temp_pr == NULL)
- ! brush_temp_pr = my_mem_create(PATTERN_SIZE,PATTERN_SIZE,image_depth);
-
- + if (brush_temp_pr->pr_depth != image_depth)
- + {
- + MY_pr_destroy(brush_temp_pr);
- + brush_temp_pr = my_mem_create(PATTERN_SIZE,PATTERN_SIZE,image_depth);
- + }
-
- if (((int)panel_get_value(pattern_choice) != 39) || (image_depth == 1))
- {
- ! 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);
- }
- else
- {
- ! pr_replrop(brush_temp_pr,0,0,PATTERN_SIZE,PATTERN_SIZE, PIX_SRC,pattern[(int)panel_get_value(pattern_choice)],x,y);
- }
-
- + pw_stencil(pw,x-PATTERN_SIZE/2,y-PATTERN_SIZE/2,PATTERN_SIZE,PATTERN_SIZE,
- + ROP, brushes[(int)panel_get_value(brush_choice)],0,0,brush_temp_pr,0,0);
- }
-
-
- ***************
- *** 247,256 ****
- --- 264,275 ----
- struct pixwin *pw;
- int x,y;
- {
- + pw_batch_on(pw);
- select_region(pw,top_x,top_y,top_x+PATTERN_SIZE,top_y+PATTERN_SIZE);
- pw_rop(pw,x-PATTERN_SIZE/2,y-PATTERN_SIZE/2,PATTERN_SIZE,PATTERN_SIZE, PIX_SRC,0,0,0);
- top_x = x-PATTERN_SIZE/2; top_y= y-PATTERN_SIZE/2;
- select_region(pw,top_x,top_y,top_x+PATTERN_SIZE,top_y+PATTERN_SIZE);
- + pw_batch_off(pw);
- }
-
-
- ***************
- *** 300,329 ****
-
- /*
- * take a currently selected region and rotate around the center
- ! * point. SLOW !!
- */
- rotate_region()
- {
- ! register i,j,t1,t2;
-
- if (top_x || top_y || bottom_x || bottom_y)
- {
- select_region(pw,top_x,top_y,bottom_x,bottom_y);
- region_fix();
- ! MY_pr_destroy(cut_buffer_pr);
- ! cut_buffer_pr = my_mem_create(bottom_x-top_x,bottom_y-top_y,image_depth);
- ! pr_rop(cut_buffer_pr,0,0,bottom_x-top_x,bottom_y-top_y,
- ! PIX_SRC,pw->pw_prretained,top_x,top_y);
- ! t1 = top_x + cut_buffer_pr->pr_size.x/2+ cut_buffer_pr->pr_size.y/2;
- ! t2 = top_y - cut_buffer_pr->pr_size.x/2+ cut_buffer_pr->pr_size.y/2;
- ! for (j = 0; j < cut_buffer_pr->pr_size.y; j++)
- ! for (i = 0; i < cut_buffer_pr->pr_size.x; i++)
- ! pw_rop(pw, t1-j, t2+i, 1,1, PIX_SRC, cut_buffer_pr,i,j);
-
- ! top_x = top_x + cut_buffer_pr->pr_size.x/2 - cut_buffer_pr->pr_size.y/2;
- ! top_y = top_y - cut_buffer_pr->pr_size.x/2 + cut_buffer_pr->pr_size.y/2;
- ! bottom_x = top_x + cut_buffer_pr->pr_size.y;
- ! bottom_y = top_y + cut_buffer_pr->pr_size.x;
- select_region(pw,top_x,top_y,bottom_x,bottom_y);
- }
- else
- --- 319,365 ----
-
- /*
- * take a currently selected region and rotate around the center
- ! * point. New FAST version that rotates in 3n bitblt where n is
- ! * number of raster lines in the source
- */
- rotate_region()
- {
- ! int i, width, height, new_x, new_y, y1, y2, n;
- ! struct pixrect *tmp1, *tmp2;
-
- if (top_x || top_y || bottom_x || bottom_y)
- {
- select_region(pw,top_x,top_y,bottom_x,bottom_y);
- region_fix();
- ! width = bottom_x - top_x;
- ! height = bottom_y - top_y;
- ! new_x = top_x + (width - height) / 2;
- ! new_y = top_y + (height - width ) /2;
- ! tmp1 = my_mem_create(width+height-1, height, image_depth);
- ! tmp2 = my_mem_create(width+height-1, width, image_depth);
-
- ! for(i=0; i<height; i++)
- ! pr_rop(tmp1, i, i, width, 1, PIX_SRC, pw->pw_prretained, top_x, top_y+i);
- !
- ! for(i=0; i<=width+height-1; i++)
- ! {
- ! n = (i+1<height) ? i+1 : ((i>=width) ? (width+height-1-i) : height);
- ! y1 = (i<width) ? (width-1-i) : 0;
- ! y2 = (i>=width) ? (i-width+1) : 0;
- ! pr_rop(tmp2, i, y1, 1, n, PIX_SRC, tmp1, i, y2);
- ! }
- !
- ! pw_batch_on(pw);
- ! for(i=0; i<width; i++)
- ! pw_rop(pw, new_x, new_y+i, height, 1, PIX_SRC, tmp2, width-1-i, i);
- ! pw_batch_off(pw);
- ! MY_pr_destroy(tmp1);
- ! MY_pr_destroy(tmp2);
- !
- ! top_x = new_x;
- ! top_y = new_y;
- ! bottom_x = new_x+height;
- ! bottom_y = new_y+width;
- select_region(pw,top_x,top_y,bottom_x,bottom_y);
- }
- else
- ***************
- *** 350,360 ****
- --- 386,398 ----
- cut_buffer_pr = my_mem_create(bottom_x-top_x,bottom_y-top_y,image_depth);
- pr_rop(cut_buffer_pr,0,0,bottom_x-top_x,bottom_y-top_y,
- PIX_SRC,pw->pw_prretained,top_x,top_y);
- + pw_batch_on(pw);
- for (i = 0; i < cut_buffer_pr->pr_size.x; i++) {
- pw_rop(pw, top_x+(cut_buffer_pr->pr_size.x - i)-1,top_y,
- 1,cut_buffer_pr->pr_size.y, PIX_SRC, cut_buffer_pr,i,0);
- }
- select_region(pw,top_x,top_y,bottom_x,bottom_y);
- + pw_batch_off(pw);
- }
- else
- {
- ***************
- *** 377,382 ****
- --- 415,421 ----
- region_fix();
- MY_pr_destroy(cut_buffer_pr);
- cut_buffer_pr = my_mem_create(bottom_x-top_x,bottom_y-top_y,image_depth);
- + pw_batch_on(pw);
- pr_rop(cut_buffer_pr,0,0,bottom_x-top_x,bottom_y-top_y,
- PIX_SRC,pw->pw_prretained,top_x,top_y);
- for (i = 0; i < cut_buffer_pr->pr_size.y; i++) {
- ***************
- *** 384,389 ****
- --- 423,429 ----
- cut_buffer_pr->pr_size.x, 1, PIX_SRC, cut_buffer_pr, 0, i);
- }
- select_region(pw,top_x,top_y,bottom_x,bottom_y);
- + pw_batch_off(pw);
- }
- else
- {
- ***************
- *** 394,406 ****
- }
-
-
-
- /*
- * grab what is in the Cut/Paste buffer and put it up on the drawing area
- */
- paste_region()
- {
- ! int ROP=PIX_SRC;
-
- if (select_pt_x == -1)
- {
- --- 434,490 ----
- }
-
-
- + /*
- + * take a current Cut/Paste and scale it
- + */
- + scale_region()
- + {
- + int ROP;
- + float inc,count;
- + register line;
- + struct pixrect *temp_pix;
-
- + if ((top_x || top_y || bottom_x || bottom_y) && cut_buffer_pr)
- + {
- + if (!(ROP = get_current_ROP()))
- + ROP = PIX_SRC;
- + select_region(pw,top_x,top_y,bottom_x,bottom_y);
- + region_fix();
- +
- + temp_pix = my_mem_create(cut_buffer_pr->pr_size.x,bottom_y-top_y,image_depth);
- + inc = ((float)cut_buffer_pr->pr_size.y)/(float)(bottom_y-top_y);
- + for (count = 0.0,line = 0; count < cut_buffer_pr->pr_size.y ; count +=inc, line++)
- + {
- + pr_rop(temp_pix,0,line,
- + cut_buffer_pr->pr_size.x, 1, ROP, cut_buffer_pr, 0, (int)count);
- + }
- + inc = ((float)cut_buffer_pr->pr_size.x)/(float)(bottom_x-top_x);
- + pw_batch_on(pw);
- + for (count = 0.0, line = 0; count < cut_buffer_pr->pr_size.x; count +=inc, line++)
- + {
- + pw_rop(pw,top_x + line,top_y,
- + 1,temp_pix->pr_size.y, ROP,temp_pix,(int)count,0);
- + }
- + pw_batch_off(pw);
- + reset_region();
- + MY_pr_destroy(temp_pix);
- + }
- + else
- + {
- + ERROR("Select a destination region first, then select SCALE.");
- + panel_set(command_choice,PANEL_VALUE,SEL_REG,0);
- + mouse_parms();
- + }
- + }
- +
- +
- +
- /*
- * grab what is in the Cut/Paste buffer and put it up on the drawing area
- */
- paste_region()
- {
- ! int ROP;
-
- if (select_pt_x == -1)
- {
- ***************
- *** 410,415 ****
- --- 494,501 ----
- }
- if (cut_buffer_pr)
- {
- + if (!(ROP = get_current_ROP()))
- + ROP = PIX_SRC;
- select_point(select_pt_x,select_pt_y);
- save_screen();
- 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);
- ***************
- *** 487,492 ****
- --- 573,579 ----
- {
- if (cut_buffer_pr)
- {
- + pw_batch_on(pw);
- pw_write(pw,old_x-cut_buffer_pr->pr_size.x/2,
- old_y-cut_buffer_pr->pr_size.y/2,
- cut_buffer_pr->pr_size.x,
- ***************
- *** 498,503 ****
- --- 585,591 ----
- cut_buffer_pr->pr_size.x,
- cut_buffer_pr->pr_size.y,
- PIX_XOR, cut_buffer_pr,0,0);
- + pw_batch_off(pw);
- }
- else
- {
- ***************
- *** 513,523 ****
- Panel_item item;
- Event *event;
- {
- if (top_x || top_y || bottom_x || bottom_y)
- {
- select_region(pw,top_x,top_y,bottom_x,bottom_y);
- region_fix();
- ! 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);
- reset_region();
- }
- }
- --- 601,615 ----
- Panel_item item;
- Event *event;
- {
- + int ROP;
- +
- if (top_x || top_y || bottom_x || bottom_y)
- {
- select_region(pw,top_x,top_y,bottom_x,bottom_y);
- region_fix();
- ! if (!(ROP = get_current_ROP()))
- ! ROP = PIX_SRC;
- ! 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);
- reset_region();
- }
- }
- ***************
- *** 542,550 ****
- while ((i<MAX_PTS) && (ptlist[i++].x != -1));
- no_points = --i;
- npts[0] = no_points;
- - pw_polygon_2(pw,0,0,1,npts,ptlist,PIX_XOR,pattern[0],0,0);
- - pw_polygon_2(pw,0,0,1,npts,ptlist,PIX_XOR,pattern[0],0,0);
-
- for (i=0;i < no_points;i++)
- {
- top_x = MIN(top_x,ptlist[i].x);
- --- 634,650 ----
- while ((i<MAX_PTS) && (ptlist[i++].x != -1));
- no_points = --i;
- npts[0] = no_points;
-
- + /*
- + * if the user booted with a '-l' option then clear the area in the lasso
- + * if not then just XOR the area in the lasso
- + */
- + if (!(int)panel_get(lasso_remove, PANEL_TOGGLE_VALUE,0))
- + {
- + pw_polygon_2(pw,0,0,1,npts,ptlist,PIX_XOR,pattern[0],0,0);
- + pw_polygon_2(pw,0,0,1,npts,ptlist,PIX_XOR,pattern[0],0,0);
- + }
- +
- for (i=0;i < no_points;i++)
- {
- top_x = MIN(top_x,ptlist[i].x);
- ***************
- *** 563,568 ****
- --- 663,673 ----
- MY_pr_destroy(cut_buffer_pr);
- cut_buffer_pr = my_mem_create(bottom_x-top_x,bottom_y-top_y,image_depth);
- pr_polygon_2(cut_buffer_pr,0,0,1,npts,ptlist,PIX_SRC,pw->pw_prretained,top_x,top_y);
- +
- + if ((int)panel_get(lasso_remove, PANEL_TOGGLE_VALUE,0))
- + {
- + pw_polygon_2(pw,top_x,top_y,1,npts,ptlist,PIX_CLR,0,0,0);
- + }
- reset_region();
- print_msg("The selected area is now in the Cut/Paste buffer.");
- }
- ***************
- *** 582,590 ****
- int i;
- int npts[1];
-
- ! found =0;
- i=0;
- ! while (i<MAX_PTS && !found)
- {
- if (py_pts[i++].x == -1)
- found=TRUE;
- --- 687,695 ----
- int i;
- int npts[1];
-
- ! found = FALSE;
- i=0;
- ! while ((i<MAX_PTS) && (!found))
- {
- if (py_pts[i++].x == -1)
- found=TRUE;
- ***************
- *** 631,637 ****
-
-
- /*
- ! * take the list of currnet vertexs and draw up the
- * the polygon and fill it with the current paint pattern
- */
- draw_poly(py_pts)
- --- 736,742 ----
-
-
- /*
- ! * take the list of current vertexs and draw up the
- * the polygon and fill it with the current paint pattern
- */
- draw_poly(py_pts)
- ***************
- *** 639,645 ****
- {
- int npts[1];
- int found;
- ! int i;
-
- if (py_pts[0].x == 0-1)
- return(0);
- --- 744,750 ----
- {
- int npts[1];
- int found;
- ! int i,ROP;
-
- if (py_pts[0].x == 0-1)
- return(0);
- ***************
- *** 656,681 ****
- npts[0] =i;
-
- /*
- * do we want this baby filled ????
- */
- if ((int)panel_get_value(command_choice)==POLY_F)
- ! 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);
-
- /*
- * do we want to wrap the polygon up in a vector border
- */
- ! if ((int)panel_get_value(border_cycle))
- {
- i=1;
- while (i<MAX_POLY && (py_pts[i].x != -1))
- {
- pw_vector(pw,py_pts[i].x,py_pts[i].y,
- ! py_pts[i-1].x,py_pts[i-1].y,PIX_SRC,cur_color);
- i++;
- }
- i--;
- pw_vector(pw,py_pts[i].x,py_pts[i].y,
- ! py_pts[0].x,py_pts[0].y,PIX_SRC,cur_color);
- }
- clean_poly();
- }
- --- 761,820 ----
- npts[0] =i;
-
- /*
- + * get the current ROP for drawing or default PIX_SRC
- + */
- + if (!(ROP = get_current_ROP()))
- + ROP = PIX_SRC;
- +
- + /*
- + * erase the orginal vectors in the poly, if filled and
- + * the no-border option is set
- + */
- + /*****
- + if ((((int)panel_get_value(command_choice)==POLY_F) &&
- + ((int)panel_get_value(border_cycle) == 0)) ||
- + ((int)panel_get_value(command_choice)==POLY_H) &&
- + (ROP != PIX_SRC))
- + *******/
- + {
- + i=1;
- + while (i<MAX_POLY && (py_pts[i].x != -1))
- + {
- + pw_vector(pw,py_pts[i].x,py_pts[i].y,
- + py_pts[i-1].x,py_pts[i-1].y, PIX_XOR,1);
- + i++;
- + }
- + }
- +
- +
- + /*
- * do we want this baby filled ????
- */
- if ((int)panel_get_value(command_choice)==POLY_F)
- ! {
- ! if (!(ROP = get_current_ROP()))
- ! ROP = PIX_SRC;
-
- + pw_polygon_2(pw,0,0,1,npts,py_pts,PIX_COLOR(cur_color) | ROP,pattern[(int)panel_get_value(pattern_choice)],0,0);
- + }
- +
- /*
- * do we want to wrap the polygon up in a vector border
- + * but if we on unfilled-poly then always do vectors
- */
- ! if (((int)panel_get_value(border_cycle)) ||
- ! ((int)panel_get_value(command_choice)==POLY_H))
- {
- i=1;
- while (i<MAX_POLY && (py_pts[i].x != -1))
- {
- pw_vector(pw,py_pts[i].x,py_pts[i].y,
- ! py_pts[i-1].x,py_pts[i-1].y,PIX_COLOR(cur_color) | ROP,cur_color);
- i++;
- }
- i--;
- pw_vector(pw,py_pts[i].x,py_pts[i].y,
- ! py_pts[0].x,py_pts[0].y,PIX_COLOR(cur_color) | ROP,cur_color);
- }
- clean_poly();
- }
- diff -c ./fat.c ../../Ver2.3/source/fat.c
- *** ./fat.c Mon Jun 13 23:53:24 1988
- --- ../../Ver2.3/source/fat.c Fri Jun 17 00:27:13 1988
- ***************
- *** 30,35 ****
- --- 30,40 ----
- date: Tue Mar 22 22:04:58 EST 1988
- author: rayk
- changes:add comments
- +
- + date: Sun Jun 5 23:47:42 EDT 1988
- + author: rayk
- + changes:fixed bug in magnify, so that it does
- + a save_screen when you go into fat_mode
- **************************************************************************/
-
- #include "header.h"
- ***************
- *** 57,62 ****
- --- 62,68 ----
- fat_source_x = select_pt_x- (int)window_get(fat_canvas, CANVAS_WIDTH)/magnify_fac/2;
- fat_source_y = select_pt_y- (int)window_get(fat_canvas, CANVAS_HEIGHT)/magnify_fac/2;
- clean_point();
- + save_screen();
- (void)window_set(fat_frame, WIN_SHOW, TRUE, 0);
- select_fat_region();
- fat_update(0,0);
- ***************
- *** 137,143 ****
- {
- x = fat_source_x + x/magnify_fac;
- y = fat_source_y + y/magnify_fac;
- ! update_cur_color(0,0,pw_get(pw,x,y));
- }
-
-
- --- 143,150 ----
- {
- x = fat_source_x + x/magnify_fac;
- y = fat_source_y + y/magnify_fac;
- ! if (pw->pw_pixrect->pr_depth > 1)
- ! update_cur_color(0,0,pw_get(pw,x,y));
- }
-
-
- diff -c ./ffill.c ../../Ver2.3/source/ffill.c
- *** ./ffill.c Mon Jun 13 23:53:25 1988
- --- ../../Ver2.3/source/ffill.c Fri Jun 17 00:27:15 1988
- ***************
- *** 76,83 ****
- ffill(x,y,n)
- int x,y,n;
- {
- ! int flag;
- ! register i,j,k,bx;
-
- if (window_get(canvas, WIN_EVENT_STATE, MS_RIGHT))
- return(FILL_CANCEL);
- --- 76,83 ----
- ffill(x,y,n)
- int x,y,n;
- {
- ! int flag,bx;
- ! register i,j,k;
-
- if (window_get(canvas, WIN_EVENT_STATE, MS_RIGHT))
- return(FILL_CANCEL);
- ***************
- *** 91,98 ****
- --- 91,141 ----
- bx = i;
- else
- {
- + break;
- + }
- + }
- + for (j=x+1;j<image_wid;j++)
- + if (pw_get(pw,j,y)!=n)
- + bx = j;
- + else
- + {
- pw_vector(pw,bx,y,x,y, PIX_SRC,n);
- break;
- + }
- +
- + flag = 0;
- + for (k=i+1;k<j;k++)
- + {
- + if (pr_get(pw->pw_prretained,k,y-1)!=n)
- + flag = ffill(k-1,y-1,n);
- + if (pr_get(pw->pw_prretained,k,y+1)!=n)
- + flag = ffill(k-1,y+1,n);
- + if (flag) break;
- + }
- + return(flag);
- + }
- +
- + /******************************************************
- + ffill(x,y,n)
- + int x,y,n;
- + {
- + int flag,bx;
- + register i,j,k;
- +
- + if (window_get(canvas, WIN_EVENT_STATE, MS_RIGHT))
- + return(FILL_CANCEL);
- +
- + if (x<0 || x>=image_wid || y<0 || y>=image_hgt || pw_get(pw,x,y)==n)
- + return(0);
- + pw_put(pw,x,y,n);
- + bx = x-1;
- + for (i=x-1;i>=0;i--) {
- + if (pw_get(pw,i,y)!=n)
- + bx = i;
- + else
- + {
- + pw_vector(pw,bx,y,x,y, PIX_SRC,n);
- + break;
- }
- }
- bx = x+1;
- ***************
- *** 117,119 ****
- --- 160,163 ----
- return(flag);
- }
-
- + **********************************************************/
- diff -c ./header.h ../../Ver2.3/source/header.h
- *** ./header.h Mon Jun 13 23:51:58 1988
- --- ../../Ver2.3/source/header.h Fri Jun 17 00:25:27 1988
- ***************
- *** 37,43 ****
- #include <suntool/canvas.h>
- #include <suntool/walkmenu.h>
- #include <suntool/scrollbar.h>
- - #include <math.h>
- #include <pixrect/pixrect_hs.h>
-
-
- --- 37,42 ----
- ***************
- *** 67,75 ****
- #define INVERSE 2
- #define ROTATE 3
- #define COPY 4
- ! #define PASTE 5
- #define MOVE 6
- #define CUT 7
-
- #define PIX_XOR PIX_SRC^PIX_DST
- #define MAX_PTS 3000
- --- 66,75 ----
- #define INVERSE 2
- #define ROTATE 3
- #define COPY 4
- ! #define SCALE 5
- #define MOVE 6
- #define CUT 7
- + #define PASTE 8
-
- #define PIX_XOR PIX_SRC^PIX_DST
- #define MAX_PTS 3000
- ***************
- *** 128,133 ****
- --- 128,135 ----
- extern char file_name[MAX_FILE_NAME];
- extern struct pixrect *cut_buffer_pr,*undo_pr;
- extern struct pixfont *main_font;
- + extern struct pixrect *brush_temp_pr;
- + extern struct pixrect *brush_temp_pr2;
- extern struct pixrect *pattern[];
- extern struct pixrect *brushes[];
- extern struct pixfont *font_array[];
- ***************
- *** 160,175 ****
-
-
- extern Frame base_frame,fat_frame,color_frame;
- extern Canvas canvas,fat_canvas,color_canvas;
- extern Pixwin *pw,*fat_pw,*color_pw;
- extern Scrollbar vertical_sb, horizontal_sb;
- extern Panel panel,fat_panel,color_panel,pattern_panel,
- brush_panel,region_panel,command_panel;
- ! extern Panel_item magnify_cycle, command_choice,text_size_item;
- extern Panel_item text_panel,file_panel,brush_choice,mono_cycle,save_cycle,
- msg_string,color_button,border_cycle,view_cycle,current_pattern,
- load_cycle,pattern_choice,region_choice,grid_cycle,
- ! compress_cycle,undo_button;
-
- extern struct pixrect brush1_pr,brush2_pr,brush3_pr,
- brush4_pr,brush5_pr,brush6_pr;
- --- 162,179 ----
-
-
- extern Frame base_frame,fat_frame,color_frame;
- + extern Frame confirmer;
- extern Canvas canvas,fat_canvas,color_canvas;
- extern Pixwin *pw,*fat_pw,*color_pw;
- extern Scrollbar vertical_sb, horizontal_sb;
- extern Panel panel,fat_panel,color_panel,pattern_panel,
- brush_panel,region_panel,command_panel;
- ! extern Panel_item magnify_cycle, command_choice,text_size_item,height_text,width_text;
- ! extern Panel_item lasso_remove;
- extern Panel_item text_panel,file_panel,brush_choice,mono_cycle,save_cycle,
- msg_string,color_button,border_cycle,view_cycle,current_pattern,
- load_cycle,pattern_choice,region_choice,grid_cycle,
- ! compress_cycle,undo_button,ROP_cycle,yes_button,no_button;
-
- extern struct pixrect brush1_pr,brush2_pr,brush3_pr,
- brush4_pr,brush5_pr,brush6_pr;
- ***************
- *** 209,215 ****
- extern struct pixrect reg_command1_pr,reg_command2_pr,
- reg_command3_pr,reg_command4_pr,
- reg_command5_pr,reg_command6_pr,
- ! reg_command7_pr,reg_command8_pr;
-
- extern char *malloc();
- extern quit();
- --- 213,220 ----
- extern struct pixrect reg_command1_pr,reg_command2_pr,
- reg_command3_pr,reg_command4_pr,
- reg_command5_pr,reg_command6_pr,
- ! reg_command7_pr,reg_command8_pr,
- ! reg_command9_pr;
-
- extern char *malloc();
- extern quit();
- ***************
- *** 234,240 ****
- extern poly_addpt();
- extern clear_screen();
- extern clean_poly();
- ! extern confirmer();
- extern draw_circle();
- extern draw_oval();
- extern init_colortable();
- --- 239,245 ----
- extern poly_addpt();
- extern clear_screen();
- extern clean_poly();
- ! extern confirm();
- extern draw_circle();
- extern draw_oval();
- extern init_colortable();
- ***************
- *** 251,253 ****
- --- 256,263 ----
- extern select_pattern();
- extern char *expand_file_name();
- extern make_new_name();
- + extern int get_current_ROP();
- + extern resize_canvas();
- + extern return_true();
- + extern return_false();
- +
- diff -c ./info.c ../../Ver2.3/source/info.c
- *** ./info.c Mon Jun 13 23:53:33 1988
- --- ../../Ver2.3/source/info.c Fri Jun 17 00:27:19 1988
- ***************
- *** 32,37 ****
- --- 32,43 ----
- date: Tue Mar 22 22:04:58 EST 1988
- author: rayk
- changes:add comments
- +
- + date: Wed Jun 15 18:12:16 EDT 1988
- + author: rayk
- + changes:changed error messages for "info" and "help"
- + suggested by ian%sq.sq.com@RELAY.CS.NET
- +
- **************************************************************************/
-
- #include "header.h"
- ***************
- *** 58,64 ****
- fp = fopen(INFO_IMAGE,"r");
- if (!fp)
- {
- ! ERROR("I Could not find the information file !!!!");
- view_flag = FALSE;
- fclose(fp);
- return(0);
- --- 64,70 ----
- fp = fopen(INFO_IMAGE,"r");
- if (!fp)
- {
- ! ERRORstr("I Could not find the information file : ",INFO_IMAGE);
- view_flag = FALSE;
- fclose(fp);
- return(0);
- ***************
- *** 66,72 ****
- temp_pr = (struct pixrect *)pr_load(fp,color_map);
- if (!temp_pr)
- {
- ! ERROR("I Could not find the information file !!!!");
- view_flag = FALSE;
- fclose(fp);
- return(0);
- --- 72,78 ----
- temp_pr = (struct pixrect *)pr_load(fp,color_map);
- if (!temp_pr)
- {
- ! ERRORstr("I could not load the information file : ",INFO_IMAGE);
- view_flag = FALSE;
- fclose(fp);
- return(0);
- ***************
- *** 136,141 ****
- --- 142,148 ----
- char *frame_label;
- {
- Rect *r;
- + Pixwin *temp_pw;
-
- if (view_flag)
- {
- ***************
- *** 146,203 ****
- r = (Rect *) window_get(base_frame, WIN_RECT);
- view_frame = window_create(base_frame,FRAME,
- FRAME_LABEL, frame_label,
- FRAME_SHOW_LABEL, TRUE,
- - WIN_SHOW, TRUE,
- WIN_FONT, main_font,
- - WIN_WIDTH, view_pr->pr_size.x+20,
- - WIN_HEIGHT, view_pr->pr_size.y+60,
- WIN_X, (r->r_width - view_pr->pr_size.x+20)/2,
- WIN_Y, (r->r_height - view_pr->pr_size.y+50)/4,
- 0);
-
- view_canvas =
- window_create(view_frame, CANVAS,
- ! WIN_CONSUME_PICK_EVENTS, WIN_NO_EVENTS,WIN_MOUSE_BUTTONS,
- ! LOC_DRAG, LOC_WINENTER,
- ! LOC_MOVE,
- ! 0,
- ! WIN_X, 0,
- ! WIN_Y, ATTR_ROW(2)+5,
- ! CANVAS_WIDTH, view_pr->pr_size.x+5,
- ! CANVAS_HEIGHT, view_pr->pr_size.y+5,
- ! CANVAS_AUTO_SHRINK, TRUE,
- ! CANVAS_FIXED_IMAGE, FALSE,
- ! CANVAS_AUTO_EXPAND, TRUE,
- ! CANVAS_RETAINED, TRUE,
- ! 0),
- !
- view_pw = canvas_pixwin(view_canvas);
-
- if (view_pr->pr_depth > 1)
- {
- pw_setcmsname(view_pw, "ray kreisel");
- pw_putcolormap(view_pw, 0,256,temp_red,temp_green,temp_blue);
- }
-
- - view_panel = window_create(view_frame, PANEL,
- - PANEL_LABEL_BOLD, TRUE,
- - WIN_FONT, main_font,
- - WIN_X, 0,
- - WIN_Y, 3,
- - WIN_HEIGHT, ATTR_ROW(1)+4,
- - 0);
- -
- - (void)panel_create_item(view_panel, PANEL_BUTTON,
- - PANEL_ITEM_X, ATTR_COL(0),
- - PANEL_ITEM_Y, ATTR_ROW(0),
- - PANEL_LABEL_IMAGE, panel_button_image(view_panel, "done", 5, (Pixfont *)0),
- - PANEL_NOTIFY_PROC, view_done,
- - 0);
-
- /* write the image files to the canvas */
-
- pw_write(view_pw,0,0,view_pr->pr_size.x,
- view_pr->pr_size.y,PIX_SRC, view_pr,0,0);
- }
-
-
- --- 153,221 ----
- r = (Rect *) window_get(base_frame, WIN_RECT);
- view_frame = window_create(base_frame,FRAME,
- FRAME_LABEL, frame_label,
- + FRAME_INHERIT_COLORS, TRUE,
- FRAME_SHOW_LABEL, TRUE,
- WIN_FONT, main_font,
- WIN_X, (r->r_width - view_pr->pr_size.x+20)/2,
- WIN_Y, (r->r_height - view_pr->pr_size.y+50)/4,
- 0);
-
- + view_panel = window_create(view_frame, PANEL,
- + PANEL_LABEL_BOLD, TRUE,
- + WIN_FONT, main_font,
- + 0);
- +
- + (void)panel_create_item(view_panel, PANEL_BUTTON,
- + PANEL_ITEM_X, ATTR_COL(0),
- + PANEL_ITEM_Y, ATTR_ROW(0),
- + PANEL_LABEL_IMAGE, panel_button_image(view_panel, "done", 5, (Pixfont *)0),
- + PANEL_NOTIFY_PROC, view_done,
- + 0);
- + window_fit(view_panel);
- +
- view_canvas =
- window_create(view_frame, CANVAS,
- ! WIN_CONSUME_PICK_EVENTS, WIN_NO_EVENTS,WIN_MOUSE_BUTTONS,
- ! LOC_DRAG, LOC_WINENTER,
- ! LOC_MOVE,
- ! 0,
- ! WIN_X, 0,
- ! WIN_BELOW, view_panel,
- ! WIN_WIDTH, view_pr->pr_size.x,
- ! WIN_HEIGHT, view_pr->pr_size.y,
- ! CANVAS_WIDTH, view_pr->pr_size.x,
- ! CANVAS_HEIGHT, view_pr->pr_size.y,
- ! CANVAS_AUTO_SHRINK, FALSE,
- ! CANVAS_FIXED_IMAGE, TRUE,
- ! CANVAS_AUTO_EXPAND, FALSE,
- ! CANVAS_RETAINED, TRUE,
- ! 0),
- !
- view_pw = canvas_pixwin(view_canvas);
-
- +
- if (view_pr->pr_depth > 1)
- {
- pw_setcmsname(view_pw, "ray kreisel");
- pw_putcolormap(view_pw, 0,256,temp_red,temp_green,temp_blue);
- +
- + temp_pw = (Pixwin *)window_get(view_frame, WIN_PIXWIN);
- + pw_setcmsname(temp_pw, "ray kreisel");
- + pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
- +
- + temp_pw = (Pixwin *)window_get(view_panel, WIN_PIXWIN);
- + pw_setcmsname(temp_pw, "ray kreisel");
- + pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
- }
-
-
- /* write the image files to the canvas */
-
- pw_write(view_pw,0,0,view_pr->pr_size.x,
- view_pr->pr_size.y,PIX_SRC, view_pr,0,0);
- +
- + window_fit(view_frame);
- + window_set(view_frame, WIN_SHOW, TRUE, 0);
- }
-
-
- ***************
- *** 211,217 ****
-
- if (!file_exist(HELP_FILE))
- {
- ! ERROR("I cannot find the man page for touchup !!!");
- return(0);
- }
-
- --- 229,235 ----
-
- if (!file_exist(HELP_FILE))
- {
- ! ERRORstr("I cannot find the man page for touchup : ",HELP_FILE);
- return(0);
- }
-
- ***************
- *** 231,237 ****
- view_frame = window_create(base_frame,FRAME,
- FRAME_LABEL, "Help window",
- FRAME_SHOW_LABEL, TRUE,
- - WIN_SHOW, TRUE,
- WIN_FONT, main_font,
- WIN_X, (r->r_width - 600+20)/2,
- WIN_Y, (r->r_height - 512+50)/4,
- --- 249,254 ----
- ***************
- *** 258,264 ****
- WIN_X, 0,
- WIN_Y, ATTR_ROW(2)+5,
- WIN_HEIGHT, 512,
- ! WIN_WIDTH, 600,
- TEXTSW_FONT, main_font,
- TEXTSW_IGNORE_LIMIT, TEXTSW_INFINITY,
- TEXTSW_AUTO_INDENT, TRUE,
- --- 275,281 ----
- WIN_X, 0,
- WIN_Y, ATTR_ROW(2)+5,
- WIN_HEIGHT, 512,
- ! WIN_WIDTH, 620,
- TEXTSW_FONT, main_font,
- TEXTSW_IGNORE_LIMIT, TEXTSW_INFINITY,
- TEXTSW_AUTO_INDENT, TRUE,
- ***************
- *** 269,274 ****
- --- 286,292 ----
- 0);
-
- window_fit(view_frame);
- + window_set(view_frame, WIN_SHOW, TRUE, 0);
- }
-
-
-
-