1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 22:00:03 -04:00

Specify deifferent minification and magnification filters (#2224)

* Specify deifferent minification and magnification filters

* Fixes

* Update changelogs

* Doctest fixes

* Add deprecation notice for RetainedImage::with_texture_filter
This commit is contained in:
Emil Ernerfeldt
2022-11-02 17:54:06 +01:00
committed by GitHub
parent 8e79a5a8ae
commit 34e6e12f00
19 changed files with 147 additions and 97 deletions

View File

@@ -1,6 +1,6 @@
use std::collections::HashMap;
use egui::{color::*, widgets::color_picker::show_color, TextureFilter, *};
use egui::{color::*, widgets::color_picker::show_color, TextureOptions, *};
const GRADIENT_SIZE: Vec2 = vec2(256.0, 18.0);
@@ -372,7 +372,7 @@ impl TextureManager {
size: [width, height],
pixels,
},
TextureFilter::Linear,
TextureOptions::LINEAR,
)
})
}

View File

@@ -596,11 +596,8 @@ impl ItemsDemo {
};
let texture: &egui::TextureHandle = self.texture.get_or_insert_with(|| {
ui.ctx().load_texture(
"plot_demo",
egui::ColorImage::example(),
egui::TextureFilter::Linear,
)
ui.ctx()
.load_texture("plot_demo", egui::ColorImage::example(), Default::default())
});
let image = PlotImage::new(
texture,

View File

@@ -115,11 +115,8 @@ impl WidgetGallery {
} = self;
let texture: &egui::TextureHandle = texture.get_or_insert_with(|| {
ui.ctx().load_texture(
"example",
egui::ColorImage::example(),
egui::TextureFilter::Linear,
)
ui.ctx()
.load_texture("example", egui::ColorImage::example(), Default::default())
});
ui.add(doc_link_label("Label", "label,heading"));