Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bbn!mit-eddie!uw-beaver!rice!sun-spots-request From: grover@argon.hac.com (Dean Grover (ird)) Newsgroups: comp.sys.sun Subject: need help with pw_copy Keywords: Windows Message-ID: <8903031630.AA17625@argon.hac.com> Date: 9 Mar 89 07:24:14 GMT Sender: usenet@rice.edu Organization: Sun-Spots Lines: 73 Approved: Sun-Spots@rice.edu Original-Date: Fri, 3 Mar 89 08:30:55 PST X-Sun-Spots-Digest: Volume 7, Issue 189, message 15 of 17 I have been trying to get the pixwin function pw_copy to work for some time now. I can't seem to get it to work. Are there any known bugs with it ? I have included a sample program which shows what I am trying to do. I want the pixwin from main_frame copied into the pixwin in main_frame2. On all the machines I have tried, the main_frame2 pixwin remains blank. (Sun 3 - OS 3.4,3.5,4.0. Sun 4 - OS 4.0) Thanks in advance. Dean Grover Hughes Aircraft Co. adgrover@hac2arpa.hac.com --- cut here #include #include #include #include main(argc,argv) int argc; char *argv[]; { int status; Frame main_frame,main_frame2; Canvas canvas1,canvas2; Pixwin *pw1,*pw2; main_frame = window_create (NULL,FRAME, WIN_Y, 0, WIN_X, 0, FRAME_LABEL, "Frame 1", 0); main_frame2 = window_create (NULL,FRAME, WIN_Y, 0, WIN_X, 300, FRAME_LABEL, "Frame 2", 0); canvas1 = window_create (main_frame, CANVAS, WIN_WIDTH, 100, WIN_HEIGHT, 100, CANVAS_RETAINED, FALSE, 0); canvas2 = window_create (main_frame2, CANVAS, WIN_WIDTH, 100, WIN_HEIGHT, 100, CANVAS_RETAINED, FALSE, 0); pw1 = canvas_pixwin(canvas1); pw2 = canvas_pixwin(canvas2); window_fit(main_frame); window_fit(main_frame2); window_set(main_frame, WIN_SHOW, TRUE, 0); window_set(main_frame2, WIN_SHOW, TRUE, 0); (void) notify_dispatch(); pw_vector(pw1,0,0,100,100,PIX_SRC,1); pw_vector(pw1,0,100,100,0,PIX_SRC,1); pw_copy(pw2,0,0,100,100,PIX_SRC,pw1,0,0); while (1) { (void) notify_dispatch(); status =pw_copy(pw2,0,0,100,100,PIX_SRC,pw1,0,0); printf("pw_copy status %d\n",status); } }