Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!think!ames!amdahl!oliveb!amiga!bart From: bart@amiga.UUCP (Barry A. Whitebook) Newsgroups: comp.sys.amiga Subject: BltMaskBitMapRastPort Message-ID: <1706@amiga.amiga.UUCP> Date: Mon, 24-Aug-87 14:28:59 EDT Article-I.D.: amiga.1706 Posted: Mon Aug 24 14:28:59 1987 Date-Received: Wed, 26-Aug-87 00:57:38 EDT Reply-To: bart@amiga.UUCP (Barry A. Whitebook) Organization: Commodore-Amiga Inc., 16795 Lark Ave. Suite 106, Los Gatos CA 95030 Lines: 35 Keywords: brain damaged [eat this line, please!] this is amiga!bart in response to jesup@steinmetz.steinmetz.UUCP (Randell Jesup) >And the inspiration struck! The BltMaskBitMapRastPort was implemented >as Rob Pecks ClipBlitTransparent was, by blasting a hole in the destination, >then blitting in the new version (2 blits on every plane)! not exactly. my objections to rob's clipblittransparent were 1) it was allocating temporary planes to do the work (bad for system code!) and 2) rob did not do a thourough debugging on all cases of his code. so i wrote BltMaskBitMapRastPort BltMaskBitMapRastPort does not blast a hole in the destination, rather, it performs three clipblits (for a tricky xor type of transfer) thus: clipbltrastport(srcbm,srcx,srcy,dst,dstx,dsty,xsize,ysize,(ABC|ANBNC),TempA); clipbltrastport(tbm,srcx,srcy,dst,dstx,dsty,xsize,ysize,minterm,TempA); clipbltrastport(srcbm,srcx,srcy,dst,dstx,dsty,xsize,ysize,(ABC|ANBNC),TempA); this is at least as reliable as clipbltrastport for system use and only requires a TempA one scan line high by maxbytesperror wide. the REASON for all these shenanigans is that DUE TO A BLITTER LIMITATION, some overlapping blits, not on word boundaries, and using a srcA mask NEED THE MASK TO PERFORM THE RIGHTEDGE/LEFTEDGE BLOCKMASKING. if you are always going to bltmask on word boundaries then the proper thing is to qblit yourself. if you ever run into this cusp case, you will have to either 1) monkey with your mask by creating a copy and jerking with the leftedge/ rightedge bits or 2) doing what is essentially a reprise of the above. of course, if you come up with a more general solution i'll be glad to fold your code into the sytem code for bltbitmaskrastport next release ;-) bart