mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-25 02:07:09 -06:00
PathData::bounds measured each segment by its start, end and extrema, as kurbo's bounding_box does. For a curve with a handle at about 1e308 in size, or an infinite one, kurbo's extrema computation overflows and drops the extreme. The box then held only the anchors. The canvas check after an edit reads that box for the selected objects, so path.create kept a curve with handles at 1e308. The new segment_bounds measures a segment by its control points when one of them has an x or y that is infinite or larger in size than f64::MAX / 16, and by its extrema otherwise, bit for bit as before. curve_bounds joins those boxes as kurbo does, and PathData::bounds uses it, so such a curve's box holds the whole curve and the canvas check refuses an edit that leaves one selected. Docs: docs/mcp.md, docs/target-app-parity.md.