5#include "flutter/impeller/aiks/aiks_unittests.h"
15#include "third_party/imgui/imgui.h"
25#define APPLY_COLOR_FILTER_GRADIENT_TEST(name) \
26 TEST_P(AiksTest, name##GradientApplyColorFilter) { \
27 auto contents = name##GradientContents(); \
28 contents.SetColors({Color::CornflowerBlue().WithAlpha(0.75)}); \
29 auto result = contents.ApplyColorFilter([](const Color& color) { \
30 return color.Blend(Color::LimeGreen().WithAlpha(0.75), \
31 BlendMode::kScreen); \
33 ASSERT_TRUE(result); \
35 std::vector<Color> expected = {Color(0.433247, 0.879523, 0.825324, 0.75)}; \
36 ASSERT_COLORS_NEAR(contents.GetColors(), expected); \
APPLY_COLOR_FILTER_GRADIENT_TEST(Linear)