fix boundingBox / boundingBoxOfPath naming to match CoreGraphics convention, fixing issue 106#122
Draft
hfutrell wants to merge 2 commits into
Draft
fix boundingBox / boundingBoxOfPath naming to match CoreGraphics convention, fixing issue 106#122hfutrell wants to merge 2 commits into
hfutrell wants to merge 2 commits into
Conversation
…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>
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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.