bernhard: thuban/Extensions/svgexport/test test_svgmapwriter.py, 1.12, 1.13

cvs@intevation.de cvs at intevation.de
Sat Dec 11 03:25:38 CET 2004


Author: bernhard

Update of /thubanrepository/thuban/Extensions/svgexport/test
In directory doto:/tmp/cvs-serv29974/Extensions/svgexport/test

Modified Files:
	test_svgmapwriter.py 
Log Message:
	Made sure that newlines are inserted in the svg path d attributes
	to raise the chance that the line length will be below 255 characters,
	as recommended by REC SVG 1.1 in section 8.3.1.

	* Extensions/svgexport/svgmapwriter.py(DrawPolygon):
	Adding \n before L's and changed whitespace handling.

	* Extensions/svgexport/test/test_svgmapwriter.py:
	Adapted tests to new whitespace handling of DrawPolygon.


Index: test_svgmapwriter.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/svgexport/test/test_svgmapwriter.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- test_svgmapwriter.py	11 Dec 2004 02:03:47 -0000	1.12
+++ test_svgmapwriter.py	11 Dec 2004 02:25:36 -0000	1.13
@@ -91,8 +91,8 @@
         '''Set drawing properties and draw a polygon onto the dc.'''
         data = ('<path style="stroke-linejoin:round; stroke:#ff00ff; '
                 'stroke-width:3; stroke-linecap:round; fill:#00ff00" ' 
-                'meta="Object:test; Label:nothing" d="M 5.6 5.5 '
-                'L 95.4 5.3 L 95.2 95.1 L 5.0 95.0 L 5.0 5.0 "/>')
+                'meta="Object:test; Label:nothing" d="M 5.6 5.5'
+                '\nL 95.4 5.3\nL 95.2 95.1\nL 5.0 95.0\nL 5.0 5.0"/>')
         file = StringIO.StringIO()
         dc = VirtualDC(file)
         dc.SetPen(self.solid_pen)
@@ -106,8 +106,8 @@
         '''Test dc drawing a transparent polygon.'''
         data = ('<path style="stroke-linejoin:round; stroke:#ff00ff; '
                 'stroke-width:3; stroke-linecap:round; fill:none" ' 
-                'meta="Object:test; Label:nothing" d="M 5.6 5.5 '
-                'L 95.4 5.3 L 95.2 95.1 L 5.0 95.0 L 5.0 5.0 "/>')
+                'meta="Object:test; Label:nothing" d="M 5.6 5.5'
+                ' L 95.4 5.3\nL 95.2 95.1\nL 5.0 95.0\nL 5.0 5.0"/>')
         file = StringIO.StringIO()
         dc = VirtualDC(file)
         dc.SetPen(self.solid_pen)
@@ -356,7 +356,7 @@
                 '        <path style="stroke-linejoin:round; stroke:#000000; '
                 'stroke-width:0.01; stroke-linecap:round; fill:none" '
                 'id="P-Layer_0"'
-                '  d="M 0.0 0.0 L 10.0 -10.0 L 0.0 -10.0 L 0.0 0.0 Z"/>\n'
+                '  d="M 0.0 0.0\nL 10.0 -10.0\nL 0.0 -10.0\nL 0.0 0.0 Z"/>\n'
                 '    </g>\n</g>\n')
         table = MemoryTable([("type", FIELDTYPE_STRING),
                              ("value", FIELDTYPE_DOUBLE),





More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)