diff options
author | 2024-08-04 03:28:43 +0200 | |
---|---|---|
committer | 2024-08-04 03:28:43 +0200 | |
commit | 0ceee1cf3ae49f5bd0e3f2b346a4b34076e4523a (patch) | |
tree | c44e036220ea40734a00bb8e05e4afa6a9504bea /graphics/src/image.rs | |
parent | 87a613edd186461f1a8d224394043527a372571c (diff) | |
download | iced-0ceee1cf3ae49f5bd0e3f2b346a4b34076e4523a.tar.gz iced-0ceee1cf3ae49f5bd0e3f2b346a4b34076e4523a.tar.bz2 iced-0ceee1cf3ae49f5bd0e3f2b346a4b34076e4523a.zip |
Implement image support for `canvas` widget
Diffstat (limited to '')
-rw-r--r-- | graphics/src/image.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/graphics/src/image.rs b/graphics/src/image.rs index 318592be..0e8f2fe3 100644 --- a/graphics/src/image.rs +++ b/graphics/src/image.rs @@ -23,6 +23,12 @@ pub enum Image { /// The opacity of the image. opacity: f32, + + /// If set to `true`, the image will be snapped to the pixel grid. + /// + /// This can avoid graphical glitches, specially when using a + /// [`image::FilterMethod::Nearest`]. + snap: bool, }, /// A vector image. Vector { |