     }
   toJSON: -> {@x, @y, @text, @color, @font, @forcedWidth, @forcedHeight, @v}
   fromJSON: (data) -> createShape('Text', data)
+  move: ( moveInfo={} ) ->
+    @x = @x - moveInfo.xDiff
+    @y = @y - moveInfo.yDiff
+  setUpperLeft: (upperLeft={}) ->
+    @x = upperLeft.x
+    @y = upperLeft.y
 
 
 defineShape 'SelectionBox',

        x, y, size: data.strokeWidth, color: data.strokeColor
      })
    createShape('Polygon', data)


defineShape 'Text',

        0, @smoothedPoints.length - @segmentSize * (@tailSize - 1)
      ).concat(@tail)

  move: ( moveInfo={} ) ->
    if !@smooth
      pts = @points
    else
      pts = @smoothedPoints

    for pt in pts
      pt.move(moveInfo)

    @points = @smoothedPoints

  setUpperLeft: (upperLeft={}) ->
    br = @getBoundingRect()
    xDiff = br.x - upperLeft.x
    yDiff = br.y - upperLeft.y
    @move({ xDiff, yDiff })

LinePath = defineShape 'LinePath', linePathFuncs

