From 4eacde74e6c6b496dad699fa68b8545fa48f99b5 Mon Sep 17 00:00:00 2001 From: SillyInventor Date: Wed, 15 Feb 2017 14:14:03 -0500 Subject: [PATCH] Round pixelBase to allow for non-integer SVG widths in _getConvexHullPointsForDrawable --- src/RenderWebGL.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RenderWebGL.js b/src/RenderWebGL.js index 2899ad2..9aef847 100644 --- a/src/RenderWebGL.js +++ b/src/RenderWebGL.js @@ -992,7 +992,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],