Try to align quad and image primitives in iced_wgpu
This commit is contained in:
parent
3aedbd5844
commit
15aa94c0f1
8 changed files with 28 additions and 44 deletions
|
|
@ -23,12 +23,6 @@ pub struct Image<H = Handle> {
|
|||
///
|
||||
/// 0 means transparent. 1 means opaque.
|
||||
pub opacity: f32,
|
||||
|
||||
/// If set to `true`, the image will be snapped to the pixel grid.
|
||||
///
|
||||
/// This can avoid graphical glitches, specially when using
|
||||
/// [`FilterMethod::Nearest`].
|
||||
pub snap: bool,
|
||||
}
|
||||
|
||||
impl Image<Handle> {
|
||||
|
|
@ -39,7 +33,6 @@ impl Image<Handle> {
|
|||
filter_method: FilterMethod::default(),
|
||||
rotation: Radians(0.0),
|
||||
opacity: 1.0,
|
||||
snap: false,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -60,12 +53,6 @@ impl Image<Handle> {
|
|||
self.opacity = opacity.into();
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets whether the [`Image`] should be snapped to the pixel grid.
|
||||
pub fn snap(mut self, snap: bool) -> Self {
|
||||
self.snap = snap;
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl From<&Handle> for Image {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue