| 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::TEST_P (AiksTest, CanRenderLinearGradientClamp)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientRepeat)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientMirror)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientDecal)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientDecalWithColorFilter)
static void | impeller::testing::CanRenderLinearGradientWithDithering (AiksTest *aiks_test, bool use_dithering)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientWithDitheringDisabled)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientWithDitheringEnabled)
static void | impeller::testing::CanRenderRadialGradientWithDithering (AiksTest *aiks_test, bool use_dithering)
| impeller::testing::TEST_P (AiksTest, CanRenderRadialGradientWithDitheringDisabled)
| impeller::testing::TEST_P (AiksTest, CanRenderRadialGradientWithDitheringEnabled)
static void | impeller::testing::CanRenderSweepGradientWithDithering (AiksTest *aiks_test, bool use_dithering)
| impeller::testing::TEST_P (AiksTest, CanRenderSweepGradientWithDitheringDisabled)
| impeller::testing::TEST_P (AiksTest, CanRenderSweepGradientWithDitheringEnabled)
static void | impeller::testing::CanRenderConicalGradientWithDithering (AiksTest *aiks_test, bool use_dithering)
| impeller::testing::TEST_P (AiksTest, CanRenderConicalGradientWithDitheringDisabled)
| impeller::testing::TEST_P (AiksTest, CanRenderConicalGradientWithDitheringEnabled)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientWithOverlappingStopsClamp)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientManyColorsClamp)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientManyColorsRepeat)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientManyColorsMirror)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientManyColorsDecal)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientWayManyColorsClamp)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientManyColorsUnevenStops)
| impeller::testing::TEST_P (AiksTest, CanRenderLinearGradientMaskBlur)
| impeller::testing::TEST_P (AiksTest, CanRenderRadialGradient)
| impeller::testing::TEST_P (AiksTest, CanRenderRadialGradientManyColors)
| impeller::testing::TEST_P (AiksTest, CanRenderSweepGradientClamp)
| impeller::testing::TEST_P (AiksTest, CanRenderSweepGradientRepeat)
| impeller::testing::TEST_P (AiksTest, CanRenderSweepGradientMirror)
| impeller::testing::TEST_P (AiksTest, CanRenderSweepGradientDecal)
| impeller::testing::TEST_P (AiksTest, CanRenderSweepGradientManyColorsClamp)
| impeller::testing::TEST_P (AiksTest, CanRenderSweepGradientManyColorsRepeat)
| impeller::testing::TEST_P (AiksTest, CanRenderSweepGradientManyColorsMirror)
| impeller::testing::TEST_P (AiksTest, CanRenderSweepGradientManyColorsDecal)
| impeller::testing::TEST_P (AiksTest, CanRenderConicalGradient)
| impeller::testing::TEST_P (AiksTest, CanRenderGradientDecalWithBackground)
| 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)
| impeller::testing::TEST_P (AiksTest, GradientStrokesRenderCorrectly)

## 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 635 of file aiks_gradient_unittests.cc.

impeller::testing::AiksTest
AiksPlayground AiksTest
Definition: aiks_unittests.h:17
impeller::testing::TEST_P
TEST_P(AiksTest, GradientStrokesRenderCorrectly)
Definition: aiks_gradient_unittests.cc:654