Gap/No Fill in between the Strokes in the ShapeLayer
PIRANAVARUBAN opened this issue · 2 comments
PIRANAVARUBAN commented
func drawSVG(){
let svgURL = Bundle.main.url(forResource: "test123", withExtension: "svg")!
let paths = SVGBezierPath.pathsFromSVG(at: svgURL)
for (index, path) in paths.enumerated() {
let shapeLayer = CAShapeLayer()
shapeLayer.path = path.cgPath
shapeLayer.fillColor = UIColor.clear.cgColor
shapeLayer.lineWidth = path.lineWidth
shapeLayer.strokeColor = UIColor.green.cgColor
imageLayer.addSublayer(shapeLayer)
}
size = SVGBoundingRectForPaths(paths).size
imageLayer.masksToBounds = false
self.layer.addSublayer(imageLayer)
}
I am only giving the Path to Shape layer. and Filling Clear color to it I am drawing SVG as Above. When Strokes of the SVG varying Stroke width I am seeing a Gap Between the Strokes.
fjolnir commented
Might want to provide the svg file
arielelkin commented
closing as we haven't heard back from you, but feel free to reopen with more information.