42 for (
size_t i = 0; i <
count; ++i) {
49 bool success = shouldDraw ? (~0U == andValue) : (0 == orValue);
54 str =
"Path expected to draw everywhere, but didn't. ";
56 str =
"Path expected to draw nowhere, but did. ";
59 " filltype[%d] ptcount[%d]", str,
paint.getStyle(),
61 paint.isAntiAlias(), (
int)path.getFillType(), path.countPoints());
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) {
100 paint.setStrokeCap(gCaps[cap]);
101 paint.setStrokeJoin(gJoins[join]);
104 paint.setAntiAlias(
false);
106 paint.setAntiAlias(
true);
113#define CX (SkIntToScalar(DIMENSION) / 2)
114#define CY (SkIntToScalar(DIMENSION) / 2)
135 static void (*gMakeProc[])(
SkPath*) = {
144 for (
int doClose = 0; doClose < 2; ++doClose) {
145 for (
size_t i = 0; i < std::size(gMakeProc); ++i) {
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();
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 test_emptydrawing(skiatest::Reporter *reporter)
static void make_M(SkPath *path)
static void make_MM(SkPath *path)
static void make_MZM(SkPath *path)
static void drawAndTest(skiatest::Reporter *reporter, const SkPath &path, const SkPaint &paint, bool shouldDraw)
constexpr SkColor SK_ColorTRANSPARENT
constexpr SkColor SK_ColorWHITE
static constexpr bool SkToBool(const T &x)
#define DEF_TEST(name, reporter)
void allocN32Pixels(int width, int height, bool isOpaque=false)
uint32_t * getAddr32(int x, int y) const
void eraseColor(SkColor4f) const
void drawPath(const SkPath &path, const SkPaint &paint)
@ 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
static constexpr SkFontStyle gStyles[]