If the method fails, it returns one of the other elements of the Status enumeration. If the method succeeds, it returns Ok, which is an element of the Status enumeration. Integer that specifies the y-coordinate of the rendering origin. Integer that specifies the x-coordinate of the rendering origin. The rendering origin is used to set the dither origin for 8-bits-per-pixel and 16-bits-per-pixel dithering and is also used to set the origin for hatch brushes. I would say my favorites out of those is just the generic Bayer 16x16 as well as the cross hatch right with randomness (called Cross hatch Right (R) in the app).The Graphics::SetRenderingOrigin method sets the rendering origin of this Graphics object.
#PAINTBRUSH APP PIXEL DITHER CODE#
Making a basic implementation of the algorithms is not that hard to do, what took more time was converting everything to WebGL (which I had never used before) and trying to make a generic architecture so I could increase code reuse.Īs far as my favorites, when I started I was partial to the Atkinson dither, but as time went one I took a liking to the ordered dithers since (in my opinion) I think they look better pixelated. I also made some of the ordered dither patterns and variations on the algorithms myself (like the stark ordered dither or reduced Atkinson). I started out with the algorithms from this 11 dithering algorithms blog post (which was also the initial inspiration for this whole project) and gradually added more as I discovered them through blog posts or university lecture slides. It's difficult to say exactly how long that took me, because I didn't do everything all at once.