kangax/fabric.js — pull request #277 by sjpemberton09 (2012-10-07 16:46:51+00:00)
Title: Support for hit testing transparent pixels.

Added an implementation to test pixel transparency after the initial bounding box hit test has been done.

This can be turned on/off with a property on the canvas or opted in for individual objects instead.
Also added a 'tolerance' to the hit test allowing the area to test to be expanded around the original hit point.
This will obviously add a performance overhead but could be useful if dealing with lots of single pixel paths etc.

There is also code I added to fix the issue I reported in issue #274.
This fixes an issue when a paths width is calculated as negative by making it positive instead.
Does a negative width ever make sense?

Will remove if required.