11/**
2- * Paper.js
3- *
4- * This file is part of Paper.js, a JavaScript Vector Graphics Library,
5- * based on Scriptographer.org and designed to be largely API compatible.
6- * http://paperjs.org/
7- * http://scriptographer.org/
8- *
9- * Copyright (c) 2011, Juerg Lehni & Jonathan Puckey
10- * http://lehni.org/ & http://jonathanpuckey.com/
11- *
12- * Distributed under the MIT license. See LICENSE file for details.
13- *
14- * All rights reserved.
15- *
16- * This test file created by Stetson-Team-Alpha
17- */
18-
19- module ( 'SvgExporter ' ) ;
2+ * Paper.js
3+ *
4+ * This file is part of Paper.js, a JavaScript Vector Graphics Library,
5+ * based on Scriptographer.org and designed to be largely API compatible.
6+ * http://paperjs.org/
7+ * http://scriptographer.org/
8+ *
9+ * Copyright (c) 2011, Juerg Lehni & Jonathan Puckey
10+ * http://lehni.org/ & http://jonathanpuckey.com/
11+ *
12+ * Distributed under the MIT license. See LICENSE file for details.
13+ *
14+ * All rights reserved.
15+ *
16+ * This test file was created by Stetson-Team-Alpha
17+ */
18+
19+ module ( 'SvgExport ' ) ;
2020
2121test ( 'compare line path functions' , function ( ) {
2222 var svgns = 'http://www.w3.org/2000/svg' ;
@@ -32,7 +32,7 @@ test('compare line path functions', function() {
3232
3333 var line = new Path . Line ( [ x1 , y1 ] , [ x2 , y2 ] ) ;
3434
35- var exportedLine = SvgExporter . exportItem ( line ) ;
35+ var exportedLine = line . exportSvg ( ) ;
3636
3737 var shapex1 = shape . getAttribute ( 'x1' ) ;
3838 var shapey1 = shape . getAttribute ( 'y1' ) ;
@@ -65,7 +65,7 @@ test('compare negative line path functions', function() {
6565
6666 var line = new Path . Line ( [ x1 , y1 ] , [ x2 , y2 ] ) ;
6767
68- var exportedLine = SvgExporter . exportItem ( line ) ;
68+ var exportedLine = line . exportSvg ( ) ;
6969
7070 var shapex1 = shape . getAttribute ( 'x1' ) ;
7171 var shapey1 = shape . getAttribute ( 'y1' ) ;
@@ -98,7 +98,7 @@ test('compare invalid line path functions', function() {
9898
9999 var line = new Path . Line ( [ x1 , y1 ] , [ x2 , y2 ] ) ;
100100
101- var exportedLine = SvgExporter . exportItem ( line ) ;
101+ var exportedLine = line . exportSvg ( ) ;
102102
103103 var shapex1 = shape . getAttribute ( 'x1' ) ;
104104 var shapey1 = shape . getAttribute ( 'y1' ) ;
@@ -133,7 +133,7 @@ test('compare invalid line path functions', function() {
133133 var size = new Size(100, 100);
134134 var path = new Path.Rectangle(point, size);
135135
136- var exportedRectangle = SvgExporter.exportItem(path );
136+ var exportedRectangle = path.exportSvg( );
137137
138138 var shapex1 = shape.getAttribute('x');
139139 var shapey1 = shape.getAttribute('y1');
@@ -168,7 +168,7 @@ test('compare negative rectangle values', function() {
168168 var size = new Size(width, height);
169169 var rect = new Rectangle(topLeft, size);
170170
171- var exportedRectangle = SvgExporter.exportItem(rect );
171+ var exportedRectangle = rect.exportSvg( );
172172
173173 var shapex = shape.getAttribute('x');
174174 var shapey = shape.getAttribute('y');
@@ -202,7 +202,7 @@ test('compare invalid rectangle values', function() {
202202 var size = new Size(width, height);
203203 var rect = new Rectangle(topLeft, size);
204204
205- var exportedRectangle = SvgExporter.exportItem(rect );
205+ var exportedRectangle = rect.exportSvg( );
206206
207207 var shapex = shape.getAttribute('x');
208208 var shapey = shape.getAttribute('y');
@@ -242,7 +242,7 @@ test('compare rounded rectangle values', function() {
242242 var rect = new Rectangle(topLeft, size);
243243 var roundRect = new Path.RoundRectangle(rect, cornerSize);
244244
245- var exportedRectangle = SvgExporter.exportItem(rect );
245+ var exportedRectangle = rect.exportSvg( );
246246
247247 var shapex = shape.getAttribute('x');
248248 var shapey = shape.getAttribute('y');
@@ -286,7 +286,7 @@ test('compare negative rounded rectangle values', function() {
286286 var rect = new Rectangle(topLeft, size);
287287 var roundRect = new Path.RoundRectangle(rect, cornerSize);
288288
289- var exportedRectangle = SvgExporter.exportItem(rect );
289+ var exportedRectangle = rect.exportSvg( );
290290
291291 var shapex = shape.getAttribute('x');
292292 var shapey = shape.getAttribute('y');
@@ -330,7 +330,7 @@ test('compare invalid rounded rectangle values', function() {
330330 var rect = new Rectangle(topLeft, size);
331331 var roundRect = new Path.RoundRectangle(rect, cornerSize);
332332
333- var exportedRectangle = SvgExporter.exportItem(rect );
333+ var exportedRectangle = rect.exportSvg( );
334334
335335 var shapex = shape.getAttribute('x');
336336 var shapey = shape.getAttribute('y');
@@ -372,7 +372,7 @@ test('compare ellipse values', function() {
372372 var rect = new Rectangle ( topLeft , bottomRight ) ;
373373 var ellipse = new Path . Ellipse ( rect ) ;
374374
375- var exportedEllipse = SvgExporter . exportItem ( ellipse ) ;
375+ var exportedEllipse = ellipse . exportSvg ( ) ;
376376
377377 var shapecx = shape . getAttribute ( 'cx' ) ;
378378 var shapecy = shape . getAttribute ( 'cy' ) ;
@@ -404,7 +404,7 @@ test('compare circle values', function() {
404404 var center = new Point ( cx , cy ) ;
405405 var circle = new Path . Circle ( center , r ) ;
406406
407- var exportedCircle = SvgExporter . exportItem ( circle ) ;
407+ var exportedCircle = circle . exportSvg ( ) ;
408408
409409 var shapecx = shape . getAttribute ( 'cx' ) ;
410410 var shapecy = shape . getAttribute ( 'cy' ) ;
@@ -440,7 +440,7 @@ test('compare polygon values', function() {
440440 poly . closePath ( ) ;
441441 }
442442
443- var exportedPolygon = SvgExporter . exportItem ( poly ) ;
443+ var exportedPolygon = poly . exportSvg ( ) ;
444444
445445 var svgPoints = shape . getAttribute ( 'points' ) ;
446446
@@ -470,7 +470,7 @@ test('compare negative polygon values', function() {
470470 poly . closePath ( ) ;
471471 }
472472
473- var exportedPolygon = SvgExporter . exportItem ( poly ) ;
473+ var exportedPolygon = poly . exportSvg ( ) ;
474474
475475 var svgPoints = shape . getAttribute ( 'points' ) ;
476476
@@ -500,7 +500,7 @@ test('compare polyline values', function() {
500500 poly . closePath ( ) ;
501501 }
502502
503- var exportedPolygon = SvgExporter . exportItem ( poly ) ;
503+ var exportedPolygon = poly . exportSvg ( ) ;
504504
505505 var svgPoints = shape . getAttribute ( 'points' ) ;
506506
@@ -530,7 +530,7 @@ test('compare negative polyline values', function() {
530530 poly . closePath ( ) ;
531531 }
532532
533- var exportedPolygon = SvgExporter . exportItem ( poly ) ;
533+ var exportedPolygon = poly . exportSvg ( ) ;
534534
535535 var svgPoints = shape . getAttribute ( 'points' ) ;
536536
0 commit comments