     @image = new PieceImage(this)
     @redraw = new PieceRedrawBuffer
 
-    @construct_piece("a")
 
 
   construct_piece: (sym) ->

                    "#50cc80","#5050cc","#cc5080",
                    "#b4cc50","#50ccb4","#8050cc"]

    @initialize_canvases()

    @context = @get_drawing_context("canvas")
    @img = document.getElementById("photo")
    @context.drawImage(@img,100,30)


  initialize_canvases: () ->
    @canvas = document.getElementById("puzzle-widget")
    @context_canvas = @canvas.getContext("2d")

    @piece_mask = document.createElement('canvas')
    @piece_image_context = @piece_mask.getContext("2d")


#  temp_draw_piece_mask: (x,y) ->

    @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]
