SVG: Use new Path.Ellipse constructor.

This commit is contained in:
Jürg Lehni 2013-10-16 15:28:59 +02:00
parent 01a0920c92
commit d45ba19914

View file

@ -242,10 +242,12 @@ new function() {
// http://www.w3.org/TR/SVG/shapes.html#InterfaceSVGEllipseElement
ellipse: function(node) {
var center = getPoint(node, 'cx', 'cy'),
radius = getSize(node, 'rx', 'ry');
return new Path.Ellipse(new Rectangle(center.subtract(radius),
center.add(radius)));
// We only use object literal notation where the default one is not
// supported (e.g. center / radius fo Path.Ellipse).
return new Path.Ellipse({
center: getPoint(node, 'cx', 'cy'),
radius: getSize(node, 'rx', 'ry')
});
},
// http://www.w3.org/TR/SVG/shapes.html#RectElement