Skip to content

v0.3.0

Latest
Compare
Choose a tag to compare
@DJMcNab DJMcNab released this 18 Dec 16:41
bf5f998

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