mchoe / SwiftSVG

A simple, performant, and lightweight SVG parser
Other
1.93k stars 229 forks source link

Stroke color is now applied correctly #91

Closed shaps80 closed 6 years ago

shaps80 commented 6 years ago

Fixes #86

This PR ensures the correct colour is applied to stroke all sublayers. However there are some caveats listed below.

  1. When a stroke is provided (i.e. lineWidth) on the svgLayer, the boundingBox value will actually return a clipped rectangle since the stroke is applied along the shapes edge (from its centre)
  2. Setting a stroke seems to break some SVG paths. Not sure why atm.
mchoe commented 6 years ago

Thank you @shaps80!