Skip to content

Commit

Permalink
Merge pull request #2324 from Gigas002/viewer_filter_method
Browse files Browse the repository at this point in the history
Implement setter for filter_method property of viewer
  • Loading branch information
hecrj authored Mar 11, 2024
2 parents af8ab81 + 0c93c3c commit 2de3253
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions widget/src/image/viewer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2de3253

Please sign in to comment.