Merge pull request #2324 from Gigas002/viewer_filter_method

Implement setter for filter_method property of viewer
This commit is contained in:
Héctor Ramón 2024-03-12 00:57:29 +01:00 committed by GitHub
commit 2de3253012
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -40,6 +40,12 @@ impl<Handle> Viewer<Handle> {
}
}
/// Sets the [`image::FilterMethod`] of the [`Viewer`].
pub fn filter_method(mut self, filter_method: image::FilterMethod) -> Self {
self.filter_method = filter_method;
self
}
/// Sets the padding of the [`Viewer`].
pub fn padding(mut self, padding: impl Into<Pixels>) -> Self {
self.padding = padding.into().0;