1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 04:17:34 +00:00

LibWeb: Support painting the saturate() filter effect

This commit is contained in:
MacDue 2022-10-03 20:46:34 +01:00 committed by Sam Atkins
parent f77a84a5f6
commit 60cc96d243

View file

@ -10,6 +10,7 @@
#include <LibGfx/Filters/HueRotateFilter.h> #include <LibGfx/Filters/HueRotateFilter.h>
#include <LibGfx/Filters/InvertFilter.h> #include <LibGfx/Filters/InvertFilter.h>
#include <LibGfx/Filters/OpacityFilter.h> #include <LibGfx/Filters/OpacityFilter.h>
#include <LibGfx/Filters/SaturateFilter.h>
#include <LibGfx/Filters/SepiaFilter.h> #include <LibGfx/Filters/SepiaFilter.h>
#include <LibGfx/Filters/StackBlurFilter.h> #include <LibGfx/Filters/StackBlurFilter.h>
#include <LibWeb/Layout/Node.h> #include <LibWeb/Layout/Node.h>
@ -74,7 +75,11 @@ void apply_filter_list(Gfx::Bitmap& target_bitmap, Layout::Node const& node, Spa
break; break;
} }
case CSS::Filter::Color::Operation::Saturate: { case CSS::Filter::Color::Operation::Saturate: {
dbgln("TODO: Implement saturate() filter function!"); // Saturates the input image. The passed parameter defines the proportion of the conversion.
// A value of 0% is completely un-saturated. A value of 100% leaves the input unchanged.
// Other values are linear multipliers on the effect.
// Values of amount over 100% are allowed, providing super-saturated results
apply_color_filter(Gfx::SaturateFilter { amount });
break; break;
} }
default: default: