Skip to content

Releases: linebender/peniko

v0.3.0

18 Dec 16:41
bf5f998
Compare
Choose a tag to compare

Crates.io | Docs

This release has an MSRV of 1.82.

Added

  • Gradient, Image, Brush now have with_alpha and Gradient also gets a multiply_alpha (#67 by @waywardmonkeys)
  • Gradient now tracks a hue direction and interpolation color space (#71 by @waywardmonkeys)
  • Compose, Extend, Fill, and Mix now optionally impl bytemuck traits (#72 by @waywardmonkeys)
  • Add x/y extend modes and quality hint to images, rename Format to ImageFormat (#77 by @dfrg)

Changed

Removed

  • Removed the deprecated Gradient::with_alpha_factor in favor of Gradient::multiply_alpha (#82 by @waywardmonkeys)

Color Changes

The old code behind peniko::Color has been removed and color functionality is now provided by the [color] crate.

This leads to a number of breaking changes:

  • peniko::Color is now a type alias for AlphaColor<Srgb> from the color crate.
  • AlphaColor does not, at this time, impl Default, PartialOrd, or Hash.
  • ColorStop no longer impls Default or PartialOrd.
  • Brush, BrushRef, and ColorStop can be constructed from a variety of color types, although, for now, Brush and BrushRef convert this internally into an unclipped AlphaColor<Srgb>.
  • ColorStops is now a newtype wrapper, rather than a type alias for SmallVec.
    This allows it to be used with CacheKey from Color.
  • The color crate is re-exported as peniko::color, so access to functionality from there is easy.
  • The various pre-defined color constants like peniko::Color::YELLOW are no longer available.
    Instead, use the CSS palette provided within color: peniko::color::palette::css::YELLOW.
  • Similarly, parsing a color string is now provided by the color crate.

This is the first step towards providing better support for richer color functionality throughout the Linebender stack.

New Contributors

Full Changelog: v0.2.0...v0.3.0

v0.2.0

19 Sep 16:18
29d2486
Compare
Choose a tag to compare

Crates.io | Docs

This release has an MSRV of 1.70.

Added

Changed

  • Breaking: Mark Format as #[non_exhaustive] (#47 by @DJMcNab)
  • Rename with_alpha_factor to multiply_alpha (#52 by @DJMcNab)

Full Changelog: v0.1.1...v0.2.0

v0.1.1

27 May 15:59
22a89cb
Compare
Choose a tag to compare

Crates.io | Docs

Added

  • #26 - Add serde feature to enable serde support by @ratmice

New Contributors

Full Changelog: v0.1.0...v0.1.1

v0.1.0

14 Feb 17:55
e8e53e4
Compare
Choose a tag to compare
add features for kurbo's std/libm features (#23)

Co-authored-by: Daniel McNab <[email protected]>