Merge pull request #96 from CSnap/fix_getConvexHullPointsForDrawable

Round pixelBase
This commit is contained in:
Andrew Sliwinski 2017-03-02 08:47:00 -05:00 committed by GitHub
commit fc7610716e

View File

@ -1122,7 +1122,7 @@ class RenderWebGL extends EventEmitter {
* @return {int} Known ID at that pixel, or RenderConstants.ID_NONE.
*/
const _getPixel = (x, y) => {
const pixelBase = ((width * y) + x) * 4;
const pixelBase = Math.round(((width * y) + x) * 4); // Sometimes SVGs don't have int width and height
return Drawable.color3bToID(
pixels[pixelBase],
pixels[pixelBase + 1],