Skip to content

Conversation

swhitty
Copy link
Owner

@swhitty swhitty commented Sep 6, 2025

Adds .resizable() to SVGView enabling it to function just like SwiftUI.Image (#102)

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="100" height="100">
    <circle cx="50" cy="50" r="50" fill="orange" />
</svg>
#Preview {
    SVGView(svg: .circle)

    SVGView(svg: .circle)
       .resizable(resizingMode: .stretch)

    SVGView(svg: .circle)
       .resizable(resizingMode: .tile)
}
preview

Copy link

codecov bot commented Sep 6, 2025

Codecov Report

❌ Patch coverage is 4.54545% with 63 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.65%. Comparing base (af422b9) to head (47d6f90).

Files with missing lines Patch % Lines
SwiftDraw/Sources/SVGView.swift 0.00% 40 Missing ⚠️
SwiftDraw/Sources/SVG+CoreGraphics.swift 11.53% 23 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #103      +/-   ##
==========================================
- Coverage   90.00%   89.65%   -0.36%     
==========================================
  Files         147      147              
  Lines       12617    12668      +51     
==========================================
+ Hits        11356    11357       +1     
- Misses       1261     1311      +50     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@swhitty swhitty merged commit 82b76f8 into main Sep 6, 2025
14 of 16 checks passed
@swhitty swhitty deleted the resizable branch September 6, 2025 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants