{"id":468,"date":"2008-03-25T21:38:36","date_gmt":"2008-03-26T05:38:36","guid":{"rendered":"http:\/\/www.elbeno.com\/blog\/?p=468"},"modified":"2008-03-25T21:39:20","modified_gmt":"2008-03-26T05:39:20","slug":"functional-fills-with-vecto","status":"publish","type":"post","link":"https:\/\/www.elbeno.com\/blog\/?p=468","title":{"rendered":"Functional Fills with Vecto"},"content":{"rendered":"<p>I&#8217;ve been wanting to do exclusive-or functional fill in <a href=\"http:\/\/www.xach.com\/lisp\/vecto\/\">vecto<\/a> 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!<\/p>\n<p><a href=\"http:\/\/www.flickr.com\/photos\/88319047@N00\/2362602455\/\" title=\"XOR pixel function by villagelinca, on Flickr\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/farm3.static.flickr.com\/2404\/2362602455_ef566cc7f6_o.png\" width=\"500\" height=\"500\" alt=\"XOR pixel function\" \/><\/a><\/p>\n<p>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.<\/p>\n<p><a href=\"http:\/\/www.flickr.com\/photos\/88319047@N00\/2362602459\/\" title=\"OR pixel function by villagelinca, on Flickr\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/farm4.static.flickr.com\/3117\/2362602459_2b7048074e_o.png\" width=\"500\" height=\"500\" alt=\"OR pixel function\" \/><\/a><\/p>\n<p>And this demonstrates an inclusive-OR fill: the standard additive colour chart.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;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&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,8],"tags":[],"class_list":["post-468","post","type-post","status-publish","format-standard","hentry","category-lisp","category-programming"],"_links":{"self":[{"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/468","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=468"}],"version-history":[{"count":0,"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/468\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=468"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=468"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=468"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}