Skip to content

Commit

Permalink
Add missing CompositionStyle::Clear
Browse files Browse the repository at this point in the history
  • Loading branch information
pylbrecht committed Jan 27, 2020
1 parent f75b01f commit ae110f2
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 13 deletions.
1 change: 1 addition & 0 deletions components/canvas/raqote_backend.rs
Expand Up @@ -1002,6 +1002,7 @@ impl ToRaqoteStyle for CompositionStyle {
CompositionStyle::Copy => raqote::BlendMode::Src,
CompositionStyle::Lighter => raqote::BlendMode::Add,
CompositionStyle::Xor => raqote::BlendMode::Xor,
CompositionStyle::Clear => raqote::BlendMode::Clear,
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions components/canvas_traits/canvas.rs
Expand Up @@ -254,6 +254,7 @@ pub enum CompositionStyle {
Copy,
Lighter,
Xor,
Clear,
}

impl FromStr for CompositionStyle {
Expand All @@ -272,6 +273,7 @@ impl FromStr for CompositionStyle {
"copy" => Ok(CompositionStyle::Copy),
"lighter" => Ok(CompositionStyle::Lighter),
"xor" => Ok(CompositionStyle::Xor),
"clear" => Ok(CompositionStyle::Clear),
_ => Err(()),
}
}
Expand All @@ -291,6 +293,7 @@ impl CompositionStyle {
CompositionStyle::Copy => "copy",
CompositionStyle::Lighter => "lighter",
CompositionStyle::Xor => "xor",
CompositionStyle::Clear => "clear",
}
}
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit ae110f2

Please sign in to comment.