Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
ctx.fill() uses even-odd instead of non-zero winding rule #51
Implementing the non-zero rule with the stencil buffer would entail the following (I think): Draw to the stencil buffer twice: once for all back-facing polygons, while increasing the stencil buffer, and once for all front-facing polygons, while decreasing the stencil buffer. This would also mean that we'd have to clear the stencil buffer (or the area that we used) afterwards.
Edit: after a bit of googling I found this implementation: http://devel.aegisub.org/changeset/42e4e3e56a5f46e4e4cb83c300813fd675a9a059/src/visual_tool_vector_clip.cpp