| Flutter Impeller |

Namespaces | Macros | Functions
aiks_gradient_unittests.cc File Reference
`#include "flutter/impeller/aiks/aiks_unittests.h"`
`#include "impeller/aiks/canvas.h"`
`#include "impeller/entity/contents/conical_gradient_contents.h"`
`#include "impeller/entity/contents/linear_gradient_contents.h"`
`#include "impeller/entity/contents/radial_gradient_contents.h"`
`#include "impeller/entity/contents/sweep_gradient_contents.h"`
`#include "impeller/geometry/geometry_asserts.h"`
`#include "impeller/geometry/path_builder.h"`
`#include "impeller/playground/widgets.h"`
`#include "third_party/imgui/imgui.h"`

Go to the source code of this file.

## Namespaces
| impeller
| impeller::testing

## Macros
#define | APPLY_COLOR_FILTER_GRADIENT_TEST(name)

## Functions
| impeller::testing::APPLY_COLOR_FILTER_GRADIENT_TEST (Linear)
| impeller::testing::APPLY_COLOR_FILTER_GRADIENT_TEST (Radial)
| impeller::testing::APPLY_COLOR_FILTER_GRADIENT_TEST (Conical)
| impeller::testing::APPLY_COLOR_FILTER_GRADIENT_TEST (Sweep)

## Macro Definition Documentation

## ◆ APPLY_COLOR_FILTER_GRADIENT_TEST

#define APPLY_COLOR_FILTER_GRADIENT_TEST | ( |  | name | ) |

Value:
TEST_P(AiksTest, name##GradientApplyColorFilter) { \
auto contents = name##GradientContents(); \
contents.SetColors({Color::CornflowerBlue().WithAlpha(0.75)}); \
auto result = contents.ApplyColorFilter([](const Color& color) { \
return color.Blend(Color::LimeGreen().WithAlpha(0.75), \
BlendMode::kScreen); \
}); \
ASSERT_TRUE(result); \
\
std::vector<Color> expected = {Color(0.433247, 0.879523, 0.825324, 0.75)}; \
ASSERT_COLORS_NEAR(contents.GetColors(), expected); \
}

Definition at line 25 of file aiks_gradient_unittests.cc.

impeller::testing::AiksTest
AiksPlayground AiksTest
Definition: aiks_unittests.h:17
impeller::testing::TEST_P
TEST_P(AiksTest, CanRenderAdvancedBlendColorFilterWithSaveLayer)
Definition: aiks_blend_unittests.cc:21
color
DlColor color
Definition: dl_golden_blur_unittests.cc:23