20#include "gmock/gmock.h"
25#include "third_party/imgui/imgui.h"
41 builder.
Scale(GetContentScale().
x, GetContentScale().
y);
43 std::vector<float> sigmas = {0.0, 0.01, 1.0};
46 for (uint32_t
i = 0;
i < sigmas.size(); ++
i) {
60 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
67 builder.
Scale(content_Scale.
x, content_Scale.
y);
70 background_paint.
setColor(
DlColor(1, 0.1, 0.1, 0.1, DlColorSpace::kSRGB));
74 std::vector<Scalar> stops = {0.0, 1.0};
79 {0, 0}, {200, 200}, 2, colors.data(), stops.data(), DlTileMode::kClamp);
100 return builder.
Build();
106 GetContentScale(), 10, DlBlurStyle::kNormal)));
111 GetContentScale(), 0, DlBlurStyle::kNormal)));
116 GetContentScale(), 10, DlBlurStyle::kOuter)));
121 GetContentScale(), 10, DlBlurStyle::kInner)));
126 GetContentScale(), 10, DlBlurStyle::kSolid)));
131 builder.
Scale(GetContentScale().
x, GetContentScale().
y);
133 std::vector<float> sigmas = {0.0, 0.01, 1.0};
136 for (uint32_t
i = 0;
i < sigmas.size(); ++
i) {
150 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
162 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
181 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
192 DlColor::RGBA(128.0f / 255.0f, 128.0f / 255.0f, 128.0f / 255.0f, 1.0f));
202 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
206 auto callback = [&]() -> sk_sp<DisplayList> {
233 builder.
SaveLayer(std::nullopt, &save_paint, backdrop_filter.get());
236 return builder.
Build();
239 ASSERT_TRUE(OpenPlaygroundHere(
callback));
265 builder.
SaveLayer(std::nullopt, &save_paint, backdrop_filter.get());
268 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
278 DlImageSampling::kNearestNeighbor, &paint);
288 builder.
SaveLayer(std::nullopt, &save_paint, backdrop_filter.get(),
293 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
303 DlImageSampling::kNearestNeighbor, &paint);
305 for (
int i = 0;
i < 6;
i++) {
314 builder.
SaveLayer(std::nullopt, &save_paint, backdrop_filter.get(),
320 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
324 CanRenderMultipleBackdropBlurWithSingleBackdropIdAndDistinctFilters) {
331 DlImageSampling::kNearestNeighbor, &paint);
333 for (
int i = 0;
i < 6;
i++) {
341 auto backdrop_filter =
343 builder.
SaveLayer(std::nullopt, &save_paint, backdrop_filter.get(),
349 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
362 auto backdrop_filter =
364 builder.
SaveLayer(std::nullopt, &save_paint, backdrop_filter.get());
367 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
386 builder.
Scale(1.1, 1.2);
390 auto backdrop_filter1 =
392 builder.
SaveLayer(std::nullopt, &save_paint, backdrop_filter1.get());
399 builder.
Scale(1.1, 1.2);
403 auto backdrop_filter2 =
405 builder.
SaveLayer(std::nullopt, &save_paint, backdrop_filter2.get());
409 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
422 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
440 std::shared_ptr<DlImageFilter> color_filter =
442 std::shared_ptr<DlImageFilter> blur =
447 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
465 std::shared_ptr<DlImageFilter> color_filter =
467 std::shared_ptr<DlImageFilter> blur =
472 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
476 auto callback = [&]() -> sk_sp<DisplayList> {
494 return builder.
Build();
496 ASSERT_TRUE(OpenPlaygroundHere(
callback));
513 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
528 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
533 auto callback = [&]() -> sk_sp<DisplayList> {
535 ImGuiWindowFlags_AlwaysAutoResize)) {
536 ImGui::SliderFloat(
"Sigma", &sigma, 0, 50);
540 builder.
Scale(GetContentScale().
x, GetContentScale().
y);
548 return builder.
Build();
551 ASSERT_TRUE(OpenPlaygroundHere(
callback));
564 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
569 EXPECT_EQ(GetContext()->GetCapabilities()->GetDefaultColorFormat(),
586 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
604 builder.
Scale(0.8f, 0.8f);
620 const Scalar radius = 20.0f;
621 const Scalar y_spacing = 100.0f;
627 radius, 60.0f - radius),
637 radius, 60.0f - radius),
661 path_builder.
Close();
676 return builder.
Build();
681 {
"NormalTranslucentZeroSigma",
682 {.style = DlBlurStyle::kNormal, .sigma = 0.0f, .alpha = 0.5f}},
684 {
"NormalTranslucent",
685 {.style = DlBlurStyle::kNormal, .sigma = 8.0f, .alpha = 0.5f}},
688 {.style = DlBlurStyle::kSolid, .sigma = 8.0f, .alpha = 0.5f}},
690 {
"SolidOpaque", {.style = DlBlurStyle::kSolid, .sigma = 8.0f}},
692 {
"SolidTranslucentWithFilters",
693 {.style = DlBlurStyle::kSolid,
697 .invert_colors =
true}},
699 {
"SolidTranslucentExclusionBlend",
700 {.style = DlBlurStyle::kSolid,
703 .blend_mode = DlBlendMode::kExclusion}},
706 {.style = DlBlurStyle::kInner, .sigma = 8.0f, .alpha = 0.5f}},
708 {
"InnerTranslucentWithBlurImageFilter",
709 {.style = DlBlurStyle::kInner,
715 {.style = DlBlurStyle::kOuter, .sigma = 8.0f, .alpha = 0.5f}},
717 {
"OuterOpaqueWithBlurImageFilter",
718 {.style = DlBlurStyle::kOuter,
722#define MASK_BLUR_VARIANT_TEST(config) \
723 TEST_P(AiksTest, MaskBlurVariantTest##config) { \
724 ASSERT_TRUE(OpenPlaygroundHere( \
725 MaskBlurVariantTest(*this, kPaintVariations.at(#config)))); \
739#undef MASK_BLUR_VARIANT_TEST
743 builder.
Scale(GetContentScale().
x, GetContentScale().
y);
756 path_builder.
Close();
765 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
770 builder.
Scale(GetContentScale().
x, GetContentScale().
y);
783 path_builder.
Close();
792 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
797 builder.
Scale(GetContentScale().
x, GetContentScale().
y);
810 path_builder.
Close();
819 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
824 auto callback = [&]() -> sk_sp<DisplayList> {
826 ImGuiWindowFlags_AlwaysAutoResize)) {
827 ImGui::SliderFloat(
"Sigma", &sigma, 0, 500);
832 builder.
Scale(GetContentScale().
x, GetContentScale().
y);
840 DlPoint(200, 200), DlImageSampling::kNearestNeighbor, &paint);
846 return builder.
Build();
848 ASSERT_TRUE(OpenPlaygroundHere(
callback));
853 auto callback = [&]() -> sk_sp<DisplayList> {
855 ImGuiWindowFlags_AlwaysAutoResize)) {
856 ImGui::SliderFloat(
"Sigma", &sigma, 0, 500);
861 builder.
Scale(GetContentScale().
x, GetContentScale().
y);
867 std::shared_ptr<Texture> boston = CreateTextureForFixture(
"boston.jpg");
874 DlImageSampling::kMipmapLinear));
878 boston->GetSize().height),
881 return builder.
Build();
883 ASSERT_TRUE(OpenPlaygroundHere(
callback));
890 builder.
Scale(GetContentScale().
x, GetContentScale().
y);
908 builder.
SaveLayer(std::nullopt, &save_paint, backdrop_filter.get());
911 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
917 builder.
Scale(GetContentScale().
x, GetContentScale().
y);
918 std::shared_ptr<Texture> boston = CreateTextureForFixture(
"boston.jpg");
923 DlImageSampling::kNearestNeighbor);
937 builder.
SaveLayer(std::nullopt, &save_paint, backdrop_filter.get());
940 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
949 CreateTextureForFixture(
"boston.jpg",
true);
955 auto callback = [&]() -> sk_sp<DisplayList> {
957 ImGuiWindowFlags_AlwaysAutoResize)) {
958 ImGui::SliderFloat(
"Sigma", &sigma, 0, 200);
959 ImGui::SliderFloat(
"Frequency", &freq, 0.01, 2.0);
960 ImGui::SliderFloat(
"Amplitude", &, 1, 100);
965 builder.
Scale(GetContentScale().
x, GetContentScale().
y);
966 Scalar y = amp * sin(freq * 2.0 * M_PI * count / 60);
968 DlPoint(1024 / 2 - boston->GetSize().width / 2,
969 (768 / 2 - boston->GetSize().height / 2) +
y),
970 DlImageSampling::kMipmapLinear);
982 auto backdrop_filter =
984 builder.
SaveLayer(std::nullopt, &paint, backdrop_filter.get());
986 return builder.
Build();
988 ASSERT_TRUE(OpenPlaygroundHere(
callback));
994 builder.
Scale(GetContentScale().
x, GetContentScale().
y);
1000 std::vector<DlColor> colors = {
DlColor::RGBA(0.9568, 0.2627, 0.2118, 1.0),
1002 std::vector<Scalar> stops = {0.0, 1.0};
1011 DlTileMode::kMirror));
1018 path_builder.
Close();
1026 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
1031 builder.
Scale(GetContentScale().
x, GetContentScale().
y);
1037 std::vector<DlColor> colors = {
DlColor::RGBA(0.9568, 0.2627, 0.2118, 1.0),
1039 std::vector<Scalar> stops = {0.0, 1.0};
1048 DlTileMode::kMirror));
1055 path_builder.
Close();
1062 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
1067 builder.
Scale(GetContentScale().
x, GetContentScale().
y);
1073 std::vector<DlColor> colors = {
DlColor::RGBA(0.9568, 0.2627, 0.2118, 1.0),
1075 std::vector<Scalar> stops = {0.0, 1.0};
1084 DlTileMode::kMirror));
1091 path_builder.
Close();
1098 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
1103 std::shared_ptr<Texture> boston = CreateTextureForFixture(
"boston.jpg");
1105 Rect::MakeXYWH(0, 0, boston->GetSize().width, boston->GetSize().height);
1111 Vector2 clip_size = {150, 75};
1113 builder.
Scale(GetContentScale().
x, GetContentScale().
y);
1117 rect.GetRight(), rect.GetBottom()));
1119 builder.
Scale(0.6, 0.6);
1122 bounds.GetRight(), bounds.GetBottom());
1123 Rect dest = bounds.Shift(-image_center);
1125 dest.GetRight(), dest.GetBottom());
1127 sk_dst, DlImageSampling::kNearestNeighbor,
1130 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
1134 std::shared_ptr<Texture> boston = CreateTextureForFixture(
"boston.jpg");
1136 auto callback = [&]() -> sk_sp<DisplayList> {
1137 const char* tile_mode_names[] = {
"Clamp",
"Repeat",
"Mirror",
"Decal"};
1138 const DlTileMode tile_modes[] = {DlTileMode::kClamp, DlTileMode::kRepeat,
1139 DlTileMode::kMirror, DlTileMode::kDecal};
1141 static float rotation = 0;
1142 static float scale = 0.6;
1143 static int selected_tile_mode = 3;
1146 ImGuiWindowFlags_AlwaysAutoResize)) {
1147 ImGui::SliderFloat(
"Rotation (degrees)", &rotation, -180, 180);
1148 ImGui::SliderFloat(
"Scale", &scale, 0, 2.0);
1149 ImGui::Combo(
"Tile mode", &selected_tile_mode, tile_mode_names,
1150 sizeof(tile_mode_names) /
sizeof(
char*));
1156 Rect::MakeXYWH(0, 0, boston->GetSize().width, boston->GetSize().height);
1167 builder.
Scale(GetContentScale().
x, GetContentScale().
y);
1171 builder.
Scale(scale, scale);
1172 builder.
Rotate(rotation);
1175 bounds.GetRight(), bounds.GetBottom());
1176 Rect dest = bounds.Shift(-image_center);
1178 dest.GetRight(), dest.GetBottom());
1180 sk_dst, DlImageSampling::kNearestNeighbor,
1182 return builder.
Build();
1185 ASSERT_TRUE(OpenPlaygroundHere(
callback));
1191 builder.
Scale(GetContentScale().
x, GetContentScale().
y);
1192 builder.
Scale(0.5, 0.5);
1194 std::shared_ptr<Texture> boston = CreateTextureForFixture(
"boston.jpg");
1201 builder.
SaveLayer(std::nullopt, &paint, backdrop_filter.get());
1203 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
1213 std::shared_ptr<Texture> boston = CreateTextureForFixture(
"boston.jpg");
1215 Rect::MakeXYWH(0, 0, boston->GetSize().width, boston->GetSize().height);
1221 Vector2 clip_size = {150, 75};
1223 builder.
Scale(GetContentScale().
x, GetContentScale().
y);
1227 clip_bounds.GetRight(),
1228 clip_bounds.GetBottom()));
1230 builder.
Scale(0.6, 0.6);
1233 auto dst_rect = bounds.Shift(-image_center);
1237 bounds.GetBottom()),
1240 dst_rect.GetRight(), dst_rect.GetBottom()),
1241 DlImageSampling::kMipmapLinear, &paint);
1243 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
1247 auto callback = [&]() -> sk_sp<DisplayList> {
1248 const char* tile_mode_names[] = {
"Clamp",
"Repeat",
"Mirror",
"Decal"};
1249 const DlTileMode tile_modes[] = {DlTileMode::kClamp, DlTileMode::kRepeat,
1250 DlTileMode::kMirror, DlTileMode::kDecal};
1252 static float rotation = 45;
1253 static float scale = 0.6;
1254 static int selected_tile_mode = 3;
1257 ImGuiWindowFlags_AlwaysAutoResize)) {
1258 ImGui::SliderFloat(
"Rotation (degrees)", &rotation, -180, 180);
1259 ImGui::SliderFloat(
"Scale", &scale, 0, 2.0);
1260 ImGui::Combo(
"Tile mode", &selected_tile_mode, tile_mode_names,
1261 sizeof(tile_mode_names) /
sizeof(
char*));
1273 builder.
Scale(GetContentScale().
x, GetContentScale().
y);
1275 builder.
Scale(scale, scale);
1276 builder.
Rotate(rotation);
1281 return builder.
Build();
1284 ASSERT_TRUE(OpenPlaygroundHere(
callback));
1289 builder.
Scale(GetContentScale().
x, GetContentScale().
y);
1296 paint.setStrokeWidth(5);
1297 paint.setDrawStyle(DlDrawStyle::kStroke);
1298 draw_line(
DlPoint(dx + 100, dy + 100),
DlPoint(dx + 200, dy + 200));
1299 draw_line(
DlPoint(dx + 100, dy + 200),
DlPoint(dx + 200, dy + 100));
1300 draw_line(
DlPoint(dx + 150, dy + 100),
DlPoint(dx + 200, dy + 150));
1301 draw_line(
DlPoint(dx + 100, dy + 150),
DlPoint(dx + 150, dy + 200));
1306 for (
int x = 0;
x < 5; ++
x) {
1307 for (
int y = 0;
y < 5; ++
y) {
1313 recorder_builder.
DrawRect(rect, paint);
1339 paint_lines(0, 300, paint);
1342 paint_lines(300, 300, paint);
1344 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
1353 for (int32_t
i = 1;
i < 5; ++
i) {
1368 EXPECT_TRUE(
image) <<
" length " <<
i;
1377 for (int32_t
i = 1;
i < 5; ++
i) {
1394 EXPECT_TRUE(
image) <<
" length " <<
i;
1399 CanRenderMultipleBackdropBlurWithSingleBackdropIdDifferentLayers) {
1406 DlImageSampling::kNearestNeighbor, &paint);
1408 for (
int i = 0;
i < 6;
i++) {
1412 builder.
SaveLayer(std::nullopt, &paint);
1422 builder.
SaveLayer(std::nullopt, &save_paint, backdrop_filter.get(),
1431 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
1436 builder.
Scale(GetContentScale().
x, GetContentScale().
y);
1438 std::vector<DlColor> colors = {
DlColor(0xFFFF0000),
DlColor(0xFF00FF00)};
1439 std::vector<Scalar> stops = {0.0, 1.0};
1442 {0, 0}, {400, 400}, 2, colors.data(), stops.data(), DlTileMode::kClamp);
1446 builder.
SaveLayer(std::nullopt, &save_paint);
1455 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
1464 auto callback = [&]() -> sk_sp<DisplayList> {
1469 Scalar offset = amp * sin(freq * 2.0 * M_PI * count / 60.0);
1484 builder.
SaveLayer(std::nullopt,
nullptr, backdrop_filter1.get());
1493 auto backdrop_filter2 =
1497 builder.
SaveLayer(std::nullopt,
nullptr, backdrop_filter2.get());
1505 return builder.
Build();
1507 ASSERT_TRUE(OpenPlaygroundHere(
callback));
1512 builder.
Scale(GetContentScale().
x, GetContentScale().
y);
1518 builder.
Scale(-1, 1);
1527 ASSERT_TRUE(OpenPlaygroundHere(builder.
Build()));
#define MASK_BLUR_VARIANT_TEST(config)
void DrawOval(const DlRect &bounds, const DlPaint &paint) override
void ClipRect(const DlRect &rect, DlClipOp clip_op=DlClipOp::kIntersect, bool is_aa=false) override
void DrawImageRect(const sk_sp< DlImage > &image, const DlRect &src, const DlRect &dst, DlImageSampling sampling, const DlPaint *paint=nullptr, DlSrcRectConstraint constraint=DlSrcRectConstraint::kFast) override
void DrawRoundRect(const DlRoundRect &rrect, const DlPaint &paint) override
void DrawImage(const sk_sp< DlImage > &image, const DlPoint &point, DlImageSampling sampling, const DlPaint *paint=nullptr) override
void DrawColor(DlColor color, DlBlendMode mode) override
void DrawCircle(const DlPoint ¢er, DlScalar radius, const DlPaint &paint) override
void SaveLayer(const std::optional< DlRect > &bounds, const DlPaint *paint=nullptr, const DlImageFilter *backdrop=nullptr, std::optional< int64_t > backdrop_id=std::nullopt) override
void DrawLine(const DlPoint &p0, const DlPoint &p1, const DlPaint &paint) override
void ClipRoundRect(const DlRoundRect &rrect, DlClipOp clip_op=DlClipOp::kIntersect, bool is_aa=false) override
void Rotate(DlScalar degrees) override
void Scale(DlScalar sx, DlScalar sy) override
void Translate(DlScalar tx, DlScalar ty) override
void DrawPaint(const DlPaint &paint) override
sk_sp< DisplayList > Build()
void DrawPath(const DlPath &path, const DlPaint &paint) override
void Transform(const DlMatrix &matrix) override
void DrawRect(const DlRect &rect, const DlPaint &paint) override
static std::shared_ptr< DlImageFilter > Make(DlScalar sigma_x, DlScalar sigma_y, DlTileMode tile_mode, std::optional< DlRect > bounds=std::nullopt)
static std::shared_ptr< DlMaskFilter > Make(DlBlurStyle style, SkScalar sigma, bool respect_ctm=true)
static std::shared_ptr< const DlColorFilter > MakeBlend(DlColor color, DlBlendMode mode)
static std::shared_ptr< const DlColorFilter > MakeMatrix(const float matrix[20])
static std::shared_ptr< DlColorSource > MakeImage(const sk_sp< const DlImage > &image, DlTileMode horizontal_tile_mode, DlTileMode vertical_tile_mode, DlImageSampling sampling=DlImageSampling::kLinear, const DlMatrix *matrix=nullptr)
static std::shared_ptr< DlColorSource > MakeLinear(const DlPoint start_point, const DlPoint end_point, uint32_t stop_count, const DlColor *colors, const float *stops, DlTileMode tile_mode, const DlMatrix *matrix=nullptr)
static std::shared_ptr< DlImageFilter > MakeBlur(DlScalar sigma_x, DlScalar sigma_y, DlTileMode tile_mode)
static std::shared_ptr< DlImageFilter > MakeColorFilter(const std::shared_ptr< const DlColorFilter > &filter)
static std::shared_ptr< DlImageFilter > MakeCompose(const std::shared_ptr< DlImageFilter > &outer, const std::shared_ptr< DlImageFilter > &inner)
DlPaint & setColor(DlColor color)
DlPaint & setInvertColors(bool isInvertColors)
DlPaint & setStrokeWidth(float width)
DlPaint & setBlendMode(DlBlendMode mode)
DlPaint & setImageFilter(std::nullptr_t filter)
DlPaint & setMaskFilter(std::nullptr_t filter)
DlPaint & setDrawStyle(DlDrawStyle style)
DlPaint & setOpacity(DlScalar opacity)
DlPaint & setColorFilter(std::nullptr_t filter)
DlPaint & setColorSource(std::nullptr_t source)
DlPathBuilder & LineTo(DlPoint p2)
Draw a line from the current point to the indicated point p2.
DlPathBuilder & MoveTo(DlPoint p2)
Start a new contour that will originate at the indicated point p2.
const DlPath TakePath()
Returns the path constructed by this path builder and resets its internal state to the default state ...
DlPathBuilder & Close()
The path is closed back to the location of the most recent MoveTo call. Contours that are filled are ...
static DlPath MakeLine(const DlPoint a, const DlPoint b)
static DlPath MakeCircle(const DlPoint center, DlScalar radius)
static DlPath MakeArc(const DlRect &bounds, DlDegrees start, DlDegrees sweep, bool use_center)
static DlPath MakeRect(const DlRect &rect)
static bool ImGuiBegin(const char *name, bool *p_open, ImGuiWindowFlags flags)
static sk_sp< DlImageImpeller > Make(std::shared_ptr< Texture > texture, OwningContext owning_context=OwningContext::kIO)
Point GetContentScale() const
FlutterVulkanImage * image
FlutterDesktopBinaryReply callback
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
TEST_P(AiksTest, DrawAtlasNoColor)
static const std::map< std::string, MaskBlurTestConfig > kPaintVariations
sk_sp< flutter::DisplayList > DoGradientOvalStrokeMaskBlur(Vector2 content_Scale, Scalar sigma, DlBlurStyle style)
static sk_sp< DisplayList > MaskBlurVariantTest(const AiksTest &test_context, const MaskBlurTestConfig &config)
Point DrawPlaygroundPoint(PlaygroundPoint &point)
std::tuple< Point, Point > DrawPlaygroundLine(PlaygroundPoint &point_a, PlaygroundPoint &point_b)
std::shared_ptr< Texture > DisplayListToTexture(const sk_sp< flutter::DisplayList > &display_list, ISize size, AiksContext &context, bool reset_host_buffer, bool generate_mips, std::optional< PixelFormat > target_pixel_format)
Render the provided display list to a texture with the given size.
static constexpr DlColor kMagenta()
static constexpr DlColor kWhite()
static constexpr DlColor kBlue()
static constexpr DlColor kDarkMagenta()
static constexpr DlColor RGBA(DlScalar r, DlScalar g, DlScalar b, DlScalar a)
Construct a 32 bit color from floating point R, G, B, and A color channels.
static constexpr DlColor kCrimson()
static constexpr DlColor kMaroon()
static constexpr DlColor kYellow()
static constexpr DlColor kPurple()
static constexpr DlColor kChartreuse()
static constexpr DlColor kCornflowerBlue()
static constexpr DlColor kDarkGreen()
static constexpr DlColor kRed()
static constexpr DlColor kGreen()
static constexpr DlColor kOrange()
static constexpr DlColor kLimeGreen()
static constexpr DlColor kOrangeRed()
static constexpr DlColor kGreenYellow()
static constexpr Color White()
static constexpr Color Red()
static constexpr Color AntiqueWhite()
static constexpr Color Green()
static constexpr Matrix MakeTranslation(const Vector3 &t)
static constexpr Matrix MakeScale(const Vector3 &s)
For convolution filters, the "radius" is the size of the convolution kernel to use on the local space...
static RoundRect MakeRectXY(const Rect &rect, Scalar x_radius, Scalar y_radius)
In filters that use Gaussian distributions, "sigma" is a size of one standard deviation in terms of t...
static constexpr TRect MakeEllipseBounds(const TPoint< Type > ¢er, const TSize< Type > &radii)
static constexpr TRect MakeXYWH(Type x, Type y, Type width, Type height)
static constexpr TRect MakeCircleBounds(const TPoint< Type > ¢er, Type radius)
static constexpr TRect MakeLTRB(Type left, Type top, Type right, Type bottom)
std::shared_ptr< DlImageFilter > image_filter