25#include <initializer_list>
36 static const SkMatrix kMatrices[] = {
42 for (
auto&
m : kMatrices) {
44 path.transform(
m, &xformed);
49 recreatedPath.
reset();
126 path.moveTo(0, 62.5f);
127 path.lineTo(0, 3.5f);
128 path.conicTo(0, 0, 3.5f, 0, weight);
129 path.lineTo(196.5f, 0);
130 path.conicTo(200, 0, 200, 3.5f, weight);
131 path.lineTo(200, 62.5f);
132 path.conicTo(200, 66, 196.5f, 66, weight);
133 path.lineTo(3.5f, 66);
134 path.conicTo(0, 66, 0, 62.5, weight);
139 path.moveTo(0, 81.5f);
140 path.lineTo(0, 3.5f);
141 path.conicTo(0, 0, 3.5f, 0, weight);
142 path.lineTo(149.5, 0);
143 path.conicTo(153, 0, 153, 3.5f, weight);
144 path.lineTo(153, 81.5f);
145 path.conicTo(153, 85, 149.5f, 85, weight);
146 path.lineTo(3.5f, 85);
147 path.conicTo(0, 85, 0, 81.5f, weight);
152 path.moveTo(14, 1189);
154 path.conicTo(14, 14, 21, 14, weight);
155 path.lineTo(1363, 14);
156 path.conicTo(1370, 14, 1370, 21, weight);
157 path.lineTo(1370, 1189);
158 path.conicTo(1370, 1196, 1363, 1196, weight);
159 path.lineTo(21, 1196);
160 path.conicTo(14, 1196, 14, 1189, weight);
165 path.moveTo(14, 1743);
167 path.conicTo(14, 14, 21, 14, weight);
168 path.lineTo(1363, 14);
169 path.conicTo(1370, 14, 1370, 21, weight);
170 path.lineTo(1370, 1743);
171 path.conicTo(1370, 1750, 1363, 1750, weight);
172 path.lineTo(21, 1750);
173 path.conicTo(14, 1750, 14, 1743, weight);
187 const SkRect bounds = { 3709, 3709, 3709 + 7402, 3709 + 29825 };
189 const SkVector vec[] = { { rad, rad }, { 0, rad }, { rad, rad }, { 0, rad } };
198 { 13.0f, 8.0f }, { 170.0f, 2.0 }, { 256.0f, 33554432.0 }, { 110.0f, 5.0f }
212 const SkRect bounds = { 3709, 3709, 3709 + 7402, 3709 + 29825 };
230 SkRect r = { 0, 0, 100, 100 };
233 rr.
inset(-20, -20, &rr2);
236 rr.
inset(20, 20, &rr2);
243 rr.
inset(19, 19, &rr2);
245 rr.
inset(20, 20, &rr2);
267 SkVector radii[4] = { { l, t }, { r, t }, { r,
b }, { l,
b } };
290 SkVector rr1_2_radii[4] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } };
304 SkVector rr2_2_radii[4] = { { halfPoint.
fX, halfPoint.
fY },
305 { halfPoint.
fX, halfPoint.
fY },
306 { halfPoint.
fX, halfPoint.
fY },
307 { halfPoint.
fX, halfPoint.
fY } };
321 SkVector rr3_2_radii[4] = { { 5, 5 }, { 5, 5 }, { 5, 5 }, { 5, 5 } };
338 0.926942348f, 0.642850280f, 0.529063463f, 0.587844372f,
343 SkPoint radii2[4] = { { 0, 0 }, { 0, 0 }, { 50, 50 }, { 20, 50 } };
364 SkPoint radii[4] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } };
372 SkPoint radii2[4] = { { 0, 0 }, { 20, 20 }, { 50, 50 }, { 20, 50 } };
407 SkPoint radii[4] = { { 0, 0 }, { 20, 20 }, { 50, 50 }, { 20, 50 } };
421 SkPoint radii[4] = { { 50, 100 }, { 100, 50 }, { 50, 100 }, { 100, 50 } };
431 radii[index].
set(rad, rad);
439 const float rad = 33436320;
447 for (
int i = 0;
i < 4; ++
i) {
460 const SkVector radii[4] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 100, 100 } };
sk_bzero(glyphs, sizeof(glyphs))
static void path_contains_rrect_check(skiatest::Reporter *reporter, const SkRRect &in, SkPathDirection dir, unsigned start)
static void test_round_rect_rects(skiatest::Reporter *reporter)
static const SkScalar kHeight
static void test_round_rect_ovals(skiatest::Reporter *reporter)
static void test_undetected_paths(skiatest::Reporter *reporter)
static void test_9patch_rrect(skiatest::Reporter *reporter, const SkRect &rect, SkScalar l, SkScalar t, SkScalar r, SkScalar b, bool checkRadii)
static void force_path_contains_rrect(skiatest::Reporter *reporter, SkPath &path, SkPathDirection dir, unsigned start)
static void test_tricky_radii(skiatest::Reporter *reporter)
static void path_contains_rrect_nocheck(skiatest::Reporter *reporter, const SkRRect &in, SkPathDirection dir, unsigned start)
static void test_inset(skiatest::Reporter *reporter)
static void test_round_rect_basic(skiatest::Reporter *reporter)
static const SkScalar kWidth
static void test_mix(skiatest::Reporter *reporter)
static void test_round_rect_iffy_parameters(skiatest::Reporter *reporter)
static SkRRect inner_path_contains_rrect(skiatest::Reporter *reporter, const SkRRect &in, SkPathDirection dir, unsigned start)
static void test_empty_crbug_458524(skiatest::Reporter *reporter)
static void test_skbug_3239(skiatest::Reporter *reporter)
static void set_radii(SkVector radii[4], int index, float rad)
DEF_TEST(RoundRectInPath, reporter)
static SkRRect path_contains_rrect(skiatest::Reporter *reporter, const SkPath &path, SkPathDirection *dir, unsigned *start)
static void test_round_rect_general(skiatest::Reporter *reporter)
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static float SkBits2Float(uint32_t bits)
static uint32_t SkFloat2Bits(float value)
#define REPORTER_ASSERT(r, cond,...)
ForceIsRRect_Private(SkPath *path, SkPathDirection dir, unsigned start)
static SkMatrix Scale(SkScalar sx, SkScalar sy)
static bool IsRRect(const SkPath &path, SkRRect *rrect, SkPathDirection *dir, unsigned *start)
static const uint8_t * VerbData(const SkPath &path)
static const SkScalar * ConicWeightData(const SkPath &path)
SkPath & addCircle(SkScalar x, SkScalar y, SkScalar radius, SkPathDirection dir=SkPathDirection::kCW)
SkPath & addRRect(const SkRRect &rrect, SkPathDirection dir=SkPathDirection::kCW)
@ kOval_Type
non-zero width and height filled with radii
@ kEmpty_Type
zero width or height
@ kRect_Type
non-zero width and height, and zeroed radii
void inset(SkScalar dx, SkScalar dy, SkRRect *dst) const
bool transform(const SkMatrix &matrix, SkRRect *dst) const
static SkRRect MakeRect(const SkRect &r)
void setOval(const SkRect &oval)
void setRectRadii(const SkRect &rect, const SkVector radii[4])
void setRectXY(const SkRect &rect, SkScalar xRad, SkScalar yRad)
void setNinePatch(const SkRect &rect, SkScalar leftRad, SkScalar topRad, SkScalar rightRad, SkScalar bottomRad)
void setRect(const SkRect &rect)
static float max(float r, float g, float b)
static float min(float r, float g, float b)
unsigned useCenter Optional< SkMatrix > matrix
Optional< SkRect > bounds
sk_sp< SkBlender > blender SkRect rect
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
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 to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace Enable an endless trace buffer The default is a ring buffer This is useful when very old events need to viewed For during application launch Memory usage will continue to grow indefinitely however Start app with an specific route defined on the framework flutter assets dir
void set(float x, float y)
static constexpr SkRect MakeEmpty()
constexpr float height() const
constexpr float width() const
static constexpr SkRect MakeWH(float w, float h)
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)