Lines Matching defs:wp

628         TextPaint wp = mWorkPaint;
629 wp.set(mPaint);
658 span.updateMeasureState(wp);
673 return wp.getTextRunCursor(mChars, spanStart, spanLimit - spanStart,
676 return wp.getTextRunCursor(mText, mStart + spanStart,
682 * @param wp
684 private static void expandMetricsFromPaint(FontMetricsInt fmi, TextPaint wp) {
691 wp.getFontMetricsInt(fmi);
710 * @param wp the working paint
724 private float handleText(TextPaint wp, int start, int end,
731 expandMetricsFromPaint(fmi, wp);
743 if (needWidth || (c != null && (wp.bgColor != 0 || wp.underlineColor != 0 || runIsRtl))) {
745 ret = wp.getTextRunAdvances(mChars, start, runLen,
749 ret = wp.getTextRunAdvances(mText, delta + start,
760 if (wp.bgColor != 0) {
761 int previousColor = wp.getColor();
762 Paint.Style previousStyle = wp.getStyle();
764 wp.setColor(wp.bgColor);
765 wp.setStyle(Paint.Style.FILL);
766 c.drawRect(x, top, x + ret, bottom, wp);
768 wp.setStyle(previousStyle);
769 wp.setColor(previousColor);
772 if (wp.underlineColor != 0) {
774 float underlineTop = y + wp.baselineShift + (1.0f / 9.0f) * wp.getTextSize();
776 int previousColor = wp.getColor();
777 Paint.Style previousStyle = wp.getStyle();
778 boolean previousAntiAlias = wp.isAntiAlias();
780 wp.setStyle(Paint.Style.FILL);
781 wp.setAntiAlias(true);
783 wp.setColor(wp.underlineColor);
784 c.drawRect(x, underlineTop, x + ret, underlineTop + wp.underlineThickness, wp);
786 wp.setStyle(previousStyle);
787 wp.setColor(previousColor);
788 wp.setAntiAlias(previousAntiAlias);
791 drawTextRun(c, wp, start, end, contextStart, contextEnd, runIsRtl,
792 x, y + wp.baselineShift);
803 * @param wp the work paint
817 private float handleReplacement(ReplacementSpan replacement, TextPaint wp,
844 ret = replacement.getSize(wp, mText, textStart, textLimit, fmi);
857 x, top, y, bottom, wp);
888 TextPaint wp = mWorkPaint;
889 wp.set(mPaint);
891 expandMetricsFromPaint(fmi, wp);
897 TextPaint wp = mWorkPaint;
898 wp.set(mPaint);
900 return handleText(wp, start, mlimit, start, limit, runIsRtl, c, x, top,
914 TextPaint wp = mWorkPaint;
915 wp.set(mPaint);
934 span.updateDrawState(wp);
939 x += handleReplacement(replacement, wp, i, mlimit, runIsRtl, c, x, top, y,
948 wp.set(mPaint);
955 span.updateDrawState(wp);
958 x += handleText(wp, j, jnext, i, inext, runIsRtl, c, x,
970 * @param wp the paint used to render the text
979 private void drawTextRun(Canvas c, TextPaint wp, int start, int end,
986 x, y, runIsRtl, wp);
990 delta + contextStart, delta + contextEnd, x, y, runIsRtl, wp);
1012 TextPaint wp = mWorkPaint;
1013 wp.set(mPaint);
1015 span.updateMeasureState(wp);
1017 return wp.ascent();