From 11db5ca45c06db488b1f5daaeac07f0b0496a6cf Mon Sep 17 00:00:00 2001 From: juliandescottes Date: Sat, 21 Jan 2017 18:24:48 +0100 Subject: [PATCH] remove getBoundRectanglePixels from PixelUtils --- src/js/utils/PixelUtils.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/js/utils/PixelUtils.js b/src/js/utils/PixelUtils.js index a397313b..cdfd9f59 100644 --- a/src/js/utils/PixelUtils.js +++ b/src/js/utils/PixelUtils.js @@ -16,24 +16,6 @@ return pixels; }, - getBoundRectanglePixels : function (x0, y0, x1, y1) { - var rectangle = this.getOrderedRectangleCoordinates(x0, y0, x1, y1); - var pixels = []; - // Creating horizontal sides of the rectangle: - for (var x = rectangle.x0; x <= rectangle.x1; x++) { - pixels.push({'col': x, 'row': rectangle.y0}); - pixels.push({'col': x, 'row': rectangle.y1}); - } - - // Creating vertical sides of the rectangle: - for (var y = rectangle.y0; y <= rectangle.y1; y++) { - pixels.push({'col': rectangle.x0, 'row': y}); - pixels.push({'col': rectangle.x1, 'row': y}); - } - - return pixels; - }, - /** * Return an object of ordered rectangle coordinate. * In returned object {x0, y0} => top left corner - {x1, y1} => bottom right corner