                     dashPointer.dealloc(dashes.count)
                 }
                 CGContextSetStrokeColorWithColor(ctx, RenderUtils.mapColor(color))
-                CGContextStrokePath(ctx)
             } else {
                 print("Unsupported stroke fill: \(stroke!.fill)")
             }

        return CGRect(x: CGFloat(rect.x), y: CGFloat(rect.y), width: CGFloat(rect.w), height: CGFloat(rect.h))
    }
    
    private func setFill(fill: Fill?, ctx: CGContext?) {
        if fill != nil {
            if let color = fill as? Color {
                CGContextSetFillColorWithColor(ctx, RenderUtils.mapColor(color))
                CGContextFillPath(ctx)
            } else if let gradient = fill as? LinearGradient {
                var start = CGPointMake(CGFloat(gradient.x1), CGFloat(gradient.y1))
                var end = CGPointMake(CGFloat(gradient.x2), CGFloat(gradient.y2))


    func render() {
        setGeometry(shape.form, ctx: ctx.cgContext!)
        drawPath(shape.fill, stroke: shape.stroke, ctx: ctx.cgContext!)
    }
    
    private func hook() {
