Skip to content

Commit eea2cb6

Browse files
committed
Add Compose::PlusDarker
Signed-off-by: sagudev <[email protected]>
1 parent 256354e commit eea2cb6

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ You can find its changes [documented below](#040-2025-04-30).
1515

1616
This release has an [MSRV] of 1.82.
1717

18+
### Added
19+
20+
- `PlusDarker` variant to `Compose`
21+
1822
## [0.4.0][] (2025-04-30)
1923

2024
This release has an [MSRV] of 1.82.

src/blend.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ pub enum Compose {
9191
/// Allows two elements to cross fade by changing their opacities from 0 to 1 on one
9292
/// element and 1 to 0 on the other element.
9393
PlusLighter = 13,
94+
/// Allows two elements to cross fade by changing their opacities from 1 to 0 on one
95+
/// element and 0 to 1 on the other element.
96+
PlusDarker = 14,
9497
// NOTICE: If a new value is added, be sure to modify `MAX_VALUE` in the bytemuck impl.
9598
}
9699

src/impl_bytemuck.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ unsafe impl bytemuck::checked::CheckedBitPattern for Compose {
2727
unsafe impl bytemuck::Contiguous for Compose {
2828
type Int = u8;
2929
const MIN_VALUE: u8 = Self::Clear as u8;
30-
const MAX_VALUE: u8 = Self::PlusLighter as u8;
30+
const MAX_VALUE: u8 = Self::PlusDarker as u8;
3131
}
3232

3333
// Safety: The enum is `repr(u8)` and has only fieldless variants.
@@ -188,7 +188,7 @@ mod tests {
188188

189189
#[test]
190190
fn contiguous() {
191-
let compose1 = Compose::PlusLighter;
191+
let compose1 = Compose::PlusDarker;
192192
let compose2 = Compose::from_integer(compose1.into_integer());
193193
assert_eq!(Some(compose1), compose2);
194194

0 commit comments

Comments
 (0)