Skip to content
Why is a raven like a writing desk?

Thoughts both confusing and enlightening.

Why is a raven like a writing desk?

Thoughts both confusing and enlightening.

Functional Fills with Vecto

elbeno, 25 March, 200825 March, 2008

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.

Lisp Programming

Post navigation

Previous post
Next post

Related Posts

The Camel Has Two Humps

6 June, 200729 July, 2007

I’ve just been reading an interesting paper on teaching programming. First, the data regarding rates of attrition on computing courses is startling. Between 30% and 60% of the total CS intake fails the very first programming course! The paper’s authors postulate 3 programming hurdles to be negotiated: sequencing and assignment…

Read More

“Smart and Gets Things Done”?

29 January, 200828 February, 2008

I work for a big games company as a senior programmer, and I’m a regular on the interview loop. While I’d love to hire candidates who are smart and get things done, the reality of the situation is that more often than not I also have to hire candidates with…

Read More

VS2010 woes: tuples as map keys

20 February, 201530 June, 2015

Another day, another compiler/library bug. If you’re unfortunate enough to still be using Visual Studio 2010, don’t use tuples as map keys. #include #include #include using namespace std; typedef tuple FooT; typedef map MapT; int main(int, char*[]) { MapT m; // put a value in the map { FooT f(nullptr,…

Read More

Comments (2)

  1. Skye says:
    26 March, 2008 at 6:53 am

    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. elbeno says:
    26 March, 2008 at 8:12 am

    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 Reply

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.

©2026 Why is a raven like a writing desk? | WordPress Theme by SuperbThemes