2013-09-28 23:10:12 +04:00
|
|
|
/**
|
2012-08-31 12:45:07 +04:00
|
|
|
* @provide pskl.drawingtools.PaintBucket
|
|
|
|
*
|
|
|
|
* @require pskl.utils
|
|
|
|
*/
|
|
|
|
(function() {
|
2013-08-10 14:11:16 +04:00
|
|
|
var ns = $.namespace("pskl.drawingtools");
|
2012-08-31 12:45:07 +04:00
|
|
|
|
2013-08-10 14:11:16 +04:00
|
|
|
ns.PaintBucket = function() {
|
|
|
|
this.toolId = "tool-paint-bucket";
|
|
|
|
this.helpText = "Paint bucket tool";
|
|
|
|
};
|
2012-08-31 12:45:07 +04:00
|
|
|
|
2013-08-10 14:11:16 +04:00
|
|
|
pskl.utils.inherit(ns.PaintBucket, ns.BaseTool);
|
2012-08-31 12:45:07 +04:00
|
|
|
|
2013-08-10 14:11:16 +04:00
|
|
|
/**
|
|
|
|
* @override
|
|
|
|
*/
|
|
|
|
ns.PaintBucket.prototype.applyToolAt = function(col, row, color, frame, overlay) {
|
2012-08-31 12:45:07 +04:00
|
|
|
|
2013-08-10 14:11:16 +04:00
|
|
|
pskl.PixelUtils.paintSimilarConnectedPixelsFromFrame(frame, col, row, color);
|
|
|
|
};
|
2012-08-31 12:45:07 +04:00
|
|
|
})();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|