| Flutter Impeller |

Classes | Namespaces | Macros | Functions
geometry_unittests.cc File Reference
`#include "gtest/gtest.h"`
`#include "impeller/geometry/geometry_asserts.h"`
`#include <limits>`
`#include <map>`
`#include <sstream>`
`#include <type_traits>`
`#include "flutter/fml/build_config.h"`
`#include "flutter/testing/testing.h"`
`#include "impeller/geometry/color.h"`
`#include "impeller/geometry/constants.h"`
`#include "impeller/geometry/gradient.h"`
`#include "impeller/geometry/half.h"`
`#include "impeller/geometry/point.h"`
`#include "impeller/geometry/rect.h"`
`#include "impeller/geometry/scalar.h"`
`#include "impeller/geometry/separated_vector.h"`
`#include "impeller/geometry/size.h"`

Go to the source code of this file.

## Classes
struct | impeller::testing::ColorBlendTestData

## Namespaces
| impeller
| impeller::testing

## Macros
#define | _BLEND_MODE_RESULT_CHECK(blend_mode)
#define | _BLEND_MODE_NAME_CHECK(blend_mode)

## Functions
| impeller::testing::TEST (GeometryTest, ScalarNearlyEqual)
| impeller::testing::TEST (GeometryTest, MakeColumn)
| impeller::testing::TEST (GeometryTest, MakeRow)
| impeller::testing::TEST (GeometryTest, RotationMatrix)
| impeller::testing::TEST (GeometryTest, InvertMultMatrix)
| impeller::testing::TEST (GeometryTest, MatrixBasis)
| impeller::testing::TEST (GeometryTest, MutliplicationMatrix)
| impeller::testing::TEST (GeometryTest, DeterminantTest)
| impeller::testing::TEST (GeometryTest, InvertMatrix)
| impeller::testing::TEST (GeometryTest, TestDecomposition)
| impeller::testing::TEST (GeometryTest, TestDecomposition2)
| impeller::testing::TEST (GeometryTest, TestRecomposition)
| impeller::testing::TEST (GeometryTest, TestRecomposition2)
| impeller::testing::TEST (GeometryTest, MatrixVectorMultiplication)
| impeller::testing::TEST (GeometryTest, MatrixMakeRotationFromQuaternion)
| impeller::testing::TEST (GeometryTest, MatrixTransformDirection)
| impeller::testing::TEST (GeometryTest, MatrixGetMaxBasisLengthXY)
| impeller::testing::TEST (GeometryTest, MatrixMakeOrthographic)
| impeller::testing::TEST (GeometryTest, MatrixMakePerspective)
| impeller::testing::TEST (GeometryTest, MatrixGetBasisVectors)
| impeller::testing::TEST (GeometryTest, MatrixGetDirectionScale)
| impeller::testing::TEST (GeometryTest, MatrixTranslationScaleOnly)
| impeller::testing::TEST (GeometryTest, MatrixLookAt)
| impeller::testing::TEST (GeometryTest, QuaternionLerp)
| impeller::testing::TEST (GeometryTest, QuaternionVectorMultiply)
| impeller::testing::TEST (GeometryTest, CanGenerateMipCounts)
| impeller::testing::TEST (GeometryTest, CanConvertTTypesExplicitly)
| impeller::testing::TEST (GeometryTest, CanPerformAlgebraicPointOps)
| impeller::testing::TEST (GeometryTest, CanPerformAlgebraicPointOpsWithArithmeticTypes)
| impeller::testing::TEST (GeometryTest, PointIntegerCoercesToFloat)
| impeller::testing::TEST (GeometryTest, SizeCoercesToPoint)
| impeller::testing::TEST (GeometryTest, CanUsePointAssignmentOperators)
| impeller::testing::TEST (GeometryTest, PointDotProduct)
| impeller::testing::TEST (GeometryTest, PointCrossProduct)
| impeller::testing::TEST (GeometryTest, PointReflect)
| impeller::testing::TEST (GeometryTest, PointAbs)
| impeller::testing::TEST (GeometryTest, PointRotate)
| impeller::testing::TEST (GeometryTest, PointAngleTo)
| impeller::testing::TEST (GeometryTest, PointMin)
| impeller::testing::TEST (GeometryTest, Vector4IsFinite)
| impeller::testing::TEST (GeometryTest, Vector3Min)
| impeller::testing::TEST (GeometryTest, Vector4Min)
| impeller::testing::TEST (GeometryTest, PointMax)
| impeller::testing::TEST (GeometryTest, Vector3Max)
| impeller::testing::TEST (GeometryTest, Vector4Max)
| impeller::testing::TEST (GeometryTest, PointFloor)
| impeller::testing::TEST (GeometryTest, Vector3Floor)
| impeller::testing::TEST (GeometryTest, Vector4Floor)
| impeller::testing::TEST (GeometryTest, PointCeil)
| impeller::testing::TEST (GeometryTest, Vector3Ceil)
| impeller::testing::TEST (GeometryTest, Vector4Ceil)
| impeller::testing::TEST (GeometryTest, PointRound)
| impeller::testing::TEST (GeometryTest, Vector3Round)
| impeller::testing::TEST (GeometryTest, Vector4Round)
| impeller::testing::TEST (GeometryTest, PointLerp)
| impeller::testing::TEST (GeometryTest, Vector3Lerp)
| impeller::testing::TEST (GeometryTest, Vector4Lerp)
| impeller::testing::TEST (GeometryTest, SeparatedVector2NormalizesWithConstructor)
| impeller::testing::TEST (GeometryTest, SeparatedVector2GetVector)
| impeller::testing::TEST (GeometryTest, SeparatedVector2GetAlignment)
| impeller::testing::TEST (GeometryTest, SeparatedVector2AngleTo)
| impeller::testing::TEST (GeometryTest, CanUseVector3AssignmentOperators)
| impeller::testing::TEST (GeometryTest, CanPerformAlgebraicVector3Ops)
| impeller::testing::TEST (GeometryTest, CanPerformAlgebraicVector3OpsWithArithmeticTypes)
| impeller::testing::TEST (GeometryTest, ColorPremultiply)
| impeller::testing::TEST (GeometryTest, ColorR8G8B8A8)
| impeller::testing::TEST (GeometryTest, ColorLerp)
| impeller::testing::TEST (GeometryTest, ColorClamp01)
| impeller::testing::TEST (GeometryTest, ColorMakeRGBA8)
| impeller::testing::TEST (GeometryTest, ColorApplyColorMatrix)
| impeller::testing::TEST (GeometryTest, ColorLinearToSRGB)
| impeller::testing::TEST (GeometryTest, ColorSRGBToLinear)
| impeller::testing::TEST (GeometryTest, ColorBlendReturnsExpectedResults)
| impeller::testing::TEST (GeometryTest, BlendModeToString)
| impeller::testing::TEST (GeometryTest, CanConvertBetweenDegressAndRadians)
| impeller::testing::TEST (GeometryTest, MatrixPrinting)
| impeller::testing::TEST (GeometryTest, PointPrinting)
| impeller::testing::TEST (GeometryTest, Vector3Printing)
| impeller::testing::TEST (GeometryTest, Vector4Printing)
| impeller::testing::TEST (GeometryTest, ColorPrinting)
| impeller::testing::TEST (GeometryTest, ToIColor)
| impeller::testing::TEST (GeometryTest, Gradient)
| impeller::testing::TEST (GeometryTest, HalfConversions)

## Macro Definition Documentation

## ◆ _BLEND_MODE_NAME_CHECK

#define _BLEND_MODE_NAME_CHECK | ( |  | blend_mode | ) |

Value:
case BlendMode::k##blend_mode: \
ASSERT_STREQ(result, #blend_mode); \
break;

Definition at line 1704 of file geometry_unittests.cc.

## ◆ _BLEND_MODE_RESULT_CHECK

#define _BLEND_MODE_RESULT_CHECK | ( |  | blend_mode | ) |

Value:
expected = ColorBlendTestData::kExpectedResults[source_i] \
.find(BlendMode::k##blend_mode) \
->second; \
EXPECT_COLOR_NEAR(dst.Blend(src, BlendMode::k##blend_mode), expected);

To print a new ColorBlendTestData::kExpectedResults table, uncomment this test and run with: –gtest_filter="GeometryTest.GenerateColorBlendResults"

Definition at line 1686 of file geometry_unittests.cc.