Lines Matching refs:paint
24 SkPaint paint;
26 paint.setStyle(SkPaint::kStrokeAndFill_Style);
27 paint.setStrokeWidth(SkIntToScalar(2));
29 paint.setMaskFilter(SkMaskFilter::MakeBlur(kNormal_SkBlurStyle,
32 // copy the paint using the copy constructor and check they are the same
33 SkPaint copiedPaint = paint;
34 REPORTER_ASSERT(reporter, paint == copiedPaint);
36 // copy the paint using the equal operator and check they are the same
37 copiedPaint = paint;
38 REPORTER_ASSERT(reporter, paint == copiedPaint);
40 // clean the paint and check they are back to their initial states
42 paint.reset();
44 REPORTER_ASSERT(reporter, cleanPaint == paint);
52 SkPaint paint;
66 paint.setStyle(SkPaint::kStroke_Style);
67 paint.setStrokeWidth(SkIntToScalar(2));
68 paint.getFillPath(path, &stroke);
72 SkScalar miter = std::max(SK_Scalar1, paint.getStrokeMiter());
73 SkScalar inset = paint.getStrokeJoin() == SkPaint::kMiter_Join ?
74 paint.getStrokeWidth() * miter :
75 paint.getStrokeWidth();
101 paint.setter(array[index]);
103 SkPaint paint;
104 paint.setAntiAlias(true);
106 // we don't serialize hinting or encoding -- soon to be removed from paint
113 SkPaintPriv::Flatten(paint, writer);
120 REPORTER_ASSERT(reporter, paint2 == paint);
144 SkPaint paint;
145 paint.setColor(0x00AABBCC);
146 paint.setBlendMode(SkBlendMode::kModulate);
149 SkPaintPriv::Flatten(paint, writer);
159 ASSERT(other.getColor() == paint.getColor());
160 ASSERT(other.asBlendMode() == paint.asBlendMode());
166 SkPaint paint;
168 REPORTER_ASSERT(r, !paint.nothingToDraw());
169 paint.setAlpha(0);
170 REPORTER_ASSERT(r, paint.nothingToDraw());
172 paint.setAlpha(0xFF);
173 paint.setBlendMode(SkBlendMode::kDst);
174 REPORTER_ASSERT(r, paint.nothingToDraw());
176 paint.setAlpha(0);
177 paint.setBlendMode(SkBlendMode::kSrcOver);
181 paint.setColorFilter(SkColorFilters::Matrix(cm));
182 REPORTER_ASSERT(r, paint.nothingToDraw());
185 paint.setColorFilter(SkColorFilters::Matrix(cm));
186 REPORTER_ASSERT(r, !paint.nothingToDraw());