Remove color argument from BaseTool/BaseSelect interfaces

This commit is contained in:
grosbouddha
2015-09-16 23:40:44 +02:00
parent 8faa6db4c0
commit 5a469202e9
18 changed files with 76 additions and 89 deletions

View File

@@ -21,10 +21,10 @@
/**
* @override
*/
ns.SimplePen.prototype.applyToolAt = function(col, row, color_legacy, frame, overlay, event) {
ns.SimplePen.prototype.applyToolAt = function(col, row, frame, overlay, event) {
this.previousCol = col;
this.previousRow = row;
var color = this.getToolColor();
var color = this.getToolColor();
overlay.setPixel(col, row, color);
if (color === Constants.TRANSPARENT_COLOR) {
@@ -40,7 +40,7 @@
/**
* @override
*/
ns.SimplePen.prototype.moveToolAt = function(col, row, color_legacy, frame, overlay, event) {
ns.SimplePen.prototype.moveToolAt = function(col, row, frame, overlay, event) {
if ((Math.abs(col - this.previousCol) > 1) || (Math.abs(row - this.previousRow) > 1)) {
// The pen movement is too fast for the mousemove frequency, there is a gap between the
// current point and the previously drawn one.
@@ -48,17 +48,17 @@
var interpolatedPixels = this.getLinePixels_(col, this.previousCol, row, this.previousRow);
for (var i = 0, l = interpolatedPixels.length ; i < l ; i++) {
var coords = interpolatedPixels[i];
this.applyToolAt(coords.col, coords.row, color_legacy, frame, overlay, event);
this.applyToolAt(coords.col, coords.row, frame, overlay, event);
}
} else {
this.applyToolAt(col, row, color_legacy, frame, overlay, event);
this.applyToolAt(col, row, frame, overlay, event);
}
this.previousCol = col;
this.previousRow = row;
};
ns.SimplePen.prototype.releaseToolAt = function(col, row, color_legacy, frame, overlay, event) {
ns.SimplePen.prototype.releaseToolAt = function(col, row, frame, overlay, event) {
// apply on real frame
this.setPixelsToFrame_(frame, this.pixels);