rezoner / CanvasQuery

Canvas for 2d gamedevelopers. Out of box canvas, keyboard, mouse, events.
http://canvasquery.com
586 stars 52 forks source link

fixed some minor bugs in the blend functions #6

Closed denniskaselow closed 11 years ago

denniskaselow commented 11 years ago

Some minor things in the blend functions I discovered when I added tests to the Dart-port:

overlay: a<128 is always true because 'a' has been divided by 255 dodge: results in values larger than 255 for large 'a' and large 'b' burn: results in values smaller than 0 for small 'a' and small 'b' divide: never goes negative

rezoner commented 11 years ago

Thanks! Overlay is probably the most important blend mode. Can't believe I overlooked that gross bug.