 
   setColor: (name, color) ->
     @colors[name] = color
-    @trigger "#{name}ColorChange", @colors[name]
     switch name
       when 'background'
         @containerEl.style.backgroundColor = @colors.background

  saveShape: (shape) ->
    @execute(new actions.AddShapeAction(this, shape))
    @trigger('shapeSave', {shape: shape})
    @trigger('drawingChange', {shape: shape})

  numShapes: -> @shapes.length

  pan: (x, y) ->
    # Subtract because we are moving the viewport

  removeEventListener: (name, wrapper) ->
    @canvas.removeEventListener(name, wrapper)

  # actual ratio of drawing-space pixels to perceived pixels, accounting for
  # both zoom and displayPixelWidth. use this when converting between
  # drawing-space and screen-space.
  getRenderScale: -> @scale * @backingScale

  clientCoordsToDrawingCoords: (x, y) ->
