diff --git a/Examples/Sources/ViewController.swift b/Examples/Sources/ViewController.swift index d6092e0..d383245 100644 --- a/Examples/Sources/ViewController.swift +++ b/Examples/Sources/ViewController.swift @@ -65,7 +65,7 @@ class ViewController: UIViewController { override func loadView() { let imageView = UIImageView(frame: UIScreen.main.bounds) - imageView.image = SVG(named: "stars.svg", in: .samples)?.rasterize() + imageView.image = SVG(named: "bike.svg", in: .samples)?.rasterize() imageView.contentMode = .scaleAspectFit imageView.backgroundColor = .white self.view = imageView diff --git a/Samples.bundle/bike.svg b/Samples.bundle/bike.svg new file mode 100644 index 0000000..558d92e --- /dev/null +++ b/Samples.bundle/bike.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/SwiftDraw/DOM.swift b/SwiftDraw/DOM.swift index 2f407b6..a62b866 100644 --- a/SwiftDraw/DOM.swift +++ b/SwiftDraw/DOM.swift @@ -75,6 +75,7 @@ extension DOM { enum DisplayMode: String { case none case inline + case block } enum LineCap: String { diff --git a/SwiftDraw/LayerTree.Builder.swift b/SwiftDraw/LayerTree.Builder.swift index 0c8b067..8cda875 100644 --- a/SwiftDraw/LayerTree.Builder.swift +++ b/SwiftDraw/LayerTree.Builder.swift @@ -79,7 +79,7 @@ extension LayerTree { let attributes = element.attributes let l = Layer() l.class = element.class - guard state.display == .inline else { return l } + guard state.display != .none else { return l } l.transform = Builder.createTransforms(from: attributes.transform ?? []) l.clip = createClipShapes(for: element)