diff options
Diffstat (limited to 'widget')
-rw-r--r-- | widget/src/image/viewer.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/widget/src/image/viewer.rs b/widget/src/image/viewer.rs index f45c401a..2e3fd713 100644 --- a/widget/src/image/viewer.rs +++ b/widget/src/image/viewer.rs @@ -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; |