Add the Edge operation and associated enums.
This commit is contained in:
parent
719c9c85e6
commit
8958e49168
|
@ -2,6 +2,27 @@
|
|||
|
||||
use crate::gegl_enum;
|
||||
|
||||
gegl_enum!(
|
||||
/// The abyss policy for various GEGL operations.
|
||||
AbyssPolicy,
|
||||
Black => "black",
|
||||
Clamp => "clamp",
|
||||
Loop => "loop",
|
||||
None => "none",
|
||||
White => "white",
|
||||
);
|
||||
|
||||
gegl_enum!(
|
||||
/// The detection algorithm for [`Edge`][super::Edge].
|
||||
EdgeAlgorithm,
|
||||
Differential => "differential",
|
||||
Gradient => "gradient",
|
||||
Laplace => "laplace",
|
||||
PrewittCompass => "prewitt",
|
||||
Roberts => "roberts",
|
||||
Sobel => "sobel",
|
||||
);
|
||||
|
||||
gegl_enum!(
|
||||
/// The shape for [`FocusBlur`][super::FocusBlur].
|
||||
FocusBlurShape,
|
||||
|
|
|
@ -111,6 +111,20 @@ gegl_operation!(
|
|||
),
|
||||
);
|
||||
|
||||
gegl_operation!(
|
||||
struct_name: Edge,
|
||||
gegl_name: "edge",
|
||||
append_crop: false,
|
||||
values: (
|
||||
/// The edge detection algorithm to use.
|
||||
algorithm: EdgeAlgorithm, EdgeAlgorithm::Sobel,
|
||||
/// The amount of edge detection to perform.
|
||||
amount: f64, 2.0,
|
||||
/// The edge detection border behavior.
|
||||
border_behavior: AbyssPolicy, AbyssPolicy::Clamp,
|
||||
),
|
||||
);
|
||||
|
||||
gegl_operation!(
|
||||
struct_name: EdgeNeon,
|
||||
gegl_name: "edge-neon",
|
||||
|
|
Loading…
Reference in New Issue