Skip to content

Releases: linebender/kurbo

Kurbo v0.13.0

27 Nov 13:04
8502a46

Choose a tag to compare

Crates.io | Docs

This release has an MSRV of 1.85.

Added

  • The newly added BezPath::into_elements method allows getting all path elements as a Vec without allocating, consuming the original path. This is the counterpart of BezPath::from_vec. (#504 by @cmyr)
  • Add a derive Hash to the Axis type. (#527 by @jrmoulton)

Changed

  • Speed up methods like Ellipse::radii by reworking the singular value decomposition expression. (#499 by @tomcur)
  • The Line::nearest method to calculate the projection of a point onto a line segment has been made more performant. (#505 by @tomcur)
  • The QuadBez::arclen calculation has been made more numerically stable (#503 by @jneem).
  • SvgParseError now implements core::error:Error. It previously implemented std::error::Error in std-enabled builds. (#517 by @Bombaninha)
  • The behavior of open versus closed shapes when using BezPath::extend (extending Bezier paths using an iterator over PathEl) has been clarified. #523 by @DJMcNab)
  • More methods are marked inline. (#506 by @LaurenzV, #509 by @tomcur)

The following functions are now callable from const contexts. (#510, #512, #521, #522, #524, #525, #526 by @tomcur)

  • Affine::{skew, then_translate, map_unit_square, as_coeffs, determinant, inverse, translation, with_translation}
  • Point::midpoint
  • Rect::{width, height, origin, size, area, is_zero_area, center, aspect_ratio_width, overlap, contains_rect, union, intersect, inscribed_rect_with_aspect_ratio, inflate, scale_from_origin, abs}
  • Size::{max_side, min_side, area, is_zero_area, min, max, clamp, aspect_ratio_width}
  • In addition, the is_finite and is_nan methods on the following types are now const: Affine, Circle, ConstPoint, CubicBez, Ellipse, Insets, Line, Point, QuadBez, Rect, RoundedRect, RoundedRectRadii, Size, Triangle, Vec2.

New Contributors

Full Changelog: v0.12.0...v0.13.0

polycool v0.4.0

23 Oct 22:59
0ffc830

Choose a tag to compare

Crates.io | Docs

This release has an MSRV of 1.85.
It is the first release since polycool was transferred to the Linebender organization.

Changed

  • Rename Poly::magnitude to Poly::max_abs_coefficient. (#502 by @jneem)

Fixed

  • Avoid potential underflow in DynPoly::deriv (#502 by @jneem)
  • Avoid NaN during Newton iteration (#502 by @jneem)

Note: A changelog was not kept before this release

Full Changelog: v0.12.0...polycool-v0.4.0

v0.12.0

04 Sep 18:12
8cc95a6

Choose a tag to compare

Crates.io | Docs

This release has an MSRV of 1.82. It was increased to support floating point math in const functions.

Added

  • Newly public StrokeCtx allows for reusing allocations when stroking multiple paths. (#475 by @LaurenzV)
  • New Axis type. (#476 by @PoignardAzur)
  • Add Ellipse::major_radius and Ellipse::minor_radius methods. (#497 by @tomcur)

Changed

  • The implementation of stroking is much faster. (#427 by @raphlinus)
  • More Vec2 methods can now be called in const contexts. (#479 by @tomcur)
  • aspect_ratio on Rect and Size has been deprecated and replaced with aspect_ratio_width.
    This is because the implementation of aspect_ratio used 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 with inscribed_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::CubicOffset has been removed, and replaced by
    offset::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: DashIterator has been removed. Replace DashIterator::new with dash. (#488 by @DJMcNab)
  • Breaking change: The previously deprecated BezPath::flatten, Ellipse::[with_]x_rotation, {Rect, Size}::is_empty, Shape::[in]to_bez_path,
    and TranslateScale::as_tuple have been removed. (#487 by @DJMcNab)

New Contributors

Full Changelog: v0.11.3...v0.12.0

v0.11.3

21 Jul 22:34
ce236de

Choose a tag to compare

Crates.io | Docs

This release has an MSRV of 1.65.

Added

  • Add current_position method to BezPath. (#462 by @sagudev)
  • Add From conversions between euclid and kurbo types behind the euclid feature. (#463 by @sagudev)
  • Add Green's theorem moments. (#452 by @simoncozens)
  • Make Vec2::splat public. (#469 by @xorgy)

Changed

  • Let more methods take Into<Point> instead of Point. (#466 by @sagudev)

    Note: this can impact type inference.

  • Inline the Mul<PathEl> implementation for Affine. (#461 by @LaurenzV)

  • Inline the next method of the ToQuads iterator. (#460 by @LaurenzV)

  • Avoid calling f64::hypot, as it calls a slow library function. (#448 by @beholdnec, #451 by @raphlinus)

Fixed

  • Documentation of RoundedRect no longer incorrectly specifies the corner radii are equal. (#447 by @tomcur)
  • Fixed negative dash offset by normalization. (#454 by @sagudev)
  • Use exact endpoints for PathSeg. (#465 by @jneem)

New Contributors

Full Changelog: v0.11.2...v0.11.3

v0.11.2

28 Apr 14:40
03942df

Choose a tag to compare

0.11.2 (2025-04-28)

This release has an MSRV of 1.65.

Added

Changed

  • Reduce number of operations in Triangle::circumscribed_circle. (#390 by @tomcur)
  • Numerically approximate ellipse perimeter. (#383, #407 by @tomcur)
  • Always inline trivial casts, splats, and swizzles. (#428 by @xorgy)

Fixed

New Contributors

Full Changelog: v0.11.1...v0.11.2

v0.11.1

13 Sep 00:04
d948d1e

Choose a tag to compare

0.11.1 (2024-09-12)

This release has an MSRV of 1.65.

Added

Changed

Fixed

New Contributors

Full Changelog: v0.11.0...v0.11.1