Repository navigation
Sample BSpline2D.AddToGraphicsPath on 0..1 - #485
Merged
Merged
Conversation
AddToGraphicsPath passed knot parameters (startParam..endParam) to PointAt, which expects 0..1. A spline whose knots do not run from 0 to 1 was therefore drawn through wrong points; splines with knots from 0 to 1 are unaffected. Taken from the closed #465. The test needs GDI+ and only runs on Windows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YXvDW91oXpy7RquGHNxgR5
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.
Bug fix taken from the closed #465 (#412).
What
BSpline2D.AddToGraphicsPathpassed knot parameters (startParamtoendParam) toPointAt, which expects 0..1. As a result, a spline whose knots do not run from 0 to 1 was drawn through wrong points in GDI+ paths. That affects printing,PaintToGDIandCompoundShape.CreateGraphicsPath. The method now samples 0..1.Splines with knots from 0 to 1 produce the same path as before.
Test
tests/BSpline2DGraphicsPathTests.csbuilds a spline with knots 0..5 and checks two things: the path starts and ends at the spline's endpoints, and every path point lies on the curve.The test needs GDI+, so it is guarded by
#if WINDOWSand does not run in the Linux CI. The same test ran green in the Windows job of the integration branch (#467), as part of #465'sGdiExtensionsTests. Here I could only check that it compiles fornet8.0-windows.CADability.Testson Linux: 627 passed, 18 skipped, 0 failed.🤖 Generated with Claude Code
https://claude.ai/code/session_01YXvDW91oXpy7RquGHNxgR5
Generated by Claude Code