mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 06:10:06 -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:
@@ -6,7 +6,7 @@ use crate::{
|
||||
input_state::*, layers::GraphicLayers, memory::Options, os::OperatingSystem,
|
||||
output::FullOutput, TextureHandle, *,
|
||||
};
|
||||
use epaint::{mutex::*, stats::*, text::Fonts, textures::TextureFilter, TessellationOptions, *};
|
||||
use epaint::{mutex::*, stats::*, text::Fonts, TessellationOptions, *};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
@@ -800,7 +800,7 @@ impl Context {
|
||||
/// ui.ctx().load_texture(
|
||||
/// "my-image",
|
||||
/// egui::ColorImage::example(),
|
||||
/// egui::TextureFilter::Linear
|
||||
/// Default::default()
|
||||
/// )
|
||||
/// });
|
||||
///
|
||||
@@ -815,7 +815,7 @@ impl Context {
|
||||
&self,
|
||||
name: impl Into<String>,
|
||||
image: impl Into<ImageData>,
|
||||
filter: TextureFilter,
|
||||
options: TextureOptions,
|
||||
) -> TextureHandle {
|
||||
let name = name.into();
|
||||
let image = image.into();
|
||||
@@ -829,7 +829,7 @@ impl Context {
|
||||
max_texture_side
|
||||
);
|
||||
let tex_mngr = self.tex_manager();
|
||||
let tex_id = tex_mngr.write().alloc(name, image, filter);
|
||||
let tex_id = tex_mngr.write().alloc(name, image, options);
|
||||
TextureHandle::new(tex_mngr, tex_id)
|
||||
}
|
||||
|
||||
|
||||
@@ -332,7 +332,7 @@ pub use epaint::hex_color;
|
||||
pub use epaint::{
|
||||
color, mutex,
|
||||
text::{FontData, FontDefinitions, FontFamily, FontId, FontTweak},
|
||||
textures::{TextureFilter, TexturesDelta},
|
||||
textures::{TextureFilter, TextureOptions, TexturesDelta},
|
||||
ClippedPrimitive, Color32, ColorImage, FontImage, ImageData, Mesh, PaintCallback,
|
||||
PaintCallbackInfo, Rgba, Rounding, Shape, Stroke, TextureHandle, TextureId,
|
||||
};
|
||||
|
||||
@@ -1553,7 +1553,7 @@ impl Ui {
|
||||
/// ui.ctx().load_texture(
|
||||
/// "my-image",
|
||||
/// egui::ColorImage::example(),
|
||||
/// egui::TextureFilter::Linear
|
||||
/// Default::default()
|
||||
/// )
|
||||
/// });
|
||||
///
|
||||
|
||||
@@ -18,7 +18,7 @@ use emath::Rot2;
|
||||
/// ui.ctx().load_texture(
|
||||
/// "my-image",
|
||||
/// egui::ColorImage::example(),
|
||||
/// egui::TextureFilter::Linear
|
||||
/// Default::default()
|
||||
/// )
|
||||
/// });
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user