remove getBoundRectanglePixels from PixelUtils

This commit is contained in:
juliandescottes 2017-01-21 18:24:48 +01:00
parent 37445202f3
commit 11db5ca45c

View File

@ -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