This release has an MSRV of 1.82.
Added
Gradient
,Image
,Brush
now havewith_alpha
andGradient
also gets amultiply_alpha
(#67 by @waywardmonkeys)Gradient
now tracks a hue direction and interpolation color space (#71 by @waywardmonkeys)Compose
,Extend
,Fill
, andMix
now optionally implbytemuck
traits (#72 by @waywardmonkeys)- Add x/y extend modes and quality hint to images, rename
Format
toImageFormat
(#77 by @dfrg)
Changed
Image
now stores the alpha as anf32
(#65 by @waywardmonkeys)- Use
color
crate. See below for details (#63 by @waywardmonkeys) ColorStopsSource::collect_stops
now consumesself
(#87 by @waywardmonkeys)
Removed
- Removed the deprecated
Gradient::with_alpha_factor
in favor ofGradient::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 forAlphaColor<Srgb>
from thecolor
crate.AlphaColor
does not, at this time, implDefault
,PartialOrd
, orHash
.ColorStop
no longer implsDefault
orPartialOrd
.Brush
,BrushRef
, andColorStop
can be constructed from a variety of color types, although, for now,Brush
andBrushRef
convert this internally into an unclippedAlphaColor<Srgb>
.ColorStops
is now a newtype wrapper, rather than a type alias forSmallVec
.
This allows it to be used withCacheKey
from Color.- The
color
crate is re-exported aspeniko::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 withincolor
: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
- @PoignardAzur made their first contribution in #56
Full Changelog: v0.2.0...v0.3.0