Add DitherMethod type
This commit is contained in:
22
src/types/dither_method.rs
Normal file
22
src/types/dither_method.rs
Normal 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;
|
||||
}
|
||||
}
|
||||
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user