egui/crates/epaint
Emil Ernerfeldt 249f8bcb93
Use `u8` in `Rounding`, and introduce `Roundingf` (#5563)
* Part of https://github.com/emilk/egui/issues/4019

As part of the work on adding a custom `Border` to everything, I want to
make sure that the size of `RectShape`, `Frame` and the future `Border`
is kept small (for performance reasons).

This PR changes the storage of the corner radius of rectangles from four
`f32` (one for each corner) into four `u8`. This mean the corner radius
can only be an integer in the range 0-255 (in ui points). This should be
enough for most people.

If you want to manipulate rounding using `f32`, there is a new
`Roundingf` to fill that niche.
2025-01-02 14:29:50 +01:00
..
benches Use precomputed lookup table in Color32::from_rgba_unmultiplied (#5088) 2024-09-10 09:50:56 +02:00
src Use `u8` in `Rounding`, and introduce `Roundingf` (#5563) 2025-01-02 14:29:50 +01:00
CHANGELOG.md Release 0.30 - egui_kittest and modals (#5487) 2024-12-16 17:45:35 +01:00
Cargo.toml Fix cargo test --all-features breaking rendering due to unity vertexes (#5542) 2024-12-30 12:39:17 +01:00
README.md Add badges to all crates' README.md 2023-02-12 18:08:13 +01:00

README.md

epaint - egui paint library

Latest version Documentation unsafe forbidden MIT Apache

A bare-bones 2D graphics library for turning simple 2D shapes and text into textured triangles.

Made for egui.