     # "SpotColor"
 
   ASS_createDrawingFromPoints = ( pathPoints ) ->
-    drawStr = ""
+    drawing.new()
 
     if pathPoints.length > 0
-      drawCom = 0
-      drawStr += "m #{ASS_fixCoords pathPoints[0].anchor} "
+      drawing.addMove pathPoints[0]
 
       for j in [1...pathPoints.length] by 1
         currPoint = pathPoints[j]
         prevPoint = pathPoints[j-1]
 
         if checkLinear currPoint, prevPoint
-          drawStr += ASS_linear currPoint
+          drawing.addLinear currPoint
         else
-          drawStr += ASS_cubic currPoint, prevPoint
+          drawing.addCubic currPoint, prevPoint
 
       prevPoint = pathPoints[pathPoints.length-1]
       currPoint = pathPoints[0]
 
-      unless checkLinear currPoint, prevPoint
-        drawStr += ASS_cubic currPoint, prevPoint
-
-      return drawStr
-
-    return ""
+      if checkLinear currPoint, prevPoint
+        drawing.addLinear currPoint
+      else
+        drawing.addCubic currPoint, prevPoint
+
+      return drawing.get()
 
   allThePaths = []
   recursePageItem = ( pageItem ) ->

        if shapes?
          for prefix, paths of shapes
            fragments.push prefix
            fragments.push.apply fragments, paths
            fragments.push suffix
            fragments.push "\n"
        else if includeEmptyLayers


  alert "Your colorspace needs to be RGB if you want colors." if doc.documentColorSpace == DocumentColorSpace.CMYK



  checkLinear = ( currPoint, prevPoint ) ->
    p1 = (prevPoint.anchor[0] == prevPoint.rightDirection[0] && prevPoint.anchor[1] == prevPoint.rightDirection[1])
    p2 = (currPoint.anchor[0] == currPoint.leftDirection[0] && currPoint.anchor[1] == currPoint.leftDirection[1])
    (p1 && p2)

  zeroPad = ( num ) ->
    if num < 16
