Merge fixes from lp:~scouring/scour/transform, some sourced from lp:~ecmanaut/scour/transform.
184
scour.py
|
|
@ -2335,123 +2335,164 @@ def optimizeTransform(transform):
|
|||
|
||||
The transformation list is modified in-place.
|
||||
"""
|
||||
# FIXME: reordering these would optimize even more cases:
|
||||
# first: Fold consecutive runs of the same transformation
|
||||
# extra: Attempt to cast between types to create sameness:
|
||||
# "matrix(0 1 -1 0 0 0) rotate(180) scale(-1)" all
|
||||
# are rotations (90, 180, 180) -- thus "rotate(90)"
|
||||
# second: Simplify transforms where numbers are optional.
|
||||
# third: Attempt to simplify any single remaining matrix()
|
||||
#
|
||||
# if there's only one transformation and it's a matrix,
|
||||
# try to make it a shorter non-matrix transformation
|
||||
# NOTE: as matrix(a b c d e f) in SVG means the matrix:
|
||||
# |¯ a c e ¯| make constants |¯ A1 A2 A3 ¯|
|
||||
# | b d f | translating them | B1 B2 B3 |
|
||||
# |_ 0 0 1 _| to more readable |_ 0 0 1 _|
|
||||
if len(transform) == 1 and transform[0][0] == 'matrix':
|
||||
matrix = A1, B1, A2, B2, A3, B3 = transform[0][1]
|
||||
# |¯ 1 0 0 ¯|
|
||||
# | 0 1 0 | Identity matrix (no transformation)
|
||||
# |_ 0 0 1 _|
|
||||
if transform[0][1] == [1, 0, 0, 0, 1, 0]:
|
||||
if matrix == [1, 0, 0, 1, 0, 0]:
|
||||
del transform[0]
|
||||
# |¯ 1 0 X ¯|
|
||||
# | 0 1 Y | Translation by (X, Y).
|
||||
# |_ 0 0 1 _|
|
||||
if (transform[0][1][0] == 1 and
|
||||
transform[0][1][1] == 0 and
|
||||
transform[0][1][3] == 0 and
|
||||
transform[0][1][4] == 1):
|
||||
transform[0] = ('translate', [
|
||||
transform[0][1][2], transform[0][1][5]
|
||||
])
|
||||
elif (A1 == 1 and A2 == 0
|
||||
and B1 == 0 and B2 == 1):
|
||||
transform[0] = ('translate', [A3, B3])
|
||||
# |¯ X 0 0 ¯|
|
||||
# | 0 Y 0 | Scaling by (X, Y).
|
||||
# |_ 0 0 1 _|
|
||||
elif (transform[0][1][1] == 0 and
|
||||
transform[0][1][2] == 0 and
|
||||
transform[0][1][3] == 0 and
|
||||
transform[0][1][5] == 0):
|
||||
transform[0] = ('scale', [
|
||||
transform[0][1][0], transform[0][1][4]
|
||||
])
|
||||
elif ( A2 == 0 and A3 == 0
|
||||
and B1 == 0 and B3 == 0):
|
||||
transform[0] = ('scale', [A1, B2])
|
||||
# |¯ cos(A) -sin(A) 0 ¯| Rotation by angle A,
|
||||
# | sin(A) cos(A) 0 | clockwise, about the origin.
|
||||
# |_ 0 0 1 _| A is in degrees.
|
||||
elif (transform[0][1][0] == transform[0][1][4] and
|
||||
transform[0][1][1] == -transform[0][1][3] and
|
||||
transform[0][1][0] >= 0 and
|
||||
transform[0][1][0] <= 1 and
|
||||
transform[0][1][3] == sqrt(1 - transform[0][1][0] ** 2) and
|
||||
transform[0][1][2] == 0 and
|
||||
transform[0][1][5] == 0):
|
||||
transform[0] = ('rotate', [
|
||||
# What allows us to get the angle from the matrix
|
||||
# is the inverse sine of sin(A), which is the 4th
|
||||
# matrix component, or the inverse cosine of cos(A),
|
||||
# which is the 1st matrix component. I chose sin(A).
|
||||
# math.asin returns radians, so convert.
|
||||
# SVG demands degrees.
|
||||
Decimal(math.degrees(math.asin(transform[0][1][4])))
|
||||
])
|
||||
# |_ 0 0 1 _| A is in degrees, [-180...180].
|
||||
elif (A1 == B2 and -1 <= A1 <= 1 and A3 == 0
|
||||
and -B1 == A2 and -1 <= B1 <= 1 and B3 == 0
|
||||
# as cos² A + sin² A == 1 and as decimal trig is approximate:
|
||||
# FIXME: the "epsilon" term here should really be some function
|
||||
# of the precision of the (sin|cos)_A terms, not 1e-15:
|
||||
and abs((B1 ** 2) + (A1 ** 2) - 1) < Decimal("1e-15")):
|
||||
sin_A, cos_A = B1, A1
|
||||
# while asin(A) and acos(A) both only have an 180° range
|
||||
# the sign of sin(A) and cos(A) varies across quadrants,
|
||||
# letting us hone in on the angle the matrix represents:
|
||||
# -- => < -90 | -+ => -90..0 | ++ => 0..90 | +- => >= 90
|
||||
#
|
||||
# http://en.wikipedia.org/wiki/File:Sine_cosine_plot.svg
|
||||
# shows asin has the correct angle the middle quadrants:
|
||||
A = Decimal(str(math.degrees(math.asin(float(sin_A)))))
|
||||
if cos_A < 0: # otherwise needs adjusting from the edges
|
||||
if sin_A < 0:
|
||||
A = -180 - A
|
||||
else:
|
||||
A = 180 - A
|
||||
transform[0] = ('rotate', [A])
|
||||
|
||||
# Simplify transformations where numbers are optional.
|
||||
for singleTransform in transform:
|
||||
if singleTransform[0] == 'translate':
|
||||
for type, args in transform:
|
||||
if type == 'translate':
|
||||
# Only the X coordinate is required for translations.
|
||||
# If the Y coordinate is unspecified, it's 0.
|
||||
if (len(singleTransform[1]) == 2 and
|
||||
singleTransform[1][1] == 0):
|
||||
del singleTransform[1][1]
|
||||
elif singleTransform[0] == 'rotate':
|
||||
if len(args) == 2 and args[1] == 0:
|
||||
del args[1]
|
||||
elif type == 'rotate':
|
||||
# Only the angle is required for rotations.
|
||||
# If the coordinates are unspecified, it's the origin (0, 0).
|
||||
if (len(singleTransform[1]) == 3 and
|
||||
singleTransform[1][1] == 0 and
|
||||
singleTransform[1][2] == 0):
|
||||
del singleTransform[1][1:]
|
||||
elif singleTransform[0] == 'scale':
|
||||
if len(args) == 3 and args[1] == args[2] == 0:
|
||||
del args[1:]
|
||||
elif type == 'scale':
|
||||
# Only the X scaling factor is required.
|
||||
# If the Y factor is unspecified, it's the same as X.
|
||||
if (len(singleTransform[1]) == 2 and
|
||||
singleTransform[1][0] == singleTransform[1][1]):
|
||||
del singleTransform[1][1]
|
||||
|
||||
if len(args) == 2 and args[0] == args[1]:
|
||||
del args[1]
|
||||
|
||||
# Attempt to coalesce runs of the same transformation.
|
||||
# Translations followed immediately by other translations,
|
||||
# rotations followed immediately by other rotations,
|
||||
# scaling followed immediately by other scaling,
|
||||
# are safe to add.
|
||||
# A matrix followed immediately by another matrix
|
||||
# would be safe to multiply together, too.
|
||||
# Identity skewX/skewY are safe to remove, but how do they accrete?
|
||||
# |¯ 1 0 0 ¯|
|
||||
# | tan(A) 1 0 | skews X coordinates by angle A
|
||||
# |_ 0 0 1 _|
|
||||
#
|
||||
# |¯ 1 tan(A) 0 ¯|
|
||||
# | 0 1 0 | skews Y coordinates by angle A
|
||||
# |_ 0 0 1 _|
|
||||
#
|
||||
# FIXME: A matrix followed immediately by another matrix
|
||||
# would be safe to multiply together, too.
|
||||
i = 1
|
||||
while i < len(transform):
|
||||
if transform[i][0] == transform[i - 1][0] == 'translate':
|
||||
transform[i - 1][1][0] += transform[i][1][0] # x
|
||||
currType, currArgs = transform[i]
|
||||
prevType, prevArgs = transform[i - 1]
|
||||
if currType == prevType == 'translate':
|
||||
prevArgs[0] += currArgs[0] # x
|
||||
# for y, only add if the second translation has an explicit y
|
||||
if len(transform[i][1]) == 2:
|
||||
if len(transform[i - 1][1]) == 2:
|
||||
transform[i - 1][1][1] += transform[i][1][1] # y
|
||||
elif len(transform[i - 1][1]) == 1:
|
||||
transform[i - 1][1].append(transform[i][1][1]) # y
|
||||
if len(currArgs) == 2:
|
||||
if len(prevArgs) == 2:
|
||||
prevArgs[1] += currArgs[1] # y
|
||||
elif len(prevArgs) == 1:
|
||||
prevArgs.append(currArgs[1]) # y
|
||||
del transform[i]
|
||||
if transform[i - 1][1][0] == transform[i - 1][1][1] == 0:
|
||||
if prevArgs[0] == prevArgs[1] == 0:
|
||||
# Identity translation!
|
||||
i -= 1
|
||||
del transform[i]
|
||||
elif (transform[i][0] == transform[i - 1][0] == 'rotate'
|
||||
and len(transform[i - 1][1]) == len(transform[i][1]) == 1):
|
||||
elif (currType == prevType == 'rotate'
|
||||
and len(prevArgs) == len(currArgs) == 1):
|
||||
# Only coalesce if both rotations are from the origin.
|
||||
transform[i - 1][1][0] += transform[i][1][0] # angle
|
||||
prevArgs[0] += currArgs[0] # angle
|
||||
# Put the new angle in the range ]-360, 360[.
|
||||
# The modulo operator yields results with the sign of the
|
||||
# divisor, so for negative dividends, we preserve the sign
|
||||
# of the angle.
|
||||
if prevArgs[0] < 0: prevArgs[0] = prevArgs[0] % -360
|
||||
else: prevArgs[0] = prevArgs[0] % 360
|
||||
|
||||
del transform[i]
|
||||
elif transform[i][0] == transform[i - 1][0] == 'scale':
|
||||
transform[i - 1][1][0] *= transform[i][1][0] # x
|
||||
elif currType == prevType == 'scale':
|
||||
prevArgs[0] *= currArgs[0] # x
|
||||
# handle an implicit y
|
||||
if len(transform[i - 1][1]) == 2 and len(transform[i][1]) == 2:
|
||||
if len(prevArgs) == 2 and len(currArgs) == 2:
|
||||
# y1 * y2
|
||||
transform[i - 1][1][1] *= transform[i][1][1]
|
||||
elif len(transform[i - 1][1]) == 1 and len(transform[i][1]) == 2:
|
||||
prevArgs[1] *= currArgs[1]
|
||||
elif len(prevArgs) == 1 and len(currArgs) == 2:
|
||||
# create y2 = uniformscalefactor1 * y2
|
||||
transform[i - 1][1].append(transform[i - 1][1][0] * transform[i][1][1])
|
||||
elif len(transform[i - 1][1]) == 2 and len(transform[i][1]) == 1:
|
||||
prevArgs.append(prevArgs[0] * currArgs[1])
|
||||
elif len(prevArgs) == 2 and len(currArgs) == 1:
|
||||
# y1 * uniformscalefactor2
|
||||
transform[i - 1][1][1] *= transform[i][1][0]
|
||||
prevArgs[1] *= currArgs[0]
|
||||
del transform[i]
|
||||
if transform[i - 1][1][0] == transform[i - 1][1][1] == 1:
|
||||
if prevArgs[0] == prevArgs[1] == 1:
|
||||
# Identity scale!
|
||||
i -= 1
|
||||
del transform[i]
|
||||
else:
|
||||
i += 1
|
||||
|
||||
# Some fixups are needed for single-element transformation lists, since
|
||||
# the loop above was to coalesce elements with their predecessors in the
|
||||
# list, and thus it required 2 elements.
|
||||
i = 0
|
||||
while i < len(transform):
|
||||
currType, currArgs = transform[i]
|
||||
if ((currType == 'skewX' or currType == 'skewY')
|
||||
and len(currArgs) == 1 and currArgs[0] == 0):
|
||||
# Identity skew!
|
||||
del transform[i]
|
||||
elif ((currType == 'rotate')
|
||||
and len(currArgs) == 1 and currArgs[0] == 0):
|
||||
# Identity rotation!
|
||||
del transform[i]
|
||||
else:
|
||||
i += 1
|
||||
|
||||
def optimizeTransforms(element, options) :
|
||||
"""
|
||||
Attempts to optimise transform specifications on the given node and its children.
|
||||
|
|
@ -2470,7 +2511,10 @@ def optimizeTransforms(element, options) :
|
|||
newVal = serializeTransform(transform)
|
||||
|
||||
if len(newVal) < len(val):
|
||||
element.setAttribute(transformAttr, newVal)
|
||||
if len(newVal):
|
||||
element.setAttribute(transformAttr, newVal)
|
||||
else:
|
||||
element.removeAttribute(transformAttr)
|
||||
num += len(val) - len(newVal)
|
||||
|
||||
for child in element.childNodes:
|
||||
|
|
|
|||
91
testscour.py
|
|
@ -1217,6 +1217,96 @@ class RemoveDefsWithWhitespace(unittest.TestCase):
|
|||
self.assertEquals(doc.getElementsByTagName('defs').length, 0,
|
||||
'Kept defs, although it contains only whitespace or is <defs/>')
|
||||
|
||||
class TransformIdentityMatrix(unittest.TestCase):
|
||||
def runTest(self):
|
||||
doc = scour.scourXmlFile('unittests/transform-matrix-is-identity.svg')
|
||||
self.assertEquals(doc.getElementsByTagName('line')[0].getAttribute('transform'), '',
|
||||
'Transform containing identity matrix not removed')
|
||||
|
||||
class TransformRotate135(unittest.TestCase):
|
||||
def runTest(self):
|
||||
doc = scour.scourXmlFile('unittests/transform-matrix-is-rotate-135.svg')
|
||||
self.assertEquals(doc.getElementsByTagName('line')[0].getAttribute('transform'), 'rotate(135)',
|
||||
'Rotation matrix not converted to rotate(135)')
|
||||
|
||||
class TransformRotate45(unittest.TestCase):
|
||||
def runTest(self):
|
||||
doc = scour.scourXmlFile('unittests/transform-matrix-is-rotate-45.svg')
|
||||
self.assertEquals(doc.getElementsByTagName('line')[0].getAttribute('transform'), 'rotate(45)',
|
||||
'Rotation matrix not converted to rotate(45)')
|
||||
|
||||
class TransformRotate90(unittest.TestCase):
|
||||
def runTest(self):
|
||||
doc = scour.scourXmlFile('unittests/transform-matrix-is-rotate-90.svg')
|
||||
self.assertEquals(doc.getElementsByTagName('line')[0].getAttribute('transform'), 'rotate(90)',
|
||||
'Rotation matrix not converted to rotate(90)')
|
||||
|
||||
class TransformRotateCCW135(unittest.TestCase):
|
||||
def runTest(self):
|
||||
doc = scour.scourXmlFile('unittests/transform-matrix-is-rotate-neg-135.svg')
|
||||
self.assertEquals(doc.getElementsByTagName('line')[0].getAttribute('transform'), 'rotate(-135)',
|
||||
'Counter-clockwise rotation matrix not converted to rotate(-135)')
|
||||
|
||||
class TransformRotateCCW45(unittest.TestCase):
|
||||
def runTest(self):
|
||||
doc = scour.scourXmlFile('unittests/transform-matrix-is-rotate-neg-45.svg')
|
||||
self.assertEquals(doc.getElementsByTagName('line')[0].getAttribute('transform'), 'rotate(-45)',
|
||||
'Counter-clockwise rotation matrix not converted to rotate(-45)')
|
||||
|
||||
class TransformRotateCCW90(unittest.TestCase):
|
||||
def runTest(self):
|
||||
doc = scour.scourXmlFile('unittests/transform-matrix-is-rotate-neg-90.svg')
|
||||
self.assertEquals(doc.getElementsByTagName('line')[0].getAttribute('transform'), 'rotate(-90)',
|
||||
'Counter-clockwise rotation matrix not converted to rotate(-90)')
|
||||
|
||||
class TransformScale2by3(unittest.TestCase):
|
||||
def runTest(self):
|
||||
doc = scour.scourXmlFile('unittests/transform-matrix-is-scale-2-3.svg')
|
||||
self.assertEquals(doc.getElementsByTagName('line')[0].getAttribute('transform'), 'scale(2 3)',
|
||||
'Scaling matrix not converted to scale(2 3)')
|
||||
|
||||
class TransformScaleMinus1(unittest.TestCase):
|
||||
def runTest(self):
|
||||
doc = scour.scourXmlFile('unittests/transform-matrix-is-scale-neg-1.svg')
|
||||
self.assertEquals(doc.getElementsByTagName('line')[0].getAttribute('transform'), 'scale(-1)',
|
||||
'Scaling matrix not converted to scale(-1)')
|
||||
|
||||
class TransformTranslate(unittest.TestCase):
|
||||
def runTest(self):
|
||||
doc = scour.scourXmlFile('unittests/transform-matrix-is-translate.svg')
|
||||
self.assertEquals(doc.getElementsByTagName('line')[0].getAttribute('transform'), 'translate(2 3)',
|
||||
'Translation matrix not converted to translate(2 3)')
|
||||
|
||||
class TransformRotation3Args(unittest.TestCase):
|
||||
def runTest(self):
|
||||
doc = scour.scourXmlFile('unittests/transform-rotate-fold-3args.svg')
|
||||
self.assertEquals(doc.getElementsByTagName('line')[0].getAttribute('transform'), 'rotate(90)',
|
||||
'Optional zeroes in rotate(angle 0 0) not removed')
|
||||
|
||||
class TransformIdentityRotation(unittest.TestCase):
|
||||
def runTest(self):
|
||||
doc = scour.scourXmlFile('unittests/transform-rotate-is-identity.svg')
|
||||
self.assertEquals(doc.getElementsByTagName('line')[0].getAttribute('transform'), '',
|
||||
'Transform containing identity rotation not removed')
|
||||
|
||||
class TransformIdentitySkewX(unittest.TestCase):
|
||||
def runTest(self):
|
||||
doc = scour.scourXmlFile('unittests/transform-skewX-is-identity.svg')
|
||||
self.assertEquals(doc.getElementsByTagName('line')[0].getAttribute('transform'), '',
|
||||
'Transform containing identity X-axis skew not removed')
|
||||
|
||||
class TransformIdentitySkewY(unittest.TestCase):
|
||||
def runTest(self):
|
||||
doc = scour.scourXmlFile('unittests/transform-skewY-is-identity.svg')
|
||||
self.assertEquals(doc.getElementsByTagName('line')[0].getAttribute('transform'), '',
|
||||
'Transform containing identity Y-axis skew not removed')
|
||||
|
||||
class TransformIdentityTranslate(unittest.TestCase):
|
||||
def runTest(self):
|
||||
doc = scour.scourXmlFile('unittests/transform-translate-is-identity.svg')
|
||||
self.assertEquals(doc.getElementsByTagName('line')[0].getAttribute('transform'), '',
|
||||
'Transform containing identity translation not removed')
|
||||
|
||||
class DuplicateGradientsUpdateStyle(unittest.TestCase):
|
||||
def runTest(self):
|
||||
doc = scour.scourXmlFile('unittests/duplicate-gradients-update-style.svg',
|
||||
|
|
@ -1233,7 +1323,6 @@ class DuplicateGradientsUpdateStyle(unittest.TestCase):
|
|||
# TODO; write a test for embedding rasters
|
||||
# TODO: write a test for --disable-embed-rasters
|
||||
# TODO: write tests for --keep-editor-data
|
||||
# TODO: write tests for scouring transformations
|
||||
|
||||
if __name__ == '__main__':
|
||||
testcss = __import__('testcss')
|
||||
|
|
|
|||
|
|
@ -42,4 +42,4 @@
|
|||
xmlns:sfw="http://ns.adobe.com/SaveForWeb/1.0/"
|
||||
sfw:baz="1"
|
||||
ok:baz="1" />
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
|
@ -20,4 +20,4 @@
|
|||
<path d="m1,1z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
|
@ -3,4 +3,4 @@
|
|||
<script type="application/ecmascript"><![CDATA[
|
||||
alert('pb&j');
|
||||
]]></script>
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 183 B After Width: | Height: | Size: 184 B |
|
|
@ -8,4 +8,4 @@
|
|||
<radialGradient id="g2" xlink:href="#g1" cx="50%" cy="50%" r="30%" gradientUnits="objectBoundingBox"/>
|
||||
</defs>
|
||||
<rect fill="url(#g2)" width="200" height="200"/>
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 506 B After Width: | Height: | Size: 507 B |
|
|
@ -8,4 +8,4 @@
|
|||
<radialGradient id="grad2" xlink:href="#grad1" cx="100" cy="100" r="70"/>
|
||||
</defs>
|
||||
<rect fill="url(#grad2)" width="200" height="200"/>
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 546 B After Width: | Height: | Size: 547 B |
|
|
@ -1,4 +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>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 274 B After Width: | Height: | Size: 275 B |
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<!-- Oh look a comment -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 130 B After Width: | Height: | Size: 131 B |
|
|
@ -3,4 +3,4 @@
|
|||
<!-- Comment #2 -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
</svg>
|
||||
<!-- After -->
|
||||
<!-- After -->
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 120 B After Width: | Height: | Size: 121 B |
|
|
@ -6,4 +6,4 @@
|
|||
<circle id="e" r="20" fill="#0f0"/>
|
||||
</g>
|
||||
<use xlink:href="#e" />
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 323 B After Width: | Height: | Size: 324 B |
|
|
@ -3,4 +3,4 @@
|
|||
<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>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 298 B After Width: | Height: | Size: 299 B |
|
|
@ -24,4 +24,4 @@
|
|||
<rect height="300" width="300"/>
|
||||
<circle class="circ" cx="350" cy="350" r="40"/>
|
||||
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 690 B After Width: | Height: | Size: 691 B |
|
|
@ -10,4 +10,4 @@
|
|||
</defs>
|
||||
<rect fill="url(#g2)" width="200" height="200"/>
|
||||
<rect fill="url(#g3)" width="200" height="200" y="200"/>
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 598 B After Width: | Height: | Size: 599 B |
|
|
@ -1,4 +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>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 148 B After Width: | Height: | Size: 149 B |
|
|
@ -9,4 +9,4 @@
|
|||
</linearGradient>
|
||||
</defs>
|
||||
<rect style="fill: url(#sea-gradient) rgb(0, 0, 0);" y="0" x="0" height="100" width="100"/>
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 496 B After Width: | Height: | Size: 497 B |
|
|
@ -4,4 +4,4 @@
|
|||
<g transform="translate(10,10)">
|
||||
<rect width="300" height="200" fill="green" />
|
||||
</g>
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 202 B After Width: | Height: | Size: 203 B |
|
|
@ -1,3 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata></metadata>
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 71 B After Width: | Height: | Size: 72 B |
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" ?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<style id="style1" />
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 96 B After Width: | Height: | Size: 97 B |
|
|
@ -2,4 +2,4 @@
|
|||
<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>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 429 B After Width: | Height: | Size: 430 B |
|
|
@ -1,4 +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>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 161 B After Width: | Height: | Size: 162 B |
|
|
@ -19,4 +19,4 @@
|
|||
</rdf:Description>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 764 B After Width: | Height: | Size: 765 B |
|
|
@ -7,4 +7,4 @@
|
|||
<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>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 535 B After Width: | Height: | Size: 536 B |
|
|
@ -15,4 +15,4 @@
|
|||
<defs>
|
||||
<example:odor id="odor1423" fill="grape"/>
|
||||
</defs>
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 608 B After Width: | Height: | Size: 609 B |
|
|
@ -15,4 +15,4 @@
|
|||
<defs>
|
||||
<example:odor id="odor1423" fill="grape"/>
|
||||
</defs>
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 594 B After Width: | Height: | Size: 595 B |
|
|
@ -10,4 +10,4 @@
|
|||
<rect width="300" height="200" fill="green" />
|
||||
<circle cx="200" cy="100" r="50" fill="yellow" />
|
||||
</g>
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 364 B After Width: | Height: | Size: 365 B |
|
|
@ -8,4 +8,4 @@
|
|||
</linearGradient>
|
||||
</defs>
|
||||
<rect id='r2' fill="url(#Polka_Dot_Pattern)" />
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 347 B After Width: | Height: | Size: 348 B |
|
|
@ -9,4 +9,4 @@
|
|||
</g>
|
||||
</defs>
|
||||
<rect fill="url(#g1)" width="100" height="100" />
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 304 B After Width: | Height: | Size: 305 B |
|
|
@ -4,4 +4,4 @@ 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>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 544 B After Width: | Height: | Size: 545 B |
|
|
@ -1,4 +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>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 181 B After Width: | Height: | Size: 182 B |
|
|
@ -7,4 +7,4 @@
|
|||
</g>
|
||||
<circle fill="#0F0" stroke="0F0" cx="50" cy="50" r="20" />
|
||||
</g>
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 367 B After Width: | Height: | Size: 368 B |
|
|
@ -10,4 +10,4 @@
|
|||
Goodbye
|
||||
<tspan font-style="italic">Cruel World!</tspan>
|
||||
</text>
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 435 B After Width: | Height: | Size: 436 B |
|
|
@ -6,4 +6,4 @@
|
|||
<circle cx="200" cy="100" r="50" fill="yellow" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 252 B After Width: | Height: | Size: 253 B |
|
|
@ -1,4 +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>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 415 B After Width: | Height: | Size: 416 B |
|
|
@ -1,4 +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>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 239 B After Width: | Height: | Size: 240 B |
|
|
@ -2,4 +2,4 @@
|
|||
<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>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 151 B After Width: | Height: | Size: 152 B |
|
|
@ -1,4 +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>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 192 B After Width: | Height: | Size: 193 B |
|
|
@ -1,4 +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>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 227 B After Width: | Height: | Size: 228 B |
|
|
@ -1,4 +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>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 158 B After Width: | Height: | Size: 159 B |
|
|
@ -1,4 +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>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 161 B After Width: | Height: | Size: 162 B |
|
|
@ -1,4 +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>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 145 B After Width: | Height: | Size: 146 B |
|
|
@ -2,4 +2,4 @@
|
|||
<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>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 244 B After Width: | Height: | Size: 245 B |
|
|
@ -1,4 +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>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 146 B After Width: | Height: | Size: 147 B |
|
|
@ -7,4 +7,4 @@
|
|||
</linearGradient>
|
||||
</defs>
|
||||
<rect width="100" height="100" fill="url("#g")"/>
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 371 B After Width: | Height: | Size: 372 B |
|
|
@ -5,4 +5,4 @@
|
|||
<title>Test</title>
|
||||
</svg:rect>
|
||||
<vector:rect height="100" width="100"/>
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 330 B After Width: | Height: | Size: 331 B |
|
|
@ -8,4 +8,4 @@
|
|||
</linearGradient>
|
||||
</defs>
|
||||
<rect id='r2' fill="url(#Polka_Dot_Pattern)" />
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 338 B After Width: | Height: | Size: 339 B |
|
|
@ -5,4 +5,4 @@
|
|||
<g id="G"><use xlink:href="#L"/> <path stroke="#000000" d="M0,100 100,0"/></g>
|
||||
</defs>
|
||||
<use xlink:href="#G"/>
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 345 B After Width: | Height: | Size: 346 B |
|
|
@ -5,4 +5,4 @@
|
|||
<rect fill="#FFF" stroke="#000" width="200" height="100"/>
|
||||
<circle fill="#0F0" stroke="#0F0" cx="50" cy="50" r="20"/>
|
||||
</g>
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 327 B After Width: | Height: | Size: 328 B |
|
|
@ -2,4 +2,4 @@
|
|||
<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>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 295 B After Width: | Height: | Size: 296 B |
|
|
@ -7,4 +7,4 @@
|
|||
</linearGradient>
|
||||
</defs>
|
||||
<rect fill="url(#this-abomination-should-be-shortened-to-a-single-letter)" x="20" y="20" width="160" height="160" />
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 447 B After Width: | Height: | Size: 448 B |
|
|
@ -1,4 +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>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 159 B After Width: | Height: | Size: 160 B |
|
|
@ -1,4 +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>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 378 B After Width: | Height: | Size: 379 B |
|
|
@ -1,4 +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>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 384 B After Width: | Height: | Size: 385 B |
|
|
@ -1,4 +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>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 386 B After Width: | Height: | Size: 387 B |
|
|
@ -6,4 +6,4 @@
|
|||
</marker>
|
||||
</defs>
|
||||
<line x2="100" style="stroke:#000; marker-start:url(#m); marker-end:url(#m); marker-mid: url(#m)" />
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 252 B 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-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-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-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 |
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 |
|
|
@ -3,4 +3,4 @@
|
|||
<linearGradient id="Polka_Dot_Pattern">
|
||||
<stop offset="0.5" stop-color="blue" />
|
||||
</linearGradient>
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 213 B After Width: | Height: | Size: 214 B |
|
|
@ -3,4 +3,4 @@
|
|||
<pattern id="Polka_Dot_Pattern">
|
||||
<polygon fill="none" points="71.125,-1.896 2.125,-1.896 2.125,-70.896 71.125,-70.896" />
|
||||
</pattern>
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 238 B |
|
|
@ -3,4 +3,4 @@
|
|||
<radialGradient id="Polka_Dot_Pattern">
|
||||
<stop offset="0.5" stop-color="blue" />
|
||||
</radialGradient>
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 202 B After Width: | Height: | Size: 203 B |
|
|
@ -2,4 +2,4 @@
|
|||
<svg xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<desc>ú</desc>
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 167 B After Width: | Height: | Size: 168 B |
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<text xml:space="preserve"><tspan font-style="italic">Use <tspan font-style="bold">bold</tspan> text</tspan></text>
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 219 B After Width: | Height: | Size: 220 B |
|
|
@ -21,4 +21,4 @@
|
|||
<rect height="69.247704" width="319.89233" fill="url(#linearGradient1657)"/>
|
||||
<rect fill="url(#linearGradient2465)" width="319.99103" height="69.247704"/>
|
||||
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |