Lines Matching refs:paint

47 static SkTypeface::Encoding paint2encoding(const SkPaint& paint) {  in paint2encoding()  argument
48 SkPaint::TextEncoding enc = paint.getTextEncoding(); in paint2encoding()
82 SkPaint paint; in DEF_TEST() local
83 paint.setTypeface(SkTypeface::RefDefault())->unref(); in DEF_TEST()
84 SkTypeface* face = paint.getTypeface(); in DEF_TEST()
95 paint.setTextEncoding(gRec[k].fEncoding); in DEF_TEST()
101 bool contains = paint.containsText(dst, len); in DEF_TEST()
102 int nglyphs = paint.textToGlyphs(dst, len, glyphs0); in DEF_TEST()
103 int first = face->charsToGlyphs(dst, paint2encoding(paint), glyphs1, NGLYPHS); in DEF_TEST()
142 SkPaint paint; in DEF_TEST() local
144 paint.setStyle(SkPaint::kStrokeAndFill_Style); in DEF_TEST()
145 paint.setTextAlign(SkPaint::kLeft_Align); in DEF_TEST()
146 paint.setStrokeWidth(SkIntToScalar(2)); in DEF_TEST()
150 paint.setLooper(looper)->unref(); in DEF_TEST()
153 paint.setMaskFilter(mask)->unref(); in DEF_TEST()
156 SkPaint copiedPaint = paint; in DEF_TEST()
157 REPORTER_ASSERT(reporter, paint == copiedPaint); in DEF_TEST()
160 copiedPaint = paint; in DEF_TEST()
161 REPORTER_ASSERT(reporter, paint == copiedPaint); in DEF_TEST()
165 paint.reset(); in DEF_TEST()
167 REPORTER_ASSERT(reporter, cleanPaint == paint); in DEF_TEST()
175 SkPaint paint; in DEF_TEST() local
189 paint.setStyle(SkPaint::kStroke_Style); in DEF_TEST()
190 paint.setStrokeWidth(SkIntToScalar(2)); in DEF_TEST()
191 paint.getFillPath(path, &stroke); in DEF_TEST()
195 SkScalar miter = SkMaxScalar(SK_Scalar1, paint.getStrokeMiter()); in DEF_TEST()
196 SkScalar inset = paint.getStrokeJoin() == SkPaint::kMiter_Join ? in DEF_TEST()
197 SkScalarMul(paint.getStrokeWidth(), miter) : in DEF_TEST()
198 paint.getStrokeWidth(); in DEF_TEST()
247 paint.setter(array[index]); \ in DEF_TEST()
249 SkPaint paint; in DEF_TEST() local
250 paint.setFlags(0x1234); in DEF_TEST()
261 paint.flatten(writer); in DEF_TEST()
268 REPORTER_ASSERT(reporter, paint2 == paint); in DEF_TEST()
278 SkPaint paint;
279 paint.setTextSize(12.0f);
285 paint.measureText("", 0, &r);
292 SkPaint paint;
293 paint.setColor(0x00AABBCC);
294 paint.setTextScaleX(1.0f); // Default value, ignored.
295 paint.setTextSize(19);
296 paint.setXfermode(SkXfermode::Create(SkXfermode::kModulate_Mode))->unref();
297 paint.setLooper(NULL); // Default value, ignored.
300 paint.flatten(writer);
308 ASSERT(other.getColor() == paint.getColor());
309 ASSERT(other.getTextScaleX() == paint.getTextScaleX());
310 ASSERT(other.getTextSize() == paint.getTextSize());
311 ASSERT(other.getLooper() == paint.getLooper());
316 ASSERT(paint.getXfermode()->asMode(&paintMode));
324 SkPaint paint;
325 const uint32_t defaultHash = paint.getHash();
328 paint.setColor(0xFF00FF00);
329 REPORTER_ASSERT(r, paint.getHash() != defaultHash);
330 paint.setColor(SK_ColorBLACK); // Reset to default value.
331 REPORTER_ASSERT(r, paint.getHash() == defaultHash);
334 paint.setTypeface(SkTypeface::RefDefault())->unref();
335 REPORTER_ASSERT(r, paint.getHash() != defaultHash);
336 paint.setTypeface(NULL);
337 REPORTER_ASSERT(r, paint.getHash() == defaultHash);
340 paint.setHinting(SkPaint::kSlight_Hinting);
341 REPORTER_ASSERT(r, paint.getHash() != defaultHash);
342 paint.setHinting(SkPaint::kNormal_Hinting);
343 REPORTER_ASSERT(r, paint.getHash() == defaultHash);
349 SkPaint paint;
351 REPORTER_ASSERT(r, !paint.nothingToDraw());
352 paint.setAlpha(0);
353 REPORTER_ASSERT(r, paint.nothingToDraw());
355 paint.setAlpha(0xFF);
356 paint.setXfermodeMode(SkXfermode::kDst_Mode);
357 REPORTER_ASSERT(r, paint.nothingToDraw());
359 paint.setAlpha(0);
360 paint.setXfermodeMode(SkXfermode::kSrcOver_Mode);
364 paint.setColorFilter(SkColorMatrixFilter::Create(cm))->unref();
365 REPORTER_ASSERT(r, paint.nothingToDraw());
368 paint.setColorFilter(SkColorMatrixFilter::Create(cm))->unref();
369 REPORTER_ASSERT(r, !paint.nothingToDraw());