Refactor texture image filtering

- Support only `Linear` or `Nearest`
- Simplify `Layer` groups
- Move `FilterMethod` to `Image` and `image::Viewer`
This commit is contained in:
Héctor Ramón Jiménez 2023-11-11 07:02:01 +01:00
parent 75c9afc608
commit a5125d6fea
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
12 changed files with 250 additions and 160 deletions

View file

@ -186,11 +186,16 @@ impl<'a> Layer<'a> {
layer.quads.add(quad, background);
}
Primitive::Image { handle, bounds } => {
Primitive::Image {
handle,
filter_method,
bounds,
} => {
let layer = &mut layers[current_layer];
layer.images.push(Image::Raster {
handle: handle.clone(),
filter_method: *filter_method,
bounds: *bounds + translation,
});
}