[librsvg: 1/2] (#500) Added additional SVG blend-modes for feBlend
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 1/2] (#500) Added additional SVG blend-modes for feBlend
- Date: Fri, 23 Aug 2019 06:01:42 +0000 (UTC)
commit c9827b712ba29610190ec16eced0b75e6c8d80f3
Author: Andargor <andargor yahoo com>
Date: Mon Aug 19 14:28:59 2019 +0000
(#500) Added additional SVG blend-modes for feBlend
rsvg_internals/src/filters/blend.rs | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
---
diff --git a/rsvg_internals/src/filters/blend.rs b/rsvg_internals/src/filters/blend.rs
old mode 100644
new mode 100755
index 6075e78e..65011100
--- a/rsvg_internals/src/filters/blend.rs
+++ b/rsvg_internals/src/filters/blend.rs
@@ -20,6 +20,17 @@ enum Mode {
Screen,
Darken,
Lighten,
+ Overlay,
+ ColorDodge,
+ ColorBurn,
+ HardLight,
+ SoftLight,
+ Difference,
+ Exclusion,
+ HslHue,
+ HslSaturation,
+ HslColor,
+ HslLuminosity,
}
/// The `feBlend` filter primitive.
@@ -133,6 +144,17 @@ impl Mode {
"screen" => Ok(Mode::Screen),
"darken" => Ok(Mode::Darken),
"lighten" => Ok(Mode::Lighten),
+ "overlay" => Ok(Mode::Overlay),
+ "color-dodge" => Ok(Mode::ColorDodge),
+ "color-burn" => Ok(Mode::ColorBurn),
+ "hard-light" => Ok(Mode::HardLight),
+ "soft-light" => Ok(Mode::SoftLight),
+ "difference" => Ok(Mode::Difference),
+ "exclusion" => Ok(Mode::Exclusion),
+ "hue" => Ok(Mode::HslHue),
+ "saturation" => Ok(Mode::HslSaturation),
+ "color" => Ok(Mode::HslColor),
+ "luminosity" => Ok(Mode::HslLuminosity),
_ => Err(NodeError::parse_error(
attr,
ParseError::new("invalid value"),
@@ -150,6 +172,17 @@ impl From<Mode> for cairo::Operator {
Mode::Screen => cairo::Operator::Screen,
Mode::Darken => cairo::Operator::Darken,
Mode::Lighten => cairo::Operator::Lighten,
+ Mode::Overlay => cairo::Operator::Overlay,
+ Mode::ColorDodge => cairo::Operator::ColorDodge,
+ Mode::ColorBurn => cairo::Operator::ColorBurn,
+ Mode::HardLight => cairo::Operator::HardLight,
+ Mode::SoftLight => cairo::Operator::SoftLight,
+ Mode::Difference => cairo::Operator::Difference,
+ Mode::Exclusion => cairo::Operator::Exclusion,
+ Mode::HslHue => cairo::Operator::HslHue,
+ Mode::HslSaturation => cairo::Operator::HslSaturation,
+ Mode::HslColor => cairo::Operator::HslColor,
+ Mode::HslLuminosity => cairo::Operator::HslLuminosity,
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]