     func toDictionary() -> [String:Any] {
         return ["type": "Arc", "ellipse": ellipse.toDictionary(), "shift": shift, "extent": extent]
     }
-    
-    convenience init(dictionary: [String:Any]) {
-        self.init(ellipse: Ellipse(dictionary: dictionary["ellipse"] as? [String : Any] ?? [:]),
-                  shift: parse(dictionary["shift"]),
-                  extent: parse(dictionary["extent"]))
-    }
 }
 
 extension Circle: Serializable {

                  data: array)
    }
}

extension Polygon: Serializable {
    
    func toDictionary() -> [String:Any] {
        return ["type": "Polygon", "points": points]
    }
    
    convenience init(dictionary: [String:Any]) {
        self.init(points: dictionary["points"] as? [Double] ?? [])
    }
}

extension Polyline: Serializable {
    
    func toDictionary() -> [String:Any] {
        return ["type": "Polyline", "points": points]
    }
    
    convenience init(dictionary: [String:Any]) {
        self.init(points: dictionary["points"] as? [Double] ?? [])
    }
}

extension Rect: Serializable {
    
    func toDictionary() -> [String:Any] {
        return ["type": "Rect", "x": x, "y": y, "w": w, "h": h]
    }
    
    convenience init(dictionary: [String:Any]) {
        self.init(x: parse(dictionary["x"]),
                  y: parse(dictionary["y"]),
                  w: parse(dictionary["w"]),
                  h: parse(dictionary["h"]))
    }
}

extension RoundRect: Serializable {
    
    func toDictionary() -> [String:Any] {
        return ["type": "RoundRect", "rect": rect.toDictionary(), "rx": rx, "ry": ry]
    }
    
    convenience init(dictionary: [String:Any]) {
        self.init(rect: Rect(dictionary: dictionary["rect"] as? [String : Any] ?? [:]),
                  rx: parse(dictionary["rx"]),
                  ry: parse(dictionary["ry"]))
    }
}



extension Color: Serializable {
    

    func toDictionary() -> [String:Any] {
        return ["type": "Ellipse", "cx": cx, "cy": cy, "rx": rx, "ry": ry]
    }
}

extension Line: Serializable {
    
    func toDictionary() -> [String:Any] {
        return ["type": "Line", "x1": x1, "y1": y1, "x2": x2, "y2": y2]
    }
}

