         }
         
         context.saveGraphicsState()
-
+        
         let path = NSBezierPath()
         
         path.moveToPoint(points[0])
-
+        
         for i in 1...points.count-1 {
             path.lineToPoint(points[i])
         }
-
+        
         if let existingFillColor = fill_?.color {
             existingFillColor.setFill()
             path.fill()
         }
-
+        
         path.closePath()
-
+        
         if let existingStrokeColor = stroke_?.color {
             existingStrokeColor.setStroke()
+            path.lineWidth = lineWidth
             path.stroke()
         }
         

        context.restoreGraphicsState()
    }
    
    func polygon(points:[NSPoint], stroke stroke_:ConvertibleToNSColor? = NSColor.blackColor(), fill fill_:ConvertibleToNSColor? = nil) {
        
        guard points.count >= 3 else {
            assertionFailure("at least 3 points are needed")

        
        CGContextScaleCTM(cgContext, 1.0, -1.0)
        CGContextTranslateCTM(cgContext, 0.0, -2.0 * p.y - font.pointSize)
        
        text.drawAtPoint(p, withAttributes: attr)
        
        context.restoreGraphicsState()
