mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 05:10:03 -04:00
Improve the look of thin lines, making them look weaker (#2437)
* Revert "fix all clippy lints and remove them from allow list in cranky (#2419)"
This reverts commit 930ef2db38.
* Explain the cranky lints better
* Add Color32::gamma_multiply
* Remove unused pub use
* Remove non-existing crate category
* Improve color test with more lines
* Improve the look of thin lines, making them look weaker
Before they looked were too strong for the thickness.
* Use asserts for shader compilations
* Update changelogs
This commit is contained in:
@@ -957,10 +957,9 @@ fn stroke_path(
|
||||
}
|
||||
|
||||
fn mul_color(color: Color32, factor: f32) -> Color32 {
|
||||
crate::epaint_assert!(0.0 <= factor && factor <= 1.0);
|
||||
// As an unfortunate side-effect of using premultiplied alpha
|
||||
// we need a somewhat expensive conversion to linear space and back.
|
||||
color.linear_multiply(factor)
|
||||
// The fast gamma-space multiply also happens to be perceptually better.
|
||||
// Win-win!
|
||||
color.gamma_multiply(factor)
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user