Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!henry
From: henry@utzoo.UUCP (Henry Spencer)
Newsgroups: net.graphics
Subject: Re: rasterops
Message-ID: <5988@utzoo.UUCP>
Date: Wed, 25-Sep-85 13:34:31 EDT
Article-I.D.: utzoo.5988
Posted: Wed Sep 25 13:34:31 1985
Date-Received: Wed, 25-Sep-85 13:34:31 EDT
References: <588@stc-b.stc.UUCP>
Organization: U of Toronto Zoology
Lines: 33

> Henry, how about a succinct explanation/definition of rasterops?.

Sorry I've been so long getting back to this.  I'm posting it because
there is some chance that non-experts might not know this.

RasterOp (also known as BitBlt) is the basic primitive operation for
modern bit-map raster graphics.  It combines a source rectangle of bits
with a destination rectangle of bits, with a number of variations on the
combining function.  Using C notation, D=S gives straight copying, D|=S
gives "overprinting", D^=S gives reversible overprinting that is very
useful for things like highlighting and cursors, D&=~S gives erasing, a
few other combinations give useful results.  Most RasterOp implementations
also support replication of a "texture" over a rectangle, again potentially
using any of the combining functions.  There are various other complexities
that some implementations add:  clipping, combining two source rectangles
before working on the destination, etc.  Extensions to handle more than
one bit per pixel are straightforward although the combining functions
become much more complicated.

RasterOp, under its old name BitBlt, was invented at Xerox PARC by the
Alto crowd.  (BitBlt is "bit block transfer".)  It's been copied everywhere.
Most raster workstations incorporate it; many of them have hardware to do
it, or at least to assist the software in doing it.  Mind you, said hardware
isn't always as useful as the designers thought, but that's another issue.
Such hardware generally has to be custom chips or custom circuits, since
none of the standard display controllers does anything useful about it.

For a full rundown, see the second edition of Newman&Sproull.  The paper
in (I think) the February Software-Practice&Experience by Pike et al is
also very much worth reading.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry