New
v0.12.0
This release has an MSRV of 1.82. It was increased to support floating point math in const functions.
Added
- Newly public
StrokeCtxallows for reusing allocations when stroking multiple paths. (#475 by @LaurenzV) - New
Axistype. (#476 by @PoignardAzur) - Add
Ellipse::major_radiusandEllipse::minor_radiusmethods. (#497 by @tomcur)
Changed
- The implementation of stroking is much faster. (#427 by @raphlinus)
- More
Vec2methods can now be called inconstcontexts. (#479 by @tomcur) aspect_ratioonRectandSizehas been deprecated and replaced withaspect_ratio_width. This is because the implementation ofaspect_ratioused the ratio of height to width, whereas aspect rations are otherwise always ratios of width to height. (#486 by @ErisianArchitect and @DJMcNab)- Deprecated
contained_rect_with_aspect_ratio, replaced withinscribed_rect_with_aspect_ratio, which incidentally also uses the usual definition of aspect ratio (where the old name didn't). (#486 by @DJMcNab) - Breaking change: The deprecated
offset::CubicOffsethas been removed, and replaced byoffset::offset_cubic. (#489 by @jneem) - Several methods marked
#[inline]. (#472, #480, #496 by @tomcur)
Fixed
- Improved cubic to quadratic conversion handling for degenerate cubic curves with 3-4 consecutive equal control points. The approximation now correctly handles edge cases where cubics degenerate to lines or single points, matching fonttools' cu2qu behavior. (#485 by @anthrotype)
- Fix miter join in dashed strokes. (#490 by @grebmeg)
Removed
- Breaking change:
DashIteratorhas been removed. ReplaceDashIterator::newwithdash. (#488 by @DJMcNab) - Breaking change: The previously deprecated
BezPath::flatten,Ellipse::[with_]x_rotation,{Rect, Size}::is_empty,Shape::[in]to_bez_path, andTranslateScale::as_tuplehave been removed. (#487 by @DJMcNab)
New Contributors
- @PoignardAzur made their first contribution in https://github.com/linebender/kurbo/pull/476
- @grebmeg made their first contribution in https://github.com/linebender/kurbo/pull/490
Full Changelog: https://github.com/linebender/kurbo/compare/v0.11.3...v0.12.0