Skip to content

feat(path): add CGPath bounds, primitive initializers, currentPoint, and applyWithBlock - #14

Merged
Kyle-Ye merged 2 commits into
mainfrom
feature/path_shape
Nov 21, 2026
Merged

Kyle-Ye merged 2 commits into
mainfrom
feature/path_shape

Conversation

@Kyle-Ye

@Kyle-Ye Kyle-Ye commented Nov 21, 2026

Copy link
Copy Markdown
Member

Add CGPath APIs and layout alignments needed by path and shape clients when building without Darwin CoreGraphics:

  • Add CGPath.boundingBoxOfPath, computing tight extrema for quadratic and cubic Bézier segments, tracking subpath closure, coalescing moves, and returning CGRect.null for empty or degenerate non-drawing paths.
  • Add CGPath(rect:transform:) and CGPath(ellipseIn:transform:), and support transform: CGAffineTransform = .identity in addRect(_:transform:) and addEllipse(in:transform:).
  • Add CGPath.currentPoint tracking subpaths, curve endpoints, and closeSubpath().
  • Add CGPath.applyWithBlock(_:), align CGPathElement.points to UnsafeMutablePointer<CGPoint>, and give CGPathElementType Int32 raw values (0...4) with Sendable conformance.
  • Add shared CGPathTests covering CoreGraphics and OpenCoreGraphics backends.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T15:39:58.515307Z cb7cfd7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Kyle-Ye
Kyle-Ye merged commit 9f247e2 into main Nov 21, 2026
3 checks passed
@Kyle-Ye
Kyle-Ye deleted the feature/path_shape branch November 21, 2026 15:39
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.95291% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.04%. Comparing base (de4866d) to head (cb7cfd7).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
Sources/OpenCoreGraphics/CGPath.swift 94.32% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #14      +/-   ##
==========================================
+ Coverage   84.26%   92.04%   +7.77%     
==========================================
  Files          20       21       +1     
  Lines        1087     1395     +308     
==========================================
+ Hits          916     1284     +368     
+ Misses        171      111      -60     

☔ View full report in Codecov by Harness.
📢 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.

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