Lines Matching refs:paint

69 static void defaultSettingsForAndroid(Paint* paint) {
71 paint->setTextEncoding(Paint::kGlyphID_TextEncoding);
79 static void deletePaint(Paint* paint) {
80 delete paint;
104 Paint* paint = reinterpret_cast<Paint*>(paintHandle);
105 Paint* obj = new Paint(*paint);
140 // Don't pass through filter flag, which is no longer stored in paint's flags.
368 Paint* paint = reinterpret_cast<Paint*>(paintHandle);
369 return paint->getLetterSpacing();
373 Paint* paint = reinterpret_cast<Paint*>(paintHandle);
374 paint->setLetterSpacing(letterSpacing);
378 Paint* paint = reinterpret_cast<Paint*>(paintHandle);
380 paint->setFontFeatureSettings(std::string());
383 paint->setFontFeatureSettings(std::string(settingsChars.c_str(), settingsChars.size()));
388 Paint* paint = reinterpret_cast<Paint*>(paintHandle);
389 return paint->getHyphenEdit();
393 Paint* paint = reinterpret_cast<Paint*>(paintHandle);
394 paint->setHyphenEdit((uint32_t)hyphen);
404 Paint* paint = reinterpret_cast<Paint*>(paintHandle);
408 float saveSkewX = paint->getTextSkewX();
409 bool savefakeBold = paint->isFakeBoldText();
410 MinikinFontSkia::populateSkPaint(paint, baseFont.font, baseFont.fakery);
411 SkScalar spacing = paint->getFontMetrics(metrics);
415 paint->setTextSkewX(saveSkewX);
416 paint->setFakeBoldText(savefakeBold);
417 if (paint->getFontVariant() == VARIANT_ELEGANT) {
418 SkScalar size = paint->getTextSize();
477 static jfloat doTextAdvances(JNIEnv *env, Paint *paint, Typeface* typeface,
500 const float advance = MinikinUtils::measureText(paint, bidiFlags, typeface, text,
512 Paint* paint = reinterpret_cast<Paint*>(paintHandle);
515 jfloat result = doTextAdvances(env, paint, typeface, textArray + contextIndex,
525 Paint* paint = reinterpret_cast<Paint*>(paintHandle);
528 jfloat result = doTextAdvances(env, paint, typeface, textArray + contextStart,
535 static jint doTextRunCursor(JNIEnv *env, Paint* paint, const jchar *text, jint start,
544 Paint* paint = reinterpret_cast<Paint*>(paintHandle);
546 jint result = doTextRunCursor(env, paint, textArray, contextStart, contextCount, dir,
554 Paint* paint = reinterpret_cast<Paint*>(paintHandle);
556 jint result = doTextRunCursor(env, paint, textArray, contextStart,
564 GetTextFunctor(const Layout& layout, SkPath* path, jfloat x, jfloat y, Paint* paint,
566 : layout(layout), path(path), x(x), y(y), paint(paint), glyphs(glyphs), pos(pos) {
576 paint->getPosTextPath(glyphs + start, (end - start) << 1, pos + start, path);
578 paint->getPosTextPath(glyphs + start, (end - start) << 1, pos + start, &tmpPath);
587 Paint* paint;
593 static void getTextPath(JNIEnv* env, Paint* paint, Typeface* typeface, const jchar* text,
596 MinikinUtils::doLayout(&layout, paint, bidiFlags, typeface, text, 0, count, count);
601 x += MinikinUtils::xOffsetForTextAlign(paint, layout);
602 Paint::Align align = paint->getTextAlign();
603 paint->setTextAlign(Paint::kLeft_Align);
604 paint->setTextEncoding(Paint::kGlyphID_TextEncoding);
605 GetTextFunctor f(layout, path, x, y, paint, glyphs, pos);
606 MinikinUtils::forFontRun(layout, paint, f);
607 paint->setTextAlign(align);
615 Paint* paint = reinterpret_cast<Paint*>(paintHandle);
619 getTextPath(env, paint, typeface, textArray + index, count, bidiFlags, x, y, path);
626 Paint* paint = reinterpret_cast<Paint*>(paintHandle);
630 getTextPath(env, paint, typeface, textArray + start, end - start, bidiFlags, x, y, path);
636 Paint* paint = reinterpret_cast<Paint*>(paintHandle);
638 paint->setLooper(NULL);
642 paint->setLooper(SkBlurDrawLooper::Create((SkColor)color, sigma, dx, dy))->unref();
647 Paint* paint = reinterpret_cast<Paint*>(paintHandle);
648 return paint->getLooper() && paint->getLooper()->asABlurShadow(NULL);
651 static int breakText(JNIEnv* env, const Paint& paint, Typeface* typeface, const jchar text[],
658 MinikinUtils::measureText(&paint, bidiFlags, typeface, text, 0, count, count,
687 Paint* paint = reinterpret_cast<Paint*>(paintHandle);
705 count = breakText(env, *paint, typeface, text + index, count, maxWidth,
716 Paint* paint = reinterpret_cast<Paint*>(paintHandle);
721 count = breakText(env, *paint, typeface, text, count, maxWidth, bidiFlags, jmeasuredWidth, forwards);
727 const Paint& paint, Typeface* typeface, jint bidiFlags) {
732 MinikinUtils::doLayout(&layout, &paint, bidiFlags, typeface, text, 0, count, count);
745 const Paint* paint = reinterpret_cast<Paint*>(paintHandle);
748 doTextBounds(env, textArray + start, end - start, bounds, *paint, typeface, bidiFlags);
754 const Paint* paint = reinterpret_cast<Paint*>(paintHandle);
757 doTextBounds(env, textArray + index, count, bounds, *paint, typeface, bidiFlags);
789 const Paint* paint = reinterpret_cast<Paint*>(paintHandle);
832 MinikinUtils::doLayout(&layout, paint, bidiFlags, typeface, str.get(), 0, str.size(),
853 MinikinUtils::doLayout(&zzLayout, paint, bidiFlags, typeface, ZZ_FLAG_STR, 0, 4, 4);
863 static jfloat doRunAdvance(const Paint* paint, Typeface* typeface, const jchar buf[],
867 return MinikinUtils::measureText(paint, bidiFlags, typeface, buf, start, count,
871 MinikinUtils::measureText(paint, bidiFlags, typeface, buf, start, count, bufSize,
879 const Paint* paint = reinterpret_cast<Paint*>(paintHandle);
882 jfloat result = doRunAdvance(paint, typeface, textArray + contextStart,
889 static jint doOffsetForAdvance(const Paint* paint, Typeface* typeface, const jchar buf[],
893 MinikinUtils::measureText(paint, bidiFlags, typeface, buf, start, count, bufSize,
901 const Paint* paint = reinterpret_cast<Paint*>(paintHandle);
904 jint result = doOffsetForAdvance(paint, typeface, textArray + contextStart,