Functional Fills with Vecto

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!

XOR pixel function

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.

OR pixel function

And this demonstrates an inclusive-OR fill: the standard additive colour chart.

2 comments

  1. 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!

  2. 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.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.