Opaque patterns

Allan Christian Long acl3k at topaz.cs.Virginia.EDU
Thu May 9 06:24:42 AEST 1991


Could someone please tell me how to do opaque patterns?  Here's what
I mean:  I have defined a pattern with defpattern.  When I draw
filled primitives with that pattern set, pixels corresponding to
1's in the pattern get set to the current color and pixels
corresponding to 0's in the pattern are unchanged.  Sometimes
this is what I want.  BUT, sometimes I want the 1's in the
pattern set to one color, and the 0's set to a different color.
	I have tried various things, such as drawing the primitive
once with logicop(LO_NSRC) in one color and again with logicop(LO_SRC)
in a different color, but I end up with the same thing as if I
had just drawn it the second way.
	I guess I could invert the pattern myself and use two
different patterns to get what I want, but I was hoping there
would be an easier way.
	Thanks in advance for any help.



A. Chris Long, Jr.
acl3k at virginia.edu
"You can't have everything.  Where would you put it?"  - Steven Wright



More information about the Comp.sys.sgi mailing list