🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.msdos.programmer
Article #415

Re: graphic stencils

#415
From: Charles Hannum
Date: Tue, 28 Nov 1989 02:29
25 lines
1537 bytes
The easiest way I can think of to do this is the following:

Create a negative of the image in black-and-white.  Basically, the area that
you want to block out (to be overwritten by the actual image) should be black,
while the rest of the pattern should be white.  This pattern should be the
same size as the actual image.

Then, simply AND this with the background using putimage(), then OR the image
itself onto the screen, again using putimage().  The OR and AND functions are
a parameter to putimage().  I can't remember the format right off hand, but
you can look it up.

This method is used quite often in animation.  Its main feature is that it can
handle multiple colors.

If you using only a two-color system, of course, you can just OR the image on
to the screen.

If you need more help, I can email a sample program.

--
- Charles Martin Hannum II       "Klein bottle for sale ... inquire within."
    (That's Charles to you!)     "To life immortal!"
  cmh117@psuvm.{bitnet,psu.edu}  "No noozzzz izzz netzzzsnoozzzzz..."
  c9h@psuecl.{bitnet,psu.edu}    "Mem'ry, all alone in the moonlight ..."
Technical Details
Message-ID: <89331.212952CMH117@PSUVM.BITNET>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!samsung!brutus.cs.uiuc.edu!psuvax1!psuvm!cmh117
References: <586@titan.tsd.arlut.utexas.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!samsung!brutus.cs.uiuc.edu!psuvax1!psuvm!cmh117
From: CMH117@PSUVM.BITNET (Charles Hannum)
Newsgroups: alt.msdos.programmer,comp.sys.ibm.pc
Subject: Re: graphic stencils
Message-ID: <89331.212952CMH117@PSUVM.BITNET>
Date: 28 Nov 89 02:29:52 GMT
References: <586@titan.tsd.arlut.utexas.edu>
Organization: Penn State University
Lines: 25