Go to the source code of this file.
◆ CX
◆ CY
◆ DIMENSION
◆ DrawCaps
◆ DEF_TEST()
Definition at line 164 of file EmptyPathTest.cpp.
164 {
166}
static void test_emptydrawing(skiatest::Reporter *reporter)
◆ drawAndTest()
Definition at line 24 of file EmptyPathTest.cpp.
25 {
30
34
35 canvas.drawPath(path, p);
36
39
42 for (
size_t i = 0; i <
count; ++i) {
44 andValue &= c;
45 orValue |= c;
46 }
47
48
49 bool success = shouldDraw ? (~0
U == andValue) : (0 == orValue);
50
51 if (!success) {
52 const char* str;
53 if (shouldDraw) {
54 str = "Path expected to draw everywhere, but didn't. ";
55 } else {
56 str = "Path expected to draw nowhere, but did. ";
57 }
59 " filltype[%d] ptcount[%d]", str,
paint.getStyle(),
61 paint.isAntiAlias(), (
int)
path.getFillType(),
path.countPoints());
62
63
64 }
65}
constexpr SkColor SK_ColorTRANSPARENT
constexpr SkColor SK_ColorWHITE
void allocN32Pixels(int width, int height, bool isOpaque=false)
uint32_t * getAddr32(int x, int y) const
void eraseColor(SkColor4f) const
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
◆ iter_paint()
Definition at line 72 of file EmptyPathTest.cpp.
73 {
78 };
83 };
88 };
89 for (size_t cap = 0; cap < std::size(gCaps); ++cap) {
90 for (
size_t join = 0;
join < std::size(gJoins); ++
join) {
91 for (
size_t style = 0; style < std::size(
gStyles); ++style) {
94 continue;
95 }
96
99
100 paint.setStrokeCap(gCaps[cap]);
101 paint.setStrokeJoin(gJoins[join]);
103
104 paint.setAntiAlias(
false);
106 paint.setAntiAlias(
true);
108 }
109 }
110 }
111}
static void drawAndTest(skiatest::Reporter *reporter, const SkPath &path, const SkPaint &paint, bool shouldDraw)
@ kButt_Cap
no stroke extension
@ kStroke_Style
set to stroke geometry
@ kFill_Style
set to fill geometry
@ kStrokeAndFill_Style
sets to stroke and fill geometry
@ kMiter_Join
extends to miter limit
@ kBevel_Join
connects outside edges
SINT Vec< 2 *N, T > join(const Vec< N, T > &lo, const Vec< N, T > &hi)
static constexpr SkFontStyle gStyles[]
◆ make_C()
static void make_C |
( |
SkPath * |
path | ) |
|
|
static |
◆ make_empty()
static void make_empty |
( |
SkPath * |
| ) |
|
|
static |
◆ make_L()
static void make_L |
( |
SkPath * |
path | ) |
|
|
static |
◆ make_M()
static void make_M |
( |
SkPath * |
path | ) |
|
|
static |
◆ make_MM()
static void make_MM |
( |
SkPath * |
path | ) |
|
|
static |
◆ make_MZM()
static void make_MZM |
( |
SkPath * |
path | ) |
|
|
static |
◆ make_Q()
static void make_Q |
( |
SkPath * |
path | ) |
|
|
static |
◆ test_emptydrawing()
Definition at line 134 of file EmptyPathTest.cpp.
134 {
135 static void (*gMakeProc[])(
SkPath*) = {
137 };
143 };
144 for (int doClose = 0; doClose < 2; ++doClose) {
145 for (size_t i = 0; i < std::size(gMakeProc); ++i) {
148 if (doClose) {
150 }
151
152 bool allowCaps =
make_L == gMakeProc[i] ||
make_Q == gMakeProc[i]
155 for (size_t fill = 0; fill < std::size(gFills); ++fill) {
156 path.setFillType(gFills[fill]);
157 bool shouldDraw =
path.isInverseFillType();
159 }
160 }
161 }
162}
static void make_C(SkPath *path)
static void make_empty(SkPath *)
static void make_Q(SkPath *path)
static void make_L(SkPath *path)
static void iter_paint(skiatest::Reporter *reporter, const SkPath &path, bool shouldDraw, DrawCaps drawCaps)
static void make_M(SkPath *path)
static void make_MM(SkPath *path)
static void make_MZM(SkPath *path)
static constexpr bool SkToBool(const T &x)