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

Remove things that have been deprecated for over a year (#7099)

Removes all things that were marked `#[deprecated]` more than 12 months
ago
This commit is contained in:
Emil Ernerfeldt
2025-05-28 09:47:15 +02:00
committed by GitHub
parent 2cf6a3a9a6
commit 92fea8a18f
15 changed files with 21 additions and 399 deletions

View File

@@ -2,7 +2,7 @@
//!
//! Made for [`egui`](https://github.com/emilk/egui/).
//!
//! Create some [`Shape`]:s and pass them to [`tessellate_shapes`] to generate [`Mesh`]:es
//! Create some [`Shape`]:s and pass them to [`Tessellator::tessellate_shapes`] to generate [`Mesh`]:es
//! that you can then paint using some graphics API of your choice (e.g. OpenGL).
//!
//! ## Coordinate system
@@ -72,9 +72,6 @@ pub use self::{
#[deprecated = "Renamed to CornerRadius"]
pub type Rounding = CornerRadius;
#[expect(deprecated)]
pub use tessellator::tessellate_shapes;
pub use ecolor::{Color32, Hsva, HsvaGamma, Rgba};
pub use emath::{pos2, vec2, Pos2, Rect, Vec2};

View File

@@ -96,18 +96,6 @@ impl Margin {
pub const fn is_same(self) -> bool {
self.left == self.right && self.left == self.top && self.left == self.bottom
}
#[deprecated = "Use `rect + margin` instead"]
#[inline]
pub fn expand_rect(self, rect: Rect) -> Rect {
Rect::from_min_max(rect.min - self.left_top(), rect.max + self.right_bottom())
}
#[deprecated = "Use `rect - margin` instead"]
#[inline]
pub fn shrink_rect(self, rect: Rect) -> Rect {
Rect::from_min_max(rect.min + self.left_top(), rect.max - self.right_bottom())
}
}
impl From<i8> for Margin {

View File

@@ -1300,8 +1300,6 @@ fn mul_color(color: Color32, factor: f32) -> Color32 {
/// Converts [`Shape`]s into triangles ([`Mesh`]).
///
/// For performance reasons it is smart to reuse the same [`Tessellator`].
///
/// See also [`tessellate_shapes`], a convenient wrapper around [`Tessellator`].
#[derive(Clone)]
pub struct Tessellator {
pixels_per_point: f32,
@@ -2194,18 +2192,6 @@ impl Tessellator {
}
}
#[deprecated = "Use `Tessellator::new(…).tessellate_shapes(…)` instead"]
pub fn tessellate_shapes(
pixels_per_point: f32,
options: TessellationOptions,
font_tex_size: [usize; 2],
prepared_discs: Vec<PreparedDisc>,
shapes: Vec<ClippedShape>,
) -> Vec<ClippedPrimitive> {
Tessellator::new(pixels_per_point, options, font_tex_size, prepared_discs)
.tessellate_shapes(shapes)
}
impl Tessellator {
/// Turns [`Shape`]:s into sets of triangles.
///

View File

@@ -1,6 +1,3 @@
#[deprecated = "Use emath::OrderedFloat instead"]
pub use emath::OrderedFloat;
/// Hash the given value with a predictable hasher.
#[inline]
pub fn hash(value: impl std::hash::Hash) -> u64 {