Closed jcward closed 8 years ago
I realize I've done the default joint style slightly wrong for inheritance, but it won't matter until later when the properties are properly inherited. I've said that "not defining a joint style == define as miter" -- but later when they're inherited, inheritance needs to take precedence over this non-definition.
But since property inheritance is currently non-existent, and this is an improvement on the current state, I might take this PR anyway. We're taking baby steps in the right direction. ;)
Please review @ibilon
@jcward do you have an example of matrix string that failed with the previous regex?
Also this seems to have conflict now.
I'll see if I can push an update in the next hour or so.
@ibilon ok, I've fixed the merge conflict and added a simple matrix rotation testcase that will coredump before this matrix regexp fix is in place:
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
<g>
<title>Layer 1</title>
<rect fill="#ffffff" x="0" y="0" width="100" height="100" />
<rect fill="#ff0000" stroke="#000000" stroke-width="0" stroke-dasharray="null" stroke-linejoin="null" stroke-linecap="null" x="-25" y="50" width="50" height="50" transform="matrix(0.7071, -0.7071, 0.7071, 0.7071, 0, 0)" />
</g>
</svg>
Results in:
>haxe test.hxml
MUnit Results
------------------------------
Class: SvgGenerationTest ....x.Segmentation fault (core dumped)
Error: Command failed with error 139
Because the old regex captures parses nulls values into the Matrix it creates.
Any specific reason not to apply this PR?
@TheSHEEEP no reason in particular.
@ibilon does this PR meet your approval? I can merge it if so.
@ashes999 Sorry forgot about it, all good for me.
See individual commits:
Created a testcase which exercises all of the above: