egui/crates/emath/src
Emil Ernerfeldt d20f93e9bf
Make all lines and rectangles crisp (#5518)
* Merge this first: https://github.com/emilk/egui/pull/5517

This aligns all rectangles and (horizontal or vertical) line segments to
the physical pixel grid in the `epaint::Tessellator`, making these
shapes appear crisp everywhere.

* Closes https://github.com/emilk/egui/issues/5164
* Closes https://github.com/emilk/egui/issues/3667

This undoes a lot of the explicit, egui-side aligning added in:
* https://github.com/emilk/egui/pull/4943

The new approach has several benefits over the old one:

* It is done automatically by epaint, so it is applied to everything (no
longer opt-in)
* It is applied after any layer transforms (so it always works)
* It makes line segments crisper on high-DPI screens
* All filled rectangles now has sides that end on pixel boundaries
2024-12-26 21:02:27 +01:00
..
align.rs Remove wildcard imports (#5018) 2024-08-28 12:18:42 +02:00
easing.rs Easing functions (#4630) 2024-06-06 13:09:52 +02:00
gui_rounding.rs Make all lines and rectangles crisp (#5518) 2024-12-26 21:02:27 +01:00
history.rs Remove `extra_asserts` and `extra_debug_asserts` feature flags (#4478) 2024-05-10 19:39:08 +02:00
lib.rs Round widget coordinates to even multiple of 1/32 (#5517) 2024-12-26 20:54:24 +01:00
numeric.rs Update MSRV to Rust 1.79 (#5421) 2024-12-01 18:58:35 +01:00
ordered_float.rs Remove wildcard imports (#5018) 2024-08-28 12:18:42 +02:00
pos2.rs Remove wildcard imports (#5018) 2024-08-28 12:18:42 +02:00
range.rs Cross-widget text select (#3870) 2024-01-24 15:45:22 +01:00
rect.rs Provide better `debug_assert`s for ray intersections (#5504) 2024-12-19 13:39:14 +01:00
rect_transform.rs Use `Self` everywhere (#3787) 2024-01-08 17:41:21 +01:00
rot2.rs Fix docstring 2024-06-26 09:00:11 +02:00
smart_aim.rs Update MSRV to Rust 1.79 (#5421) 2024-12-01 18:58:35 +01:00
ts_transform.rs Add layer transforms, interaction in layer (#3906) 2024-02-17 11:02:56 +01:00
vec2.rs Add new `Rect::intersects_ray_from_center` method (#5415) 2024-12-02 09:20:59 +01:00
vec2b.rs Update ScrollArea drag velocity when drag stopped (#5175) 2024-10-02 18:12:36 +02:00