Lines Matching refs:paint
47 SkPaint paint; in DEF_TEST() local
49 paint.setStyle(SkPaint::kStrokeAndFill_Style); in DEF_TEST()
50 paint.setStrokeWidth(SkIntToScalar(2)); in DEF_TEST()
52 paint.setMaskFilter(SkMaskFilter::MakeBlur(kNormal_SkBlurStyle, in DEF_TEST()
56 SkPaint copiedPaint = paint; in DEF_TEST()
57 REPORTER_ASSERT(reporter, paint.getHash() == copiedPaint.getHash()); in DEF_TEST()
58 REPORTER_ASSERT(reporter, paint == copiedPaint); in DEF_TEST()
61 copiedPaint = paint; in DEF_TEST()
62 REPORTER_ASSERT(reporter, paint == copiedPaint); in DEF_TEST()
66 paint.reset(); in DEF_TEST()
68 REPORTER_ASSERT(reporter, cleanPaint == paint); in DEF_TEST()
76 SkPaint paint; in DEF_TEST() local
90 paint.setStyle(SkPaint::kStroke_Style); in DEF_TEST()
91 paint.setStrokeWidth(SkIntToScalar(2)); in DEF_TEST()
92 paint.getFillPath(path, &stroke); in DEF_TEST()
96 SkScalar miter = SkMaxScalar(SK_Scalar1, paint.getStrokeMiter()); in DEF_TEST()
97 SkScalar inset = paint.getStrokeJoin() == SkPaint::kMiter_Join ? in DEF_TEST()
98 paint.getStrokeWidth() * miter : in DEF_TEST()
99 paint.getStrokeWidth(); in DEF_TEST()
131 paint.setter(array[index]); in DEF_TEST()
133 SkPaint paint; in DEF_TEST() local
134 paint.setAntiAlias(true); in DEF_TEST()
144 SkPaintPriv::Flatten(paint, writer); in DEF_TEST()
152 REPORTER_ASSERT(reporter, paint2 == paint); in DEF_TEST()
176 SkPaint paint;
177 paint.setColor(0x00AABBCC);
178 paint.setBlendMode(SkBlendMode::kModulate);
181 SkPaintPriv::Flatten(paint, writer);
192 ASSERT(other.getColor() == paint.getColor());
193 ASSERT(other.getBlendMode() == paint.getBlendMode());
200 SkPaint paint;
201 const uint32_t defaultHash = paint.getHash();
204 paint.setColor(0xFF00FF00);
205 REPORTER_ASSERT(r, paint.getHash() != defaultHash);
206 paint.setColor(SK_ColorBLACK); // Reset to default value.
207 REPORTER_ASSERT(r, paint.getHash() == defaultHash);
210 paint.setBlendMode(SkBlendMode::kSrc);
211 REPORTER_ASSERT(r, paint.getHash() != defaultHash);
212 paint.setBlendMode(SkBlendMode::kSrcOver);
213 REPORTER_ASSERT(r, paint.getHash() == defaultHash);
219 SkPaint paint;
221 REPORTER_ASSERT(r, !paint.nothingToDraw());
222 paint.setAlpha(0);
223 REPORTER_ASSERT(r, paint.nothingToDraw());
225 paint.setAlpha(0xFF);
226 paint.setBlendMode(SkBlendMode::kDst);
227 REPORTER_ASSERT(r, paint.nothingToDraw());
229 paint.setAlpha(0);
230 paint.setBlendMode(SkBlendMode::kSrcOver);
234 paint.setColorFilter(SkColorFilters::Matrix(cm));
235 REPORTER_ASSERT(r, paint.nothingToDraw());
238 paint.setColorFilter(SkColorFilters::Matrix(cm));
239 REPORTER_ASSERT(r, !paint.nothingToDraw());