saschagehlich / pixi-svg-graphics

Draws SVG documents on PIXI.Graphics objects
MIT License
55 stars 20 forks source link

Only apply beginFill or lineStyle if applicable #6

Closed psyrendust closed 5 years ago

psyrendust commented 9 years ago

If you happen to have a path with fill:none; and it does not contain a close path command ('z') the color2color function will return [0, 0, 0, 0] (black with 0 alpha), which will turn the path into a shape when it was meant to be drawn as a line.

<path style="fill:none;stroke:#FDFEFF;stroke-width:86;stroke-linejoin:round;stroke-miterlimit:10;" d="M799.2-67c0,0,3,1494.1,3,1548.2s-2.7,123.1,19.8,169.6   c22.5,46.5,66,94.5,66,175.5s-24,154.5-24,154.5"/>
scottmcdonnell commented 8 years ago

This PR fixes open paths for my project. Can it be merged?