Issue #258 : Move resize method to utils + add unit test

This commit is contained in:
jdescottes
2015-11-26 23:35:33 +01:00
parent 67b66e4a10
commit f0ed4927e8
11 changed files with 206 additions and 136 deletions

View File

@@ -36,9 +36,10 @@
};
ns.SimplePen.prototype.drawUsingPenSize = function(color, col, row, frame, overlay) {
var pixels = pskl.app.penSizeService.getPixelsForPenSize(col, row);
pixels.forEach(function (p) {
this.draw(color, p[0], p[1], frame, overlay);
var penSize = pskl.app.penSizeService.getPenSize();
var points = pskl.PixelUtils.resizePixel(col, row, penSize);
points.forEach(function (point) {
this.draw(color, point[0], point[1], frame, overlay);
}.bind(this));
};