I’ve been wanting to do exclusive-or functional fill in vecto for a while, so tonight I delved in. I added a pixel function to the graphics state and kept the default as the normal alpha-blending it was already doing. The pixel function signature is a bit clumsy, but it was easy to knock up a couple of functional fill demos. Programmer art alert!
This is a cyan background, and a circle drawn with an XOR function, white fill, and green stroke. From this you can see that the fill happened before the stroke, since the stroke is half-and-half.
And this demonstrates an inclusive-OR fill: the standard additive colour chart.
LOOK how pretty that is! How long were you working on it, to get it right? PS That cyan color will ALWAYS say ‘computer!’ to me!
Well, Gary kept me distracted, so I started on it about 9. But it was easy really – I was done in about an hour. All I had to do was redirect the inner pixel drawing bit to a function, transplant the default, and hook up the accessor/mutator functions in the graphics state. The XOR and OR pixel functions were a simple test.