Description
Expected Behavior
Sprites should have the same appearance when being dragged as when they're not being dragged
Actual Behavior
If you drag a sprite in the editor, a dark outline appears around it:
Note that this was not introduced by #515--as far as I can tell, it's always been a problem.
The problem is that extractDrawable
returns data from gl.readPixels
, which is premultiplied (and has been even before #515, which only moved the premultiplication out of the shader and into the texture upload). All DOM APIs which consume image data, on the other hand, expect non-premultiplied ("straight") alpha.
My first premultiplication PR (#460) added a new draw mode which "un-premultiplies" the alpha of drawn sprites, which I left out of the second in order to reduce the scope of the changes. I'll probably end up making a new PR with said "un-premultiplying" draw mode.
Steps to Reproduce
- Create a lightly-colored sprite
- Drag it