diff options
author | MacDue <macdue@dueutil.tech> | 2022-07-12 00:36:09 +0100 |
---|---|---|
committer | Sam Atkins <atkinssj@gmail.com> | 2022-07-17 20:11:38 +0100 |
commit | eef148f7e73020cc10205170165ad1435088c67d (patch) | |
tree | 302b23822e5b5e25f0f98191edfa9992804dfb0d /Userland/Libraries | |
parent | 03037cbe4e7d4e40d5c9e12a11f72376797994f2 (diff) | |
download | serenity-eef148f7e73020cc10205170165ad1435088c67d.zip |
LibGfx: Fix direction of vertical gradients
Previously the color blending and alpha blending were working from
opposite sides.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibGfx/Painter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGfx/Painter.cpp b/Userland/Libraries/LibGfx/Painter.cpp index ef277a5878..c968a04991 100644 --- a/Userland/Libraries/LibGfx/Painter.cpp +++ b/Userland/Libraries/LibGfx/Painter.cpp @@ -265,7 +265,7 @@ void Painter::fill_rect_with_gradient(Orientation orientation, IntRect const& a_ float c = offset * increment; float c_alpha = gradient_start.alpha() + offset * alpha_increment; for (int i = clipped_rect.height() - 1; i >= 0; --i) { - auto color = gamma_accurate_blend(gradient_end, gradient_start, c); + auto color = gamma_accurate_blend(gradient_start, gradient_end, c); color.set_alpha(c_alpha); for (int j = 0; j < clipped_rect.width(); ++j) { dst[j] = Color::from_argb(dst[j]).blend(color).value(); |