Add DitherMethod type

This commit is contained in:
5ohue
2024-05-09 21:42:51 +03:00
parent e419039647
commit cfbdbd4c0e
5 changed files with 31 additions and 6 deletions

View File

@ -0,0 +1,22 @@
use crate::bindings;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(u32)]
pub enum DitherMethod {
Undefined = bindings::DitherMethod_UndefinedDitherMethod,
No = bindings::DitherMethod_NoDitherMethod,
Riemersma = bindings::DitherMethod_RiemersmaDitherMethod,
FloydSteinberg = bindings::DitherMethod_FloydSteinbergDitherMethod,
}
impl Default for DitherMethod {
fn default() -> Self {
return DitherMethod::No;
}
}
impl From<DitherMethod> for bindings::DitherMethod {
fn from(value: DitherMethod) -> Self {
return value as bindings::DitherMethod;
}
}

View File

@ -1,9 +1,11 @@
mod colorspace_type;
mod composite_operator;
mod dither_method;
mod metric_type;
mod resource_type;
pub use self::colorspace_type::ColorspaceType;
pub use self::composite_operator::CompositeOperator;
pub use self::dither_method::DitherMethod;
pub use self::metric_type::MetricType;
pub use self::resource_type::ResourceType;