Merge pull request #24 from Ede123/unittests
Import unittests from old repository
|
|
@ -2123,7 +2123,7 @@ def parseListOfPoints(s):
|
||||||
# coordinate-pair = coordinate comma-or-wsp coordinate
|
# coordinate-pair = coordinate comma-or-wsp coordinate
|
||||||
# coordinate = sign? integer
|
# coordinate = sign? integer
|
||||||
# comma-wsp: (wsp+ comma? wsp*) | (comma wsp*)
|
# comma-wsp: (wsp+ comma? wsp*) | (comma wsp*)
|
||||||
ws_nums = re.split(r"\s*,?\s*", s.strip())
|
ws_nums = re.split(r"\s*[\s,]\s*", s.strip())
|
||||||
nums = []
|
nums = []
|
||||||
|
|
||||||
# also, if 100-100 is found, split it into two also
|
# also, if 100-100 is found, split it into two also
|
||||||
|
|
@ -2145,8 +2145,10 @@ def parseListOfPoints(s):
|
||||||
else:
|
else:
|
||||||
# unless we accidentally split a number that was in scientific notation
|
# unless we accidentally split a number that was in scientific notation
|
||||||
# and had a negative exponent (500.00e-1)
|
# and had a negative exponent (500.00e-1)
|
||||||
|
prev = "";
|
||||||
|
if len(nums):
|
||||||
prev = nums[len(nums)-1]
|
prev = nums[len(nums)-1]
|
||||||
if prev[len(prev)-1] in ['e', 'E']:
|
if prev and prev[len(prev)-1] in ['e', 'E']:
|
||||||
nums[len(nums)-1] = prev + '-' + negcoords[j]
|
nums[len(nums)-1] = prev + '-' + negcoords[j]
|
||||||
else:
|
else:
|
||||||
nums.append( '-'+negcoords[j] )
|
nums.append( '-'+negcoords[j] )
|
||||||
|
|
@ -3095,7 +3097,8 @@ def scourString(in_string, options=None):
|
||||||
# input is a filename
|
# input is a filename
|
||||||
# returns the minidom doc representation of the SVG
|
# returns the minidom doc representation of the SVG
|
||||||
def scourXmlFile(filename, options=None):
|
def scourXmlFile(filename, options=None):
|
||||||
in_string = open(filename).read()
|
with open(filename) as f:
|
||||||
|
in_string = f.read()
|
||||||
out_string = scourString(in_string, options)
|
out_string = scourString(in_string, options)
|
||||||
return xml.dom.minidom.parseString(out_string.encode('utf-8'))
|
return xml.dom.minidom.parseString(out_string.encode('utf-8'))
|
||||||
|
|
||||||
|
|
|
||||||
51
testcss.py
Executable file
|
|
@ -0,0 +1,51 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Test Harness for Scour
|
||||||
|
#
|
||||||
|
# Copyright 2010 Jeff Schiller
|
||||||
|
#
|
||||||
|
# This file is part of Scour, http://www.codedread.com/scour/
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
from __future__ import absolute_import
|
||||||
|
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
from scour.yocto_css import parseCssString
|
||||||
|
|
||||||
|
|
||||||
|
class Blank(unittest.TestCase):
|
||||||
|
def runTest(self):
|
||||||
|
r = parseCssString('')
|
||||||
|
self.assertEqual( len(r), 0, 'Blank string returned non-empty list')
|
||||||
|
self.assertEqual( type(r), type([]), 'Blank string returned non list')
|
||||||
|
|
||||||
|
class ElementSelector(unittest.TestCase):
|
||||||
|
def runTest(self):
|
||||||
|
r = parseCssString('foo {}')
|
||||||
|
self.assertEqual( len(r), 1, 'Element selector not returned')
|
||||||
|
self.assertEqual( r[0]['selector'], 'foo', 'Selector for foo not returned')
|
||||||
|
self.assertEqual( len(r[0]['properties']), 0, 'Property list for foo not empty')
|
||||||
|
|
||||||
|
class ElementSelectorWithProperty(unittest.TestCase):
|
||||||
|
def runTest(self):
|
||||||
|
r = parseCssString('foo { bar: baz}')
|
||||||
|
self.assertEqual( len(r), 1, 'Element selector not returned')
|
||||||
|
self.assertEqual( r[0]['selector'], 'foo', 'Selector for foo not returned')
|
||||||
|
self.assertEqual( len(r[0]['properties']), 1, 'Property list for foo did not have 1')
|
||||||
|
self.assertEqual( r[0]['properties']['bar'], 'baz', 'Property bar did not have baz value')
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
||||||
1415
testscour.py
Executable file
45
unittests/adobe.svg
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:x="http://ns.adobe.com/Extensibility/1.0/"
|
||||||
|
xmlns:i="http://ns.adobe.com/AdobeIllustrator/10.0/"
|
||||||
|
xmlns:graph="http://ns.adobe.com/Graphs/1.0/"
|
||||||
|
xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
|
||||||
|
xmlns:f="http://ns.adobe.com/Flows/1.0/"
|
||||||
|
xmlns:ir="http://ns.adobe.com/ImageReplacement/1.0/"
|
||||||
|
xmlns:custom="http://ns.adobe.com/GenericCustomNamespace/1.0/"
|
||||||
|
xmlns:xpath="http://ns.adobe.com/XPath/1.0/"
|
||||||
|
xmlns:ok="A.namespace.we.want.left.in"
|
||||||
|
i:viewOrigin="190.2959 599.1841" i:rulerOrigin="0 0" i:pageBounds="0 792 612 0">
|
||||||
|
<x:foo>bar</x:foo>
|
||||||
|
<i:foo>bar</i:foo>
|
||||||
|
<graph:foo>bar</graph:foo>
|
||||||
|
<a:foo>bar</a:foo>
|
||||||
|
<f:foo>bar</f:foo>
|
||||||
|
<ir:foo>bar</ir:foo>
|
||||||
|
<custom:foo>bar</custom:foo>
|
||||||
|
<xpath:foo>bar</xpath:foo>
|
||||||
|
<variableSets xmlns="http://ns.adobe.com/Variables/1.0/">
|
||||||
|
<variableSet varSetName="binding1" locked="none">
|
||||||
|
<variables/>
|
||||||
|
<v:sampleDataSets xmlns="http://ns.adobe.com/GenericCustomNamespace/1.0/" xmlns:v="http://ns.adobe.com/Variables/1.0/"/>
|
||||||
|
</variableSet>
|
||||||
|
</variableSets>
|
||||||
|
<sfw xmlns="http://ns.adobe.com/SaveForWeb/1.0/">
|
||||||
|
<slices/>
|
||||||
|
<sliceSourceBounds y="191.664" x="190.296" width="225.72" height="407.52" bottomLeftOrigin="true"/>
|
||||||
|
</sfw>
|
||||||
|
<rect width="300" height="200" fill="green"
|
||||||
|
x:baz="1"
|
||||||
|
i:baz="1"
|
||||||
|
graph:baz="1"
|
||||||
|
a:baz="1"
|
||||||
|
f:baz="1"
|
||||||
|
ir:baz="1"
|
||||||
|
custom:baz='1'
|
||||||
|
xpath:baz="1"
|
||||||
|
xmlns:v="http://ns.adobe.Variables/1.0/"
|
||||||
|
v:baz="1"
|
||||||
|
xmlns:sfw="http://ns.adobe.com/SaveForWeb/1.0/"
|
||||||
|
sfw:baz="1"
|
||||||
|
ok:baz="1" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.6 KiB |
23
unittests/cascading-default-attribute-removal.svg
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<path style="fill-rule:evenodd;stroke-linecap:butt;stroke-width:1.00;stroke:#000" d="m1,1z"/>
|
||||||
|
<path style="fill-rule:nonzero;stroke-linecap:butt;stroke:#000" d="m1,1z"/>
|
||||||
|
<g style="stroke:#f00;marker:none">
|
||||||
|
<path style="marker-start:none;fill-rule:evenodd;stroke-linecap:butt" d="m1,1z"/>
|
||||||
|
<path style="fill-rule:nonzero" d="m1,1z"/>
|
||||||
|
<g style="fill:#f0f;text-anchor:stop;fill-rule:evenodd;stroke-linecap:round;marker:url(#nirvana)">
|
||||||
|
<path style="marker-start:none;fill-rule:evenodd;stroke-linecap:butt" d="m1,1z"/>
|
||||||
|
<path style="color:#000;fill-rule:nonzero;" d="m1,1z"/>
|
||||||
|
<path d="m1,1z"/>
|
||||||
|
</g>
|
||||||
|
<g style="fill:#f0f;text-anchor:stop;fill-rule:evenodd;stroke-linecap:round;marker:url(#nirvana)">
|
||||||
|
<path style="marker-start:none;fill-rule:evenodd;stroke-linecap:butt" d="m1,1z"/>
|
||||||
|
<path style="color:#000;fill-rule:nonzero;" d="m1,1z"/>
|
||||||
|
</g>
|
||||||
|
<g style="text-anchor:stop;fill-rule:nonzero;marker:none;stroke-linecap:butt">
|
||||||
|
<path style="marker-start:none;fill-rule:evenodd;stroke-linecap:butt" d="m1,1z"/>
|
||||||
|
<path style="fill-rule:nonzero;" d="m1,1z"/>
|
||||||
|
<path d="m1,1z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
6
unittests/cdata.svg
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<script type="application/ecmascript"><![CDATA[
|
||||||
|
alert('pb&j');
|
||||||
|
]]></script>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 184 B |
11
unittests/collapse-gradients-gradientUnits.svg
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="g1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="blue" />
|
||||||
|
<stop offset="1" stop-color="yellow" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient id="g2" xlink:href="#g1" cx="50%" cy="50%" r="30%" gradientUnits="objectBoundingBox"/>
|
||||||
|
</defs>
|
||||||
|
<rect fill="url(#g2)" width="200" height="200"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 507 B |
11
unittests/collapse-gradients.svg
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="grad1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" spreadMethod="reflect" gradientTransform="matrix(1,2,3,4,5,6)">
|
||||||
|
<stop offset="0" stop-color="blue" />
|
||||||
|
<stop offset="1" stop-color="yellow" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient id="grad2" xlink:href="#grad1" cx="100" cy="100" r="70"/>
|
||||||
|
</defs>
|
||||||
|
<rect fill="url(#grad2)" width="200" height="200"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 547 B |
4
unittests/collapse-same-path-points.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="210" height="210">
|
||||||
|
<path stroke="yellow" fill="red" d="M100,100 L200.12345,200.12345 C215,205 185,195 200.12,200.12 Z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 275 B |
12
unittests/color-formats.svg
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="g1" x1="0" y1="0" x2="1" y2="0">
|
||||||
|
<stop offset="0.5" stop-color="rgb(50.0%, 0%, .0%)" />
|
||||||
|
</linearGradient>
|
||||||
|
<solidColor id="c1" solid-color="lightgoldenrodyellow"/>
|
||||||
|
</defs>
|
||||||
|
<rect id="rect" width="100" height="100" fill="rgb(15,16,17)" stroke="darkgrey" />
|
||||||
|
<circle id="circle" cx="100" cy="100" r="30" fill="url(#g1)" stroke="url(#c1)" />
|
||||||
|
<ellipse id="ellipse" cx="100" cy="100" rx="30" ry="30" style="fill:#ffffff" fill="black" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 589 B |
10
unittests/comment-beside-xml-decl.svg
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||||
|
<!-- Oh look a comment -->
|
||||||
|
<!-- generated by foobar version 20120503 -->
|
||||||
|
<!-- And another -->
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<!-- This comment is meant to test whether removing a comment before <svg>
|
||||||
|
messes up removing comments thereafter -->
|
||||||
|
<!-- And this one is meant to test whether iteration works correctly in
|
||||||
|
<svg> as well as the document element -->
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 448 B |
6
unittests/comments.svg
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" ?>
|
||||||
|
<!-- Empty -->
|
||||||
|
<!-- Comment #2 -->
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
</svg>
|
||||||
|
<!-- After -->
|
||||||
|
After Width: | Height: | Size: 121 B |
9
unittests/commonized-referenced-elements.svg
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<g id="g">
|
||||||
|
<rect width="200" height="100" fill="#0f0"/>
|
||||||
|
<rect width="200" height="100" fill="#0f0"/>
|
||||||
|
<rect width="200" height="100" fill="#0f0"/>
|
||||||
|
<circle id="e" r="20" fill="#0f0"/>
|
||||||
|
</g>
|
||||||
|
<use xlink:href="#e" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 324 B |
6
unittests/consecutive-hlines.svg
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#F00" stroke="#0F0" d="M100,100h100h100v100h-200z"/>
|
||||||
|
<path fill="#F00" stroke="#0F0" d="M100,300h100,100v100h-200z"/>
|
||||||
|
<path fill="#F00" stroke="#0F0" d="M100,500h300h-100v100h-200z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 299 B |
27
unittests/css-reference.svg
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="g1">
|
||||||
|
<stop offset="0" stop-color="red"/>
|
||||||
|
<stop offset="1" stop-color="blue"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="g2">
|
||||||
|
<stop offset="0" stop-color="green"/>
|
||||||
|
<stop offset="1" stop-color="yellow"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<style type="text/css"><![CDATA[
|
||||||
|
rect {
|
||||||
|
stroke: red;
|
||||||
|
stroke-width: 10;
|
||||||
|
fill:url(#g1)
|
||||||
|
}
|
||||||
|
]]></style>
|
||||||
|
|
||||||
|
<style type="text/css">.circ { fill: none; stroke: url("#g2"); stroke-width: 15 }</style>
|
||||||
|
|
||||||
|
<rect height="300" width="300"/>
|
||||||
|
<circle class="circ" cx="350" cy="350" r="40"/>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 691 B |
7
unittests/doctype.svg
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- comment -->
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
|
||||||
|
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
||||||
|
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
||||||
|
]>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"/>
|
||||||
|
After Width: | Height: | Size: 350 B |
13
unittests/dont-collapse-gradients.svg
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="g1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="blue" />
|
||||||
|
<stop offset="1" stop-color="yellow" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient id="g2" xlink:href="#g1" cx="100" cy="100" r="70"/>
|
||||||
|
<radialGradient id="g3" xlink:href="#g1" cx="100" cy="100" r="70"/>
|
||||||
|
</defs>
|
||||||
|
<rect fill="url(#g2)" width="200" height="200"/>
|
||||||
|
<rect fill="url(#g3)" width="200" height="200" y="200"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 599 B |
4
unittests/dont-convert-short-color-names.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect fill="red" width="100" height="100" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 149 B |
12
unittests/duplicate-gradient-stops-pct.svg
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="sea-gradient" x1="0" x2="0" y1="0" y2="1">
|
||||||
|
<stop offset="0%" stop-color="lightgrey"/>
|
||||||
|
<stop offset="0.5" stop-color="darkgrey"/>
|
||||||
|
<stop offset="50%" stop-color="darkgrey"/>
|
||||||
|
<stop offset="100%" stop-color="white"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<rect style="fill: url(#sea-gradient) rgb(0, 0, 0);" y="0" x="0" height="100" width="100"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 497 B |
19
unittests/duplicate-gradient-stops.svg
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="lingrad" x1="0" y1="0" x2="0" y2="1">
|
||||||
|
<stop offset="0" stop-color="red" />
|
||||||
|
<stop offset="0.5" stop-color="blue" />
|
||||||
|
<stop offset="0.5" stop-color="blue" />
|
||||||
|
<stop offset="1.0" stop-color="green" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient id="radgrad">
|
||||||
|
<stop offset="0" stop-color="red" />
|
||||||
|
<stop offset="0.5" stop-color="blue" />
|
||||||
|
<stop offset="0.5" stop-color="blue" />
|
||||||
|
<stop offset="1.0" stop-color="green" />
|
||||||
|
</radialGradient>
|
||||||
|
</defs>
|
||||||
|
<rect width="300" height="300" fill="url(#lingrad)" />
|
||||||
|
<rect width="300" height="300" fill="url(#radgrad)" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 740 B |
15
unittests/duplicate-gradients-update-style.svg
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="duplicate-one" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="blue" />
|
||||||
|
<stop offset="1" stop-color="yellow" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="duplicate-two" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stop-color="blue" />
|
||||||
|
<stop offset="1" stop-color="yellow" />
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<rect style="fill: url(#duplicate-one)" width="200" height="200"/>
|
||||||
|
<rect style="fill: url(#duplicate-two)" width="200" height="200" y="200"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 708 B |
7
unittests/empty-g.svg
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g/>
|
||||||
|
<g transform="translate(10,10)">
|
||||||
|
<rect width="300" height="200" fill="green" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 203 B |
3
unittests/empty-metadata.svg
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<metadata></metadata>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 72 B |
4
unittests/empty-style.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" ?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<style id="style1" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 97 B |
5
unittests/fill-none.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path style="fill: none; fill-rule: nonzero; fill-opacity: 0.5;" d="M 7.7592046,36.982095 C 7.8831049,40.873696 7.8339808,45.305308 7.8339808,49.436888 Z" />
|
||||||
|
<path style="fill: black; fill-rule: evenodd; fill-opacity: 0.5;" d="M 7.7592046,36.982095 C 7.8831049,40.873696 7.8339808,45.305308 7.8339808,49.436888 Z" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 430 B |
4
unittests/font-styles.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect style="font-size:20px" width="100" height="100" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 162 B |
22
unittests/full-metadata.svg
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<metadata>
|
||||||
|
<rdf:RDF
|
||||||
|
xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:rdfs = "http://www.w3.org/2000/01/rdf-schema#"
|
||||||
|
xmlns:dc = "http://purl.org/dc/elements/1.1/" >
|
||||||
|
<rdf:Description about="http://example.org/myfoo"
|
||||||
|
dc:title="MyFoo"
|
||||||
|
dc:description="Unit test for Scour's --remove-metadata option"
|
||||||
|
dc:publisher="No One"
|
||||||
|
dc:date="2010-06-09"
|
||||||
|
dc:format="image/svg+xml"
|
||||||
|
dc:language="en" >
|
||||||
|
<dc:creator>
|
||||||
|
<rdf:Bag>
|
||||||
|
<rdf:li>No One</rdf:li>
|
||||||
|
</rdf:Bag>
|
||||||
|
</dc:creator>
|
||||||
|
</rdf:Description>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 765 B |
10
unittests/gradient-default-attrs.svg
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<linearGradient id="g" x1="0" y1='0' x2='100%' y2='0.0' gradientUnits="objectBoundingBox" spreadMethod="pad">
|
||||||
|
<stop offset="0" stop-color="black"/>
|
||||||
|
<stop offset="1" stop-color="white"/>
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient id="g2" xlink:href="#g1" cx="50%" cy="0.5" r="50%" fx="50%" fy="0.5"/>
|
||||||
|
<rect width="100" height="100" fill="url(#g)"/>
|
||||||
|
<rect width="50" height="50" fill="url(#g2)"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 536 B |
6
unittests/group-creation.svg
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect fill="red" stroke="blue" x="0" y="0" width="4" height="4" />
|
||||||
|
<rect fill="red" stroke="blue" x="8" y="0" width="4" height="4" />
|
||||||
|
<rect fill="red" stroke="blue" x="16" y="0" width="4" height="4" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 317 B |
6
unittests/group-no-creation.svg
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect fill="green" stroke="blue" x="0" y="0" width="4" height="4" />
|
||||||
|
<rect fill="yellow" stroke="red" x="8" y="0" width="4" height="4" />
|
||||||
|
<rect fill="blue" stroke="red" x="16" y="0" width="4" height="4" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 321 B |
18
unittests/groups-in-switch-with-id.svg
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:example="http://www.example.com/olfactory-feedback/0.1"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<switch>
|
||||||
|
<foreignObject requiredExtensions="http://www.example.com/olfactory-feedback/0.1" x="0" y="0" width="1" height="1">
|
||||||
|
<example:odor xlink:href="#odor1423">
|
||||||
|
</example:odor>
|
||||||
|
</foreignObject>
|
||||||
|
<g id="dsfargeg">
|
||||||
|
<rect width="300" height="200" fill="green" />
|
||||||
|
<circle cx="200" cy="100" r="50" fill="yellow" />
|
||||||
|
</g>
|
||||||
|
</switch>
|
||||||
|
<defs>
|
||||||
|
<example:odor id="odor1423" fill="grape"/>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 609 B |
18
unittests/groups-in-switch.svg
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:example="http://www.example.com/olfactory-feedback/0.1"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<switch>
|
||||||
|
<foreignObject requiredExtensions="http://www.example.com/olfactory-feedback/0.1" x="0" y="0" width="1" height="1">
|
||||||
|
<example:odor xlink:href="#odor1423">
|
||||||
|
</example:odor>
|
||||||
|
</foreignObject>
|
||||||
|
<g>
|
||||||
|
<rect width="300" height="200" fill="green" />
|
||||||
|
<circle cx="200" cy="100" r="50" fill="yellow" />
|
||||||
|
</g>
|
||||||
|
</switch>
|
||||||
|
<defs>
|
||||||
|
<example:odor id="odor1423" fill="grape"/>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 595 B |
13
unittests/groups-with-title-desc.svg
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g>
|
||||||
|
<title>Group 1</title>
|
||||||
|
<rect width="300" height="200" fill="green" />
|
||||||
|
<circle cx="200" cy="100" r="50" fill="yellow" />
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
<desc>Group 1</desc>
|
||||||
|
<rect width="300" height="200" fill="green" />
|
||||||
|
<circle cx="200" cy="100" r="50" fill="yellow" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 365 B |
11
unittests/ids-to-strip.svg
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" id="boo">
|
||||||
|
<defs>
|
||||||
|
<title id="title1">Fooey</title>
|
||||||
|
<rect id='r1' />
|
||||||
|
<linearGradient id="Polka_Dot_Pattern">
|
||||||
|
<stop offset="0.5" stop-color="blue" id="stop1234"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<rect id='r2' fill="url(#Polka_Dot_Pattern)" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 348 B |
12
unittests/important-groups-in-defs.svg
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<defs>
|
||||||
|
<g>
|
||||||
|
<linearGradient id="g1">
|
||||||
|
<stop offset="0" stop-color="blue"/>
|
||||||
|
<stop offset="1" stop-color="red"/>
|
||||||
|
</linearGradient>
|
||||||
|
</g>
|
||||||
|
</defs>
|
||||||
|
<rect fill="url(#g1)" width="100" height="100" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 305 B |
7
unittests/inkscape.svg
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:foo="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
inkscape:version="0.46" version="1.0">
|
||||||
|
<inkscape:perspective inkscape:vp_x="0 : 526.18109 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="744.09448 : 526.18109 : 1" inkscape:persp3d-origin="372.04724 : 350.78739 : 1" id="perspective3104"/>
|
||||||
|
<rect width="300" height="200" fill="green" inkscape:collect="always" foo:bar="1"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 545 B |
4
unittests/metadata-with-text.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<metadata>This is a metadata element with only text node children</metadata>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 182 B |
10
unittests/move-common-attributes-to-grandparent.svg
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g id="grampa" fill-opacity="0.4">
|
||||||
|
<g stroke-opacity="0.8">
|
||||||
|
<rect fill="#0F0" stroke="#0F0" stroke-width="5" width="100" height="300"/>
|
||||||
|
<rect fill="#0F0" width="200" height="100" />
|
||||||
|
</g>
|
||||||
|
<circle fill="#0F0" stroke="0F0" cx="50" cy="50" r="20" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 368 B |
13
unittests/move-common-attributes-to-parent.svg
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill-opacity="0.4">
|
||||||
|
<rect fill="#0F0" stroke="#0F0" stroke-width="5" width="100" height="300"/>
|
||||||
|
<rect fill="#0F0" width="200" height="100" />
|
||||||
|
<circle fill="#0F0" stroke="0F0" cx="50" cy="50" r="20" />
|
||||||
|
</g>
|
||||||
|
<text>Hello
|
||||||
|
<tspan font-style="italic">World!</tspan>
|
||||||
|
Goodbye
|
||||||
|
<tspan font-style="italic">Cruel World!</tspan>
|
||||||
|
</text>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 436 B |
14
unittests/nested-defs.svg
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<defs>
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="linearGradient662">
|
||||||
|
<stop style="stop-color:#000000;stop-opacity:1" offset="0"/>
|
||||||
|
<stop style="stop-color:#0000ff;stop-opacity:1" offset="1"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<linearGradient x1="120.22393" y1="156.07137" x2="119.33763" y2="162.87338" id="linearGradient3211" xlink:href="#linearGradient662" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.789103,0,0,1.131232,0.366124,452.0845)"/>
|
||||||
|
</defs>
|
||||||
|
<path d="m50 50h50v50h-50z" fill="url(#linearGradient3211)"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 732 B |
9
unittests/nested-useless-groups.svg
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g>
|
||||||
|
<g transform="translate(50,50)">
|
||||||
|
<rect width="300" height="200" fill="green" />
|
||||||
|
<circle cx="200" cy="100" r="50" fill="yellow" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 253 B |
8
unittests/no-collapse-lines.svg
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"
|
||||||
|
viewBox="0.1 -0.333 125 125" xml:space="preserve">
|
||||||
|
<g id="Layer_1_2_">
|
||||||
|
<path d="M24.599,16.542v27.584l-4.994-1.033L0,60.671l52.687,63.612l51.361-40.729l20.844-18.664c0,0-23.527-4.871-27.404-5.673
|
||||||
|
c0-4.4,0-47.951,0-47.951L43.071,0L24.599,16.542z"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 415 B |
12
unittests/overflow-marker.svg
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<defs>
|
||||||
|
<marker id="m1" style="overflow:visible">
|
||||||
|
<rect width="200" height="100"/>
|
||||||
|
</marker>
|
||||||
|
<marker id="m2" style="overflow:hidden">
|
||||||
|
<rect width="200" height="100"/>
|
||||||
|
</marker>
|
||||||
|
</defs>
|
||||||
|
<line x2="100" y2="100" style="marker-start:url(#m1);marker-end:url(#m2)" stroke="#000" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 438 B |
9
unittests/overflow-svg.svg
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="overflow:visible">
|
||||||
|
<svg style="overflow:hidden">
|
||||||
|
<line x2="100" y2="100" stroke="#000" />
|
||||||
|
</svg>
|
||||||
|
<svg style="overflow:visible">
|
||||||
|
<line x2="100" y2="100" stroke="#000" />
|
||||||
|
</svg>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 344 B |
4
unittests/path-abs-to-rel.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M 385,201 V181 l100,-50 h20 C 505.43501,223.44223 659.42238,164.82405 714.32160,-0.0015300000 C 649.90356,227.13187 497.48814,312.46353 371.30643,277.40123 C 245.12472,242.33893 157.17674,250.88268 121.69357,12.440270 C 211.69357,149.44027 323.87473,190.08578 385.88362,201.47812 z " fill="blue"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 416 B |
4
unittests/path-bez-optimize.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg version="1.1" viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="m10,100c50-50,50,50,100,0,50-50,50,50,100,0" fill="none" stroke="blue" stroke-width="5"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 240 B |
4
unittests/path-elliptical-arc-parsing.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
|
||||||
|
<path d="M100,100a100,100,0,1,1,-50,100z" fill="red" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 175 B |
5
unittests/path-empty-move.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="m100 100 l200 100 m0 0z" />
|
||||||
|
<path d="m100 100 v200 m0 0 100 100z" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 152 B |
4
unittests/path-implicit-line.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path stroke="#000" d="M100,100,100,200 M300,100,100,100 M300,200,300,100" fill="none"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 193 B |
4
unittests/path-line-optimize.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg" version="1.1">
|
||||||
|
<path d="M 100,100 l200,0 l0,100 h-200 l0,0 z" fill="blue" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 203 B |
4
unittests/path-precision.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg" version="1.1">
|
||||||
|
<path d="M 100.0000001 99.9999999 h100.01 v123456789.123456789 h-100 z" fill="red" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 227 B |
4
unittests/path-quad-optimize.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg version="1.1" viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="m10,100q50-50,100,0,50,50,100,0" fill="none" stroke="blue" stroke-width="5"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 228 B |
8
unittests/path-simple-triangle.svg
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg" version="1.1">
|
||||||
|
<path d="M 300. 100 h-50-1.5E+2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
l100.00000,2000.0E-01 z" fill="red" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 222 B |
4
unittests/path-sn.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1781 1142">
|
||||||
|
<path d="m 0,0 l 2.e-4,0 z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 159 B |
4
unittests/path-truncate-zeros-calc.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="5 0 3 3">
|
||||||
|
<path stroke="blue" stroke-width="0.01" fill="none" d="M5.81,0 H5.91000" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 199 B |
4
unittests/path-truncate-zeros.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
|
||||||
|
<path d="M300.0000, -100.1 z" fill="red" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 163 B |
4
unittests/path-use-scientific-notation.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="5 0 3 3">
|
||||||
|
<path d="M10000,0" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 145 B |
4
unittests/path-with-caps.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="none" stroke="#000" stroke-width="5" stroke-linecap="round" d="m 11,8 0,0" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 195 B |
4
unittests/path-with-closepath.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="none" stroke="#000" d="M10,10h100v100h-100z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 162 B |
4
unittests/polygon-coord-neg-first.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<polygon points="-100,-100,100-100,100-100-100,-100-100,200" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 156 B |
4
unittests/polygon-coord-neg.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<polygon points="100,-100,100-100,100-100-100,-100-100,200" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 155 B |
4
unittests/polygon-coord.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<polygon fill="blue" points="10000,50" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 146 B |
5
unittests/polygon.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<polygon fill="blue" points="50,50 150,50 150,150 50,150 +5e1,500.00e-1" />
|
||||||
|
<polygon fill="green" points="200,50 300,50 300,150 200,150" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 245 B |
4
unittests/polyline-coord-neg-first.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<polyline points="-100,-100,100-100,100-100-100,-100-100,200" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 157 B |
4
unittests/polyline-coord-neg.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<polyline points="100,-100,100-100,100-100-100,-100-100,200" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 156 B |
4
unittests/polyline-coord.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<polyline fill="blue" points="10000,50" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 147 B |
11
unittests/protection.svg
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<path id="path1" d="m1,1z"/>
|
||||||
|
<path id="path2" d="m1,1z"/>
|
||||||
|
<path id="path3" d="m1,1z"/>
|
||||||
|
<path id="path4" d="m1,1z"/>
|
||||||
|
<path id="p:mypath1" d="m1,1z"/>
|
||||||
|
<path id="p_mypath1" d="m1,1z"/>
|
||||||
|
<path id="otherpath" d="m1,1z"/>
|
||||||
|
<use xlink:href="#path1"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 403 B |
10
unittests/quot-in-url.svg
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="g" x1="0" y1="0" x2="1" y2="0">
|
||||||
|
<stop offset="0" stop-color="#0F0" />
|
||||||
|
<stop offset="1" stop-color="#00F"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<rect width="100" height="100" fill="url("#g")"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 372 B |
8
unittests/redundant-svg-namespace.svg
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:vector="http://www.w3.org/2000/svg">
|
||||||
|
<rect height="300" width="300"/>
|
||||||
|
<svg:rect height="200" width="200">
|
||||||
|
<title>Test</title>
|
||||||
|
</svg:rect>
|
||||||
|
<vector:rect height="100" width="100"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 331 B |
11
unittests/referenced-elements-1.svg
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<defs>
|
||||||
|
<title id="title1">Fooey</title>
|
||||||
|
<rect id='r1' />
|
||||||
|
<linearGradient id="Polka_Dot_Pattern">
|
||||||
|
<stop offset="0.5" stop-color="blue" id="stop1234"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<rect id='r2' fill="url(#Polka_Dot_Pattern)" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 339 B |
17
unittests/referenced-font.svg
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns='http://www.w3.org/2000/svg'>
|
||||||
|
<defs>
|
||||||
|
<font id="Font1" horiz-adv-x="1000">
|
||||||
|
<font-face font-family="Super Sans" font-weight="bold" font-style="normal"
|
||||||
|
units-per-em="1000" cap-height="600" x-height="400"
|
||||||
|
ascent="700" descent="300"
|
||||||
|
alphabetic="0" mathematical="350" ideographic="400" hanging="500">
|
||||||
|
<font-face-src>
|
||||||
|
<font-face-name name="Super Sans Bold"/>
|
||||||
|
</font-face-src>
|
||||||
|
</font-face>
|
||||||
|
<missing-glyph><path d="M0,0h200v200h-200z"/></missing-glyph>
|
||||||
|
</font>
|
||||||
|
</defs>
|
||||||
|
<text x="100" y="100" style="font-family: 'Super Sans', Helvetica, sans-serif">Text</text>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 712 B |
8
unittests/refs-in-defs.svg
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<defs>
|
||||||
|
<path id="L" stroke="#000000" d="M0,0 100,100"/>
|
||||||
|
<g id="G"><use xlink:href="#L"/> <path stroke="#000000" d="M0,100 100,0"/></g>
|
||||||
|
</defs>
|
||||||
|
<use xlink:href="#G"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 346 B |
23
unittests/remove-duplicate-gradients.svg
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<linearGradient id="g1" x1="0" y1="0" x2="1" y2="1">
|
||||||
|
<stop offset="0" stop-color="red"/>
|
||||||
|
<stop offset="1" stop-color="blue"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id='g2' x1='0' y1='0' x2='1' y2='1'>
|
||||||
|
<stop offset='0' stop-color='red'/>
|
||||||
|
<stop offset='1' stop-color='blue'/>
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient xlink:href="#g1" id="g3" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1, 0, 0, 0.481529, -718.417, 98.7046)" cx="323.75433" cy="209.73672" fx="323.75433" fy="209.73672" r="6.2794499"/>
|
||||||
|
<radialGradient xlink:href="#g2" id="g4" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1, 0, 0, 0.481529, -718.417, 98.7046)" cx="323.75433" cy="209.73672" fx="323.75433" fy="209.73672" r="6.2794499"/>
|
||||||
|
<linearGradient id='g5' x1='0' y1='0' x2='1' y2='1'>
|
||||||
|
<stop offset='0' stop-color='red'/>
|
||||||
|
<stop offset='1' stop-color='blue'/>
|
||||||
|
</linearGradient>
|
||||||
|
|
||||||
|
<rect id="r1" fill="url(#g1)" width="100" height="100"/>
|
||||||
|
<rect id="r2" stroke="url('#g2')" width="100" height="100"/>
|
||||||
|
<rect id="r3" stroke="url(#g3)" width="100" height="100"/>
|
||||||
|
<rect id="r4" fill='url("#g4")' width="100" height="100"/>
|
||||||
|
<rect id="r5" fill="url(#g5)" width="100" height="100"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
8
unittests/remove-unused-attributes-on-parent.svg
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="#0F0" stroke="#000">
|
||||||
|
<rect stroke="#0F0" stroke-width="5" width="100" height="300"/>
|
||||||
|
<rect fill="#FFF" stroke="#000" width="200" height="100"/>
|
||||||
|
<circle fill="#0F0" stroke="#0F0" cx="50" cy="50" r="20"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 328 B |
5
unittests/scour-lengths.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" x="1.0000000" y="1.0000000">
|
||||||
|
<rect x="123.4567" y="123.00" width="300.00001" height="1E+02" fill="lime" />
|
||||||
|
<rect x="123.4567px" y="35.000ex" width="300.00001pt" height="5E+01%" fill="blue" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 296 B |
10
unittests/shorten-ids.svg
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200">
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="this-abomination-should-be-shortened-to-a-single-letter">
|
||||||
|
<stop offset="0" stop-color="black" />
|
||||||
|
<stop offset="1" stop-color="white" />
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<rect fill="url(#this-abomination-should-be-shortened-to-a-single-letter)" x="20" y="20" width="160" height="160" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 448 B |
7
unittests/sodipodi.svg
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:foo="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" sodipodi:version="0.32">
|
||||||
|
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" gridtolerance="10000" guidetolerance="10" objecttolerance="10"/>
|
||||||
|
<rect width="300" height="200" fill="green" sodipodi:bar="1" foo:baz="1"/>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
After Width: | Height: | Size: 540 B |
4
unittests/straight-curve.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="blue" d="M10,10c10,10,30,30,40,40l40-40z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 160 B |
4
unittests/stroke-none.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path id="p" fill="black" style="stroke: none; stroke-width: 1px; stroke-linecap: butt; stroke-dasharray: none; stroke-dashoffset: 2; stroke-linejoin: miter; stroke-opacity: 1;" d="M 7.7592046,36.982095 C 7.8831049,40.873696 7.8339808,45.305308 7.8339808,49.436888 Z" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 379 B |
4
unittests/stroke-nowidth.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path id="p" fill="black" style="stroke: rgb(0, 0, 0); stroke-width: 0; stroke-linecap: butt; stroke-dasharray: none; stroke-dashoffset: 2; stroke-linejoin: miter; stroke-opacity: 1;" d="M 7.7592046,36.982095 C 7.8831049,40.873696 7.8339808,45.305308 7.8339808,49.436888 Z" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 385 B |
4
unittests/stroke-transparent.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path id="p" fill="black" style="stroke: rgb(0, 0, 0); stroke-width: 1px; stroke-linecap: butt; stroke-dasharray: none; stroke-dashoffset: 2; stroke-linejoin: miter; stroke-opacity: 0;" d="M 7.7592046,36.982095 C 7.8831049,40.873696 7.8339808,45.305308 7.8339808,49.436888 Z" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 387 B |
16
unittests/style-cdata.svg
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
|
||||||
|
<defs>
|
||||||
|
<style type="text/css">
|
||||||
|
<![CDATA[
|
||||||
|
rect { fill: url(#somethingreallylong); }
|
||||||
|
]]>
|
||||||
|
</style>
|
||||||
|
<linearGradient id="somethingreallylong" x1="0" x2="0" y1="0" y2="1">
|
||||||
|
<stop stop-color="red" offset="0" />
|
||||||
|
<stop stop-color="green" offset="1" />
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
|
||||||
|
<rect width="100" height="100" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 501 B |
9
unittests/style-to-attr.svg
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<defs>
|
||||||
|
<marker id="m">
|
||||||
|
<rect width="200" height="100"/>
|
||||||
|
</marker>
|
||||||
|
</defs>
|
||||||
|
<line x2="100" style="stroke:#000; marker-start:url(#m); marker-end:url(#m); marker-mid: url(#m)" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 253 B |
3
unittests/transform-matrix-is-identity.svg
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 9 9">
|
||||||
|
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="matrix(1 0 0 1 0 0)"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 162 B |
4
unittests/transform-matrix-is-rotate-135.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="-9 0 9 9">
|
||||||
|
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="matrix(-0.70710678118654746 0.70710678118654757 -0.70710678118654757 -0.70710678118654746 0 0)"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 293 B |
4
unittests/transform-matrix-is-rotate-225.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="-9 0 9 9">
|
||||||
|
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="matrix(-0.70710678118654746 -0.70710678118654757 0.70710678118654757 -0.70710678118654746 0 0)"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 293 B |
4
unittests/transform-matrix-is-rotate-45.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="-9 0 9 9">
|
||||||
|
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="matrix(0.70710678118654757 0.70710678118654746 -0.70710678118654746 0.70710678118654757 0 0)"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 291 B |
4
unittests/transform-matrix-is-rotate-90.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="-9 0 9 9">
|
||||||
|
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="matrix(0 1 -1 0 0 0)"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 219 B |
4
unittests/transform-matrix-is-rotate-neg-45.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="-9 0 9 9">
|
||||||
|
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="matrix(0.70710678118654757 -0.70710678118654746 0.70710678118654746 0.70710678118654757 0 0)"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 291 B |
4
unittests/transform-matrix-is-rotate-neg-90.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="-9 0 9 9">
|
||||||
|
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="matrix(0 -1 1 0 0 0)"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 219 B |
3
unittests/transform-matrix-is-scale-2-3.svg
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 18 27">
|
||||||
|
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="matrix(2 0 0 3 0 0)"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 164 B |
4
unittests/transform-matrix-is-scale-neg-1.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="-9 -9 9 9">
|
||||||
|
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="matrix(-1 0 0 -1 0 0)"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 221 B |
3
unittests/transform-matrix-is-translate.svg
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="2 3 9 9">
|
||||||
|
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="matrix(1 0 0 1 2 3)"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 162 B |
5
unittests/transform-rotate-fold-3args.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="-9 0 9 9">
|
||||||
|
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="rotate(90 0 0.0)"/>
|
||||||
|
<!-- optional zero trailing args to transform type rotate get removed -->
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 291 B |
3
unittests/transform-rotate-is-identity.svg
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 9 9">
|
||||||
|
<line transform="rotate(-300) rotate(-60)" stroke="red" y1="9" x1="9"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 153 B |
5
unittests/transform-rotate-trim-range-719.5.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="-9 0 9 9">
|
||||||
|
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="rotate(719.5)"/>
|
||||||
|
<!-- all rotation angles can be mapped to the shorter range [-90, 270[ -->
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 289 B |
5
unittests/transform-rotate-trim-range-neg-540.0.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="-9 0 9 9">
|
||||||
|
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="rotate(-540.0) rotate(0)"/>
|
||||||
|
<!-- all rotation angles can be mapped to the shorter range [-90, 270[ -->
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 300 B |
4
unittests/transform-skewX-is-identity.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 9 9">
|
||||||
|
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="skewX(0)"/>
|
||||||
|
<!-- skewX(0) is the identity transform, which can safely be removed -->
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 226 B |
4
unittests/transform-skewY-is-identity.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 9 9">
|
||||||
|
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="skewY(0)"/>
|
||||||
|
<!-- skewY(0) is the identity transform, which can safely be removed -->
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 226 B |
5
unittests/transform-translate-is-identity.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="-9 0 9 9">
|
||||||
|
<line stroke="rgba(255,0,0,0.5)" y1="9" x1="9" transform="translate(0, 20) translate(10) translate(-10 -20.0)"/>
|
||||||
|
<line stroke="rgba(0,0,255,0.5)" y1="9" x1="9"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 300 B |