function BucketTool(toolContext, optionProviders) {
    /**
     * @type {HTMLCanvasElement}
     */
    this.sourceCanvas = toolContext.sourceCanvas;

    /**
     * @type {CanvasRenderingContext2D}
     */
    this.sourceContext = Canvas2DContext(this.sourceCanvas);

    /**
     * @type {ColorPalette}
     */
    this.colorPalette = optionProviders.colorPalette;

    /**
     * Draw display canvas callback.
     * @type {function()}
     */
    this.drawDisplayCanvas = toolContext.drawDisplayCanvas;

    /**
     * Cursor image.
     * @type {Element}
     */
    this.cursorDiv = document.createElement('div');
    this.cursorDiv.style.width = CURSOR_SIZE + 'px';
    this.cursorDiv.style.height = CURSOR_SIZE + 'px';
    this.cursorDiv.style.backgroundImage =
        'url("images/bucket_cursor.png")';

  }
/**
   * Bucket tool. Replaces connected pixels of the same color and alpha with
   * the current color.
   * @constructor
   * @struct
   * @implements {Tool}
   * @param {ToolContext} toolContext
   * @param {OptionProviders} optionProviders
   */
Bucket tool. Replaces connected pixels of the same color and alpha with
the current color.
Bucket tool . Replaces connected pixels of the same color and alpha with the current color .
function BucketTool(toolContext, optionProviders) {
    this.sourceCanvas = toolContext.sourceCanvas;
    this.sourceContext = Canvas2DContext(this.sourceCanvas);
    this.colorPalette = optionProviders.colorPalette;
    this.drawDisplayCanvas = toolContext.drawDisplayCanvas;
    this.cursorDiv = document.createElement('div');
    this.cursorDiv.style.width = CURSOR_SIZE + 'px';
    this.cursorDiv.style.height = CURSOR_SIZE + 'px';
    this.cursorDiv.style.backgroundImage =
        'url("images/bucket_cursor.png")';
  }
function BucketTool ( toolContext , optionProviders ) { this . sourceCanvas = toolContext . sourceCanvas ; this . sourceContext = Canvas2DContext ( this . sourceCanvas ) ; this . colorPalette = optionProviders . colorPalette ; this . drawDisplayCanvas = toolContext . drawDisplayCanvas ; this . cursorDiv = document . createElement ( 'div' ) ; this . cursorDiv . style . width = CURSOR_SIZE + 'px' ; this . cursorDiv . style . height = CURSOR_SIZE + 'px' ; this . cursorDiv . style . backgroundImage = 'url("images/bucket_cursor.png")' ; }
Bucket tool.
Bucket tool .
/**
     * @type {HTMLCanvasElement}
     */ /**
     * @type {CanvasRenderingContext2D}
     */ /**
     * @type {ColorPalette}
     */ /**
     * Draw display canvas callback.
     * @type {function()}
     */ /**
     * Cursor image.
     * @type {Element}
     */