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

Add the Ability to Specify Egui Texture Filters (#1636)

Only works for egui_glow
This commit is contained in:
Zicklag
2022-05-22 09:56:51 -05:00
committed by GitHub
parent f3e305a646
commit 1a9a0d7ec8
12 changed files with 122 additions and 51 deletions

View File

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

View File

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

View File

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