Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!bloom-beacon!gatech!udel!rochester!PT.CS.CMU.EDU!G.GP.CS.CMU.EDU!hjelm From: hjelm@G.GP.CS.CMU.EDU (Mark Hjelm) Newsgroups: comp.windows.news Subject: fast bitmaps Message-ID: <172@PT.CS.CMU.EDU> Date: Wed, 14-Oct-87 15:37:15 EDT Article-I.D.: PT.172 Posted: Wed Oct 14 15:37:15 1987 Date-Received: Fri, 16-Oct-87 04:49:32 EDT Sender: netnews@PT.CS.CMU.EDU Organization: Carnegie-Mellon University, CS/RI Lines: 60 I am in the process of porting a window manager to run under NeWS that relies heavily on ropping pixrects to the screen. I am not satisfied at all with the performance I'm getting. Is there anything I can to better? Does NeWS support Unix domain sockets in any way? Here's my code: Postscript: cdef news_win_update(id,width,height,x,y) { %% assumes everything is on a byte boundary /win Windows id get def win /Canvas get setcanvas /str width 8 idiv string def gsave x y translate width height scale width height 1 [ width 0 0 height neg 0 height ] { currentfile str readstring pop } image grestore } exec %% so it doesn't interfere with readstring C: void do_update(pr,width,height,x,y) struct pixrect *pr; int width, height, x, y; { int d, i; struct mpr_data *mpr; char *data; d = x % 8; /* align on byte boundary */ x -= d; width += d; width = (width + 7) / 8 * 8; news_win_update(ID,width,height,x,WINDOW_HEIGHT-(y+height)); mpr = (string mpr_data *) pr->pr_data; data = (char *) mpr->md_image; data += (y * mpr->md_linebytes) + (x / 8); for (i=0; imd_linebytes; } } Thanks, Mark ARPA: hjelm@g.gp.cs.cmu.edu UUCP: seismo!g.gp.cs.cmu.edu!hjelm CSNET: hjelm%pt.cs.cmu.edu@csnet-relay