Xref: utzoo unix-pc.general:3915 comp.sys.att:7825 Path: utzoo!attcan!hjespers From: hjespers@attcan.UUCP (Hans Jespersen) Newsgroups: unix-pc.general,comp.sys.att Subject: Re: general purpose bit blitter Message-ID: <10435@attcan.UUCP> Date: 20 Oct 89 13:47:10 GMT References: <1989Oct19.161204.3420@sun.soe.clarkson.edu> Organization: AT&T Canada Inc., Toronto Lines: 33 dean@image.soe.clarkson.edu (Dean Swan): > Along the lines of RAM access, I need to plot waveforms and such in a window. > I wrote a line drawing routine that calls WRASTOP, but it is painfully slow. > I suspect that it is because WRASTOP issues a refresh to the window, before > doing a blit evertime it is called. I've thought about reimplementing it to > build a bitmap in user memory of the line and then just doing a single WRASTOP > call to copy it to the window, but that seems like an awful lot of work just > to draw a line. Can anyone help? WRASTOP will accept destination bitmaps (dstbase) other than the screen. You define an array like this: unsigned short Bitmap[WIDTH * HEIGHT / 16]; and then use WRASTOP like this: /* repeat until Bitmap is what you want on the screen */ for(;;){ wrastop( w, srcbase, srcwidth, Bitmap, WIDTH/8, srcx, srcy, dstx, dsty, width, height, srcop, dstop, pattern); } /* Wack Bitmap onto screen */ wrastop( w, Bitmap, WIDTH/8, 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SRCSRC, DSTSRC, 0); BUT, if all you are doing is building a line it would be even better to just fiddle with the bits in Bitmap[] directly. (ie. Bitmap[offset] |= 0x0001) and then print the Bitmap on the screen. -- Hans Jespersen UUCP: uunet!attcan!hjespers AT&T Canada Inc. Toronto, Ontario "Yabba Dabba Doo" -- F. Flintstone