 
 
   draw_piece_ab: (a,b) ->
+    console.log("PuzzlePiece.draw_piece_ab()")
     xy = @puzzle.hex_box.get_box_xy_ab(a,b)
+    @redraw.apply_redraw()
+    @redraw.prepare_next_redraw(xy[0],xy[1])
     @draw_piece(xy[0],xy[1])
 
 

    @puzzle = puzzle_app
    @hex_box = @puzzle.hex_box
    @piece_mask  = new PiecePattern(this)
    @redraw = new PieceRedrawBuffer
    @hexes = []



    @context = @get_drawing_context("canvas")
    @img = document.getElementById("photo")
    @context.drawImage(@img,@puzzle_xy[0],@puzzle_xy[1])


  clear_margins: () ->
    bt = @bottom_margin
    rt = @right_margin
    @context = @get_drawing_context("canvas")
    @context.clearRect(bt[0],bt[1],bt[2],bt[3])
    @context.clearRect(rt[0],rt[1],rt[2],rt[3])


  get_drawing_context: (mode) ->
