Lines Matching refs:wp

625         TextPaint wp = mWorkPaint;
626 wp.set(mPaint);
655 span.updateMeasureState(wp);
670 return wp.getTextRunCursor(mChars, spanStart, spanLimit - spanStart,
673 return wp.getTextRunCursor(mText, mStart + spanStart,
679 * @param wp
681 private static void expandMetricsFromPaint(FontMetricsInt fmi, TextPaint wp) {
688 wp.getFontMetricsInt(fmi);
707 * @param wp the working paint
721 private float handleText(TextPaint wp, int start, int end,
728 expandMetricsFromPaint(fmi, wp);
740 if (needWidth || (c != null && (wp.bgColor != 0 || wp.underlineColor != 0 || runIsRtl))) {
743 ret = wp.getTextRunAdvances(mChars, start, runLen,
747 ret = wp.getTextRunAdvances(mText, delta + start,
758 if (wp.bgColor != 0) {
759 int previousColor = wp.getColor();
760 Paint.Style previousStyle = wp.getStyle();
762 wp.setColor(wp.bgColor);
763 wp.setStyle(Paint.Style.FILL);
764 c.drawRect(x, top, x + ret, bottom, wp);
766 wp.setStyle(previousStyle);
767 wp.setColor(previousColor);
770 if (wp.underlineColor != 0) {
772 float underlineTop = y + wp.baselineShift + (1.0f / 9.0f) * wp.getTextSize();
774 int previousColor = wp.getColor();
775 Paint.Style previousStyle = wp.getStyle();
776 boolean previousAntiAlias = wp.isAntiAlias();
778 wp.setStyle(Paint.Style.FILL);
779 wp.setAntiAlias(true);
781 wp.setColor(wp.underlineColor);
782 c.drawRect(x, underlineTop, x + ret, underlineTop + wp.underlineThickness, wp);
784 wp.setStyle(previousStyle);
785 wp.setColor(previousColor);
786 wp.setAntiAlias(previousAntiAlias);
789 drawTextRun(c, wp, start, end, contextStart, contextEnd, runIsRtl,
790 x, y + wp.baselineShift);
801 * @param wp the work paint
815 private float handleReplacement(ReplacementSpan replacement, TextPaint wp,
842 ret = replacement.getSize(wp, mText, textStart, textLimit, fmi);
855 x, top, y, bottom, wp);
886 TextPaint wp = mWorkPaint;
887 wp.set(mPaint);
889 expandMetricsFromPaint(fmi, wp);
895 TextPaint wp = mWorkPaint;
896 wp.set(mPaint);
898 return handleText(wp, start, mlimit, start, limit, runIsRtl, c, x, top,
912 TextPaint wp = mWorkPaint;
913 wp.set(mPaint);
932 span.updateDrawState(wp);
937 x += handleReplacement(replacement, wp, i, mlimit, runIsRtl, c, x, top, y,
946 wp.set(mPaint);
953 span.updateDrawState(wp);
956 x += handleText(wp, j, jnext, i, inext, runIsRtl, c, x,
968 * @param wp the paint used to render the text
977 private void drawTextRun(Canvas c, TextPaint wp, int start, int end,
985 x, y, flags, wp);
989 delta + contextStart, delta + contextEnd, x, y, flags, wp);
1011 TextPaint wp = mWorkPaint;
1012 wp.set(mPaint);
1014 span.updateMeasureState(wp);
1016 return wp.ascent();