Skip to content

Commit

Permalink
Remove deprecated Gradient::with_alpha_factor (#82)
Browse files Browse the repository at this point in the history
Use `Gradient::multiply_alpha` instead.
  • Loading branch information
waywardmonkeys authored Dec 17, 2024
1 parent 5eb4d1e commit 05ec40d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ This release has an [MSRV] of 1.82.
- `Image` now stores the alpha as an `f32` ([#65][] by [@waywardmonkeys][])
- Use `color` crate. See below for details ([#63][] by [@waywardmonkeys][])

### 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.
Expand Down Expand Up @@ -88,6 +92,7 @@ This release has an [MSRV] of 1.70.
[#71]: https://github.com/linebender/peniko/pull/71
[#72]: https://github.com/linebender/peniko/pull/72
[#77]: https://github.com/linebender/peniko/pull/77
[#82]: https://github.com/linebender/peniko/pull/82

[@dfrg]: https://github.com/dfrg
[@DJMcNab]: https://github.com/DJMcNab
Expand Down
11 changes: 0 additions & 11 deletions src/gradient.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,6 @@ impl ColorStop {
color: self.color.multiply_alpha(alpha),
}
}

/// Returns the color stop with the alpha component multiplied by the specified
/// factor.
#[must_use]
#[deprecated(
since = "0.2.0",
note = "This method has been renamed to `multiply_alpha`."
)]
pub fn with_alpha_factor(self, alpha: f32) -> Self {
self.multiply_alpha(alpha)
}
}

impl<CS: ColorSpace> From<(f32, AlphaColor<CS>)> for ColorStop {
Expand Down

0 comments on commit 05ec40d

Please sign in to comment.