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

Six languages worth knowing

6 December, 200718 July, 2008

“A language that doesn’t affect the way you think about programming, is not worth knowing” – Alan Perlis. I’ve thought about this, and developed a short list of languages worth knowing. Not-so-coincidentally, each language in my list embodies a distinct computational model. In no particular order: The ALGOL family. C…

Read More

Exercising Ranges (part 3)

1 July, 20151 July, 2015

(Start at the beginning of the series if you want more context.) So, I was going to implement monoidal_zip, and to do that, I would clone zip_with.hpp. So I did that. Eric’s a great library author, and the ranges code is pretty easy to read. For the most part I…

Read More

Arc’s debut

3 February, 2008

(Seems like this is just about what’s happened) Paul Graham: Behold, Arc! (disclaimer: blah blah blah) Rest of the Lisp-speaking world: Dude, weren’t you working for like 5 years on this? Now you give us a wrapper on Scheme? PG: Look, I know it’s a bit pre-alpha, but give it…

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