Lines Matching refs:paint
154 static void apply_shader(SkPaint* paint, int index) { in apply_shader() argument
163 paint->setRasterizer(rastBuilder.detachRasterizer())->unref(); in apply_shader()
168 …paint->setMaskFilter(SkBlurMaskFilter::CreateEmboss(dir, SK_Scalar1/4, SkIntToScalar(4), SkIntToSc… in apply_shader()
170 paint->setColor(SK_ColorBLUE); in apply_shader()
176 SkPaint paint; variable
177 paint.setAntiAlias(true);
178 sk_tool_utils::set_portable_typeface(&paint);
179 paint.setTextSize(SkIntToScalar(56));
182 SkScalar y = paint.getTextSize();
187 apply_shader(&paint, i);
192 canvas->drawText(str.c_str(), str.size(), x, y, paint);
194 y += paint.getFontSpacing();
202 SkPaint paint; variable
203 sk_tool_utils::set_portable_typeface(&paint);
204 paint.setTextSize(50);
205 paint.setStrokeWidth(5);
206 paint.setAntiAlias(true);
209 paint.setStyle(SkPaint::kFill_Style); in __anondf6bc5a10102()
210 canvas->drawText("Hello", 5, 100, 50, paint); in __anondf6bc5a10102()
211 paint.setStyle(SkPaint::kStroke_Style); in __anondf6bc5a10102()
212 canvas->drawText("Hello", 5, 100, 100, paint); in __anondf6bc5a10102()
217 paint.setUnderlineText(true);
219 paint.setUnderlineText(false);
220 paint.setStrikeThruText(true);
222 paint.setUnderlineText(true);
224 paint.setColor(SK_ColorWHITE);
225 paint.setStyle(SkPaint::kStroke_Style);
226 canvas->drawText("Hello", 5, 100, 50, paint);
227 paint.setColor(SK_ColorBLUE);
228 paint.setStyle(SkPaint::kFill_Style);
229 canvas->drawText("Hello", 5, 100, 50, paint);
254 const SkPaint& paint, SkScalar uWidth, SkTDArray<SkScalar>* intersections) { in find_intercepts() argument
257 int count = paint.getTextIntercepts(test, len, x, y, bounds, nullptr); in find_intercepts()
261 paint.getTextIntercepts(test, len, x, y, bounds, intersections->begin()); in find_intercepts()
266 SkPaint paint; variable
267 paint.setAntiAlias(true);
272 sk_tool_utils::set_portable_typeface(&paint, fam[font], SkTypeface::kNormal);
274 paint.setTextSize(textSize);
276 paint.setStrokeWidth(uWidth);
277 paint.setStyle(SkPaint::kFill_Style);
278 canvas->drawText(test, sizeof(test) - 1, textPt.fX, textPt.fY, paint);
281 find_intercepts(test, sizeof(test) - 1, textPt.fX, textPt.fY, paint, uWidth,
285 SkScalar end = paint.measureText(test, sizeof(test) - 1) + textPt.fX;
288 paint.setStyle(SkPaint::kStroke_Style);
289 canvas->drawPath(underline, paint);
297 static void find_intercepts(const char* test, size_t len, const SkPoint* pos, const SkPaint& paint, in find_intercepts() argument
301 int count = paint.getPosTextIntercepts(test, len, pos, bounds, nullptr); in find_intercepts()
305 paint.getPosTextIntercepts(test, len, pos, bounds, intersections->begin()); in find_intercepts()
310 SkPaint paint; variable
311 paint.setAntiAlias(true);
316 sk_tool_utils::set_portable_typeface(&paint, fam[font], SkTypeface::kNormal);
318 paint.setTextSize(textSize);
320 paint.setStrokeWidth(uWidth);
321 paint.setStyle(SkPaint::kFill_Style);
322 int widthCount = paint.getTextWidths(test, sizeof(test) - 1, nullptr);
325 (void) paint.getTextWidths(test, sizeof(test) - 1, widths.begin());
334 canvas->drawPosText(test, sizeof(test) - 1, pos.begin(), paint);
337 find_intercepts(test, sizeof(test) - 1, pos.begin(), paint, uWidth, &intersections);
343 paint.setStyle(SkPaint::kStroke_Style);
344 canvas->drawPath(underline, paint);
353 SkPaint paint; variable
354 paint.setAntiAlias(true);
357 sk_tool_utils::set_portable_typeface(&paint, "serif");
359 paint.setTextSize(textSize);
361 paint.setStrokeWidth(uWidth);
362 paint.setStyle(SkPaint::kFill_Style);
363 int widthCount = paint.getTextWidths(test, sizeof(test) - 1, nullptr);
366 (void) paint.getTextWidths(test, sizeof(test) - 1, widths.begin());
377 canvas->drawPosText(test, sizeof(test) - 1, pos.begin(), paint);
380 find_intercepts(test, sizeof(test) - 1, pos.begin(), paint, uWidth, &intersections);
386 paint.setStyle(SkPaint::kStroke_Style);
387 canvas->drawPath(underline, paint);