Skip to content

fix boundingBox / boundingBoxOfPath naming to match CoreGraphics convention, fixing issue 106#122

Draft
hfutrell wants to merge 2 commits into
0.16.4-releasefrom
worktree-boundingBoxVSboundingBoxOfPath
Draft

fix boundingBox / boundingBoxOfPath naming to match CoreGraphics convention, fixing issue 106#122
hfutrell wants to merge 2 commits into
0.16.4-releasefrom
worktree-boundingBoxVSboundingBoxOfPath

Conversation

@hfutrell
Copy link
Copy Markdown
Owner

Closes #106

Previously BezierKit's boundingBox was tight (exact curve geometry) and boundingBoxOfPath was loose (control-point hull) — the opposite of CoreGraphics. Swap the implementations so the API matches CGPath convention:

  • boundingBox: loose bounding box including control points
  • boundingBoxOfPath: tight (exact) bounding box of the path geometry

Update all internal call sites to keep using the tight box for spatial queries (intersection pruning, winding count, projection). Add / update tests so each property has a case that clearly demonstrates the distinction.

…ention

Previously BezierKit's boundingBox was tight (exact curve geometry) and
boundingBoxOfPath was loose (control-point hull) — the opposite of CoreGraphics.
Swap the implementations so the API matches CGPath convention:
  - boundingBox: loose bounding box including control points
  - boundingBoxOfPath: tight (exact) bounding box of the path geometry

Update all internal call sites to keep using the tight box for spatial
queries (intersection pruning, winding count, projection). Add / update
tests so each property has a case that clearly demonstrates the distinction.

Closes #106

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@hfutrell hfutrell changed the base branch from master to 0.16.4-release April 25, 2026 00:11
- PathComponentTests: swap test names and update call sites, keeping
  original test content (no new added cases)
- PathTests: same rename/update approach; add CGPath-backed assertions
  to directly verify both properties match CoreGraphics convention
- Doc comments: match CoreGraphics header wording verbatim for both
  boundingBox and boundingBoxOfPath on Path and PathComponent

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@hfutrell hfutrell changed the title fix boundingBox / boundingBoxOfPath naming to match CoreGraphics convention fix boundingBox / boundingBoxOfPath naming to match CoreGraphics convention, fixing issue 106 Apr 25, 2026
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.

boundingBox vs boundingBoxOfPath follows opposite convention as CoreGraphics

1 participant