     @hexes = @get_hexes()
     @box.set_box_dimensions()
     @p_mask.draw_pattern()
+
+
+  draw_piece: (x,y) ->
+    context = @puzzle.puzzle_view.context_canvas
+    context.drawImage(@p_mask.img,0,0)
 
 
   get_hexes: () ->

    @image = new PieceImage(this)
    @redraw = new PieceRedrawBuffer

    @construct_piece("a")


  construct_piece: (sym) ->

    @hex_draw = @piece.puzzle.hex_draw
    @img = document.createElement('canvas')
    @img.id = "piece-mask"
    @piece_mask_context = @img.getContext('2d')


  draw_pattern: () ->
    @img.width = @piece.box.width
    @img.height = @piece.box.height
    @hexes = @piece.hexes
#    @hex_draw.set_context("canvas")
    @hex_draw.set_context("piece_mask")
    for hx in @hexes
      aa = hx[0]
      bb = hx[1]
