Handle stop offsets in percentages. Convert stop offsets into floating point (or integer if possible)
This commit is contained in:
parent
efbdd3a027
commit
321f16c46d
3 changed files with 117 additions and 86 deletions
|
|
@ -189,6 +189,13 @@ class RemoveDuplicateLinearGradientStops(unittest.TestCase):
|
|||
self.assertEquals(len(grad[0].getElementsByTagNameNS(SVGNS, 'stop')), 3,
|
||||
'Duplicate linear gradient stops not removed' )
|
||||
|
||||
class RemoveDuplicateLinearGradientStopsPct(unittest.TestCase):
|
||||
def runTest(self):
|
||||
doc = scour.scourXmlFile('unittests/duplicate-gradient-stops-pct.svg')
|
||||
grad = doc.getElementsByTagNameNS(SVGNS, 'linearGradient')
|
||||
self.assertEquals(len(grad[0].getElementsByTagNameNS(SVGNS, 'stop')), 3,
|
||||
'Duplicate linear gradient stops with percentages not removed' )
|
||||
|
||||
class RemoveDuplicateRadialGradientStops(unittest.TestCase):
|
||||
def runTest(self):
|
||||
doc = scour.scourXmlFile('unittests/duplicate-gradient-stops.svg')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue