/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/ |
D | KeyboardView.java | 173 private static void blendAlpha(@Nonnull final Paint paint, final int alpha) { in blendAlpha() argument 174 final int color = paint.getColor(); in blendAlpha() 175 paint.setARGB((paint.getAlpha() * alpha) / Constants.Color.ALPHA_OPAQUE, in blendAlpha() 287 final Paint paint = mPaint; in onDrawKeyboard() local 301 onDrawKey(key, canvas, paint); in onDrawKeyboard() 319 onDrawKey(key, canvas, paint); in onDrawKeyboard() 328 @Nonnull final Paint paint) { in onDrawKey() argument 344 onDrawKeyTopVisuals(key, canvas, paint, params); in onDrawKey() 384 @Nonnull final Paint paint, @Nonnull final KeyDrawParams params) { in onDrawKeyTopVisuals() argument 398 paint.setTypeface(key.selectTypeface(params)); in onDrawKeyTopVisuals() [all …]
|
D | MainKeyboardView.java | 805 protected void onDrawKeyTopVisuals(final Key key, final Canvas canvas, final Paint paint, in onDrawKeyTopVisuals() argument 810 super.onDrawKeyTopVisuals(key, canvas, paint, params); in onDrawKeyTopVisuals() 815 drawLanguageOnSpacebar(key, canvas, paint); in onDrawKeyTopVisuals() 819 drawKeyPopupHint(key, canvas, paint, params); in onDrawKeyTopVisuals() 822 drawKeyPopupHint(key, canvas, paint, params); in onDrawKeyTopVisuals() 826 private boolean fitsTextIntoWidth(final int width, final String text, final Paint paint) { in fitsTextIntoWidth() argument 828 paint.setTextScaleX(1.0f); in fitsTextIntoWidth() 829 final float textWidth = TypefaceUtils.getStringWidth(text, paint); in fitsTextIntoWidth() 839 paint.setTextScaleX(scaleX); in fitsTextIntoWidth() 840 return TypefaceUtils.getStringWidth(text, paint) < maxTextWidth; in fitsTextIntoWidth() [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/filters/ |
D | ImageFilterDraw.java | 91 public void paint(FilterDrawRepresentation.StrokeData sd, Canvas canvas, Matrix toScrMatrix, in paint() method 109 public void paint(FilterDrawRepresentation.StrokeData sd, Canvas canvas, Matrix toScrMatrix, in paint() method in ImageFilterDraw.SimpleDraw 117 Paint paint = new Paint(); in paint() local 119 paint.setStyle(Style.STROKE); in paint() 121 paint.setStrokeCap(Paint.Cap.SQUARE); in paint() 123 paint.setStrokeCap(Paint.Cap.ROUND); in paint() 125 paint.setAntiAlias(true); in paint() 126 paint.setColor(sd.mColor); in paint() 127 paint.setStrokeWidth(toScrMatrix.mapRadius(sd.mRadius)); in paint() 133 canvas.drawPath(mCacheTransPath, paint); in paint() [all …]
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/ |
D | TypefaceUtils.java | 37 private static float getCharHeight(final char[] referenceChar, final Paint paint) { in getCharHeight() argument 38 final int key = getCharGeometryCacheKey(referenceChar[0], paint); in getCharHeight() 45 paint.getTextBounds(referenceChar, 0, 1, sTextHeightBounds); in getCharHeight() 57 private static float getCharWidth(final char[] referenceChar, final Paint paint) { in getCharWidth() argument 58 final int key = getCharGeometryCacheKey(referenceChar[0], paint); in getCharWidth() 65 paint.getTextBounds(referenceChar, 0, 1, sTextWidthBounds); in getCharWidth() 72 private static int getCharGeometryCacheKey(final char referenceChar, final Paint paint) { in getCharGeometryCacheKey() argument 73 final int labelSize = (int)paint.getTextSize(); in getCharGeometryCacheKey() 74 final Typeface face = paint.getTypeface(); in getCharGeometryCacheKey() 87 public static float getReferenceCharHeight(final Paint paint) { in getReferenceCharHeight() argument [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/glrenderer/ |
D | StringTexture.java | 36 private StringTexture(String text, TextPaint paint, in StringTexture() argument 40 mPaint = paint; in StringTexture() 45 TextPaint paint = new TextPaint(); in getDefaultPaint() local 46 paint.setTextSize(textSize); in getDefaultPaint() 47 paint.setAntiAlias(true); in getDefaultPaint() 48 paint.setColor(color); in getDefaultPaint() 49 paint.setShadowLayer(2f, 0f, 0f, Color.BLACK); in getDefaultPaint() 50 return paint; in getDefaultPaint() 61 TextPaint paint = getDefaultPaint(textSize, color); in newInstance() local 63 paint.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD)); in newInstance() [all …]
|
/packages/apps/Camera2/src/com/android/camera/util/ |
D | DebugBoundsRenderer.java | 32 public static void drawBounds(Canvas canvas, Paint paint, float size, Rect rect) { in drawBounds() argument 33 drawBounds(canvas, paint, size, rect.left, rect.top, rect.right, rect.bottom); in drawBounds() 40 public static void drawBounds(Canvas canvas, Paint paint, float size, RectF rect) { in drawBounds() argument 41 drawBounds(canvas, paint, size, rect.left, rect.top, rect.right, rect.bottom); in drawBounds() 48 public static void drawBounds(Canvas canvas, Paint paint, float size, float x1, float y1, in drawBounds() argument 52 canvas.drawLine(x1, y1, x1 + size, y1, paint); in drawBounds() 54 canvas.drawLine(x1, y1, x1, y1 + size, paint); in drawBounds() 58 canvas.drawLine(x2 - size, y1, x2, y1, paint); in drawBounds() 60 canvas.drawLine(x2, y1, x2, y1 + size, paint); in drawBounds() 64 canvas.drawLine(x2 - size, y2, x2, y2, paint); in drawBounds() [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/imageshow/ |
D | EclipseControl.java | 196 Paint paint = new Paint(); in paintGrayPoint() local 198 paint.setStyle(Paint.Style.FILL); in paintGrayPoint() 199 paint.setColor(Color.BLUE); in paintGrayPoint() 204 paint.setShader(g); in paintGrayPoint() 205 canvas.drawCircle(x, y, mCenterDotSize, paint); in paintGrayPoint() 213 Paint paint = new Paint(); in paintPoint() local 215 paint.setStyle(Paint.Style.FILL); in paintPoint() 216 paint.setColor(Color.BLUE); in paintPoint() 221 paint.setShader(g); in paintPoint() 222 canvas.drawCircle(x, y, mCenterDotSize, paint); in paintPoint() [all …]
|
D | ImageRedEye.java | 97 Paint paint = new Paint(); in onDraw() local 98 paint.setStyle(Style.STROKE); in onDraw() 99 paint.setColor(Color.RED); in onDraw() 100 paint.setStrokeWidth(2); in onDraw() 102 paint.setColor(Color.RED); in onDraw() 104 canvas.drawRect(drawRect, paint); in onDraw() 110 Matrix originalRotateToScreen, Paint paint) { in drawPoint() argument 117 paint.setColor(Color.BLUE); in drawPoint() 118 canvas.drawRect(fullRect, paint); in drawPoint() 120 fullRect.centerX(), fullRect.bottom, paint); in drawPoint() local [all …]
|
D | Spline.java | 309 Paint paint = new Paint(); in draw() local 310 paint.setAntiAlias(true); in draw() 311 paint.setFilterBitmap(true); in draw() 312 paint.setDither(true); in draw() 313 paint.setStyle(Paint.Style.STROKE); in draw() 318 paint.setStrokeWidth(curveWidth + 2); in draw() 319 paint.setColor(Color.BLACK); in draw() 320 canvas.drawPath(path, paint); in draw() 325 paint.setStrokeWidth(3); in draw() 326 paint.setColor(Color.BLACK); in draw() [all …]
|
D | GradControl.java | 188 Paint paint = new Paint(); in paintGrayPoint() local 189 paint.setStyle(Paint.Style.FILL); in paintGrayPoint() 192 paint.setShader(g); in paintGrayPoint() 193 canvas.drawCircle(x, y, mCenterDotSize, paint); in paintGrayPoint() 201 Paint paint = new Paint(); in paintPoint() local 202 paint.setStyle(Paint.Style.FILL); in paintPoint() 205 paint.setShader(g); in paintPoint() 206 canvas.drawCircle(x, y, mCenterDotSize, paint); in paintPoint() 229 Canvas canvas, Paint paint, float p1x, float p1y, float p2x, float p2y) { in paintOvallines() argument 233 canvas.drawLine(p1x, p1y, p2x, p2y, paint); in paintOvallines() [all …]
|
D | ImagePoint.java | 63 Paint paint = new Paint(); in onDraw() local 64 paint.setStyle(Style.STROKE); in onDraw() 65 paint.setColor(Color.RED); in onDraw() 66 paint.setStrokeWidth(2); in onDraw() 73 drawPoint(candidate, canvas, originalToScreen, originalRotateToScreen, paint); in onDraw() 80 Matrix originalRotateToScreen, Paint paint); in drawPoint() argument
|
/packages/apps/UnifiedEmail/src/com/android/mail/ui/ |
D | FolderDisplayer.java | 124 int maxFolderCount, Paint paint) { in measureFolderDimen() argument 145 final int neededWidth = (int) paint.measureText(folderString) + in measureFolderDimen() 185 Paint paint) { in drawFolder() argument 188 res, formatter, paint); in drawFolder() 193 BidiFormatter formatter, Paint paint) { in drawFolder() argument 198 paint.setColor(bgColor); in drawFolder() 199 paint.setStyle(Paint.Style.FILL); in drawFolder() 202 paint); in drawFolder() 205 paint.setColor(fgColor); in drawFolder() 206 paint.setStyle(Paint.Style.FILL); in drawFolder() [all …]
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/internal/ |
D | GestureTrailDrawingPoints.java | 157 public boolean drawGestureTrail(final Canvas canvas, final Paint paint, in drawGestureTrail() argument 160 return drawGestureTrailLocked(canvas, paint, outBoundsRect, params); in drawGestureTrail() 164 private boolean drawGestureTrailLocked(final Canvas canvas, final Paint paint, in drawGestureTrailLocked() argument 189 paint.setColor(params.mTrailColor); in drawGestureTrailLocked() 190 paint.setStyle(Paint.Style.FILL); in drawGestureTrailLocked() 210 paint.setShadowLayer(shadow2, 0.0f, 0.0f, params.mTrailColor); in drawGestureTrailLocked() 217 paint.setAlpha(alpha); in drawGestureTrailLocked() 218 canvas.drawPath(path, paint); in drawGestureTrailLocked() 226 debugDrawPoints(canvas, startIndex, trailSize, paint); in drawGestureTrailLocked() 256 final Paint paint) { in debugDrawPoints() argument [all …]
|
/packages/apps/Messaging/src/com/android/messaging/datamodel/media/ |
D | SimSelectorAvatarRequest.java | 78 final Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG); in renderSimAvatarInternal() local 87 paint.setColorFilter(new PorterDuffColorFilter(simColor, PorterDuff.Mode.SRC_ATOP)); in renderSimAvatarInternal() 88 paint.setAlpha(0xff); in renderSimAvatarInternal() 90 halfHeight - sRegularSimIcon.getHeight() / 2, paint); in renderSimAvatarInternal() 91 paint.setColorFilter(null); in renderSimAvatarInternal() 92 paint.setAlpha(0xff); in renderSimAvatarInternal() 95 paint.setTypeface(Typeface.create("sans-serif", Typeface.NORMAL)); in renderSimAvatarInternal() 96 paint.setColor(textColor); in renderSimAvatarInternal() 99 paint.setTextSize(letterToTileRatio * minOfWidthAndHeight); in renderSimAvatarInternal() 103 paint.getTextBounds(firstCharString, 0, 1, textBound); in renderSimAvatarInternal() [all …]
|
D | AvatarRequest.java | 145 final Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG); in renderDefaultAvatar() local 151 canvas.drawBitmap(defaultPerson, matrix, paint); in renderDefaultAvatar() 163 final Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG); in renderLetterTile() local 164 paint.setTypeface(Typeface.create("sans-serif-thin", Typeface.NORMAL)); in renderLetterTile() 165 paint.setColor(resources.getColor(R.color.letter_tile_font_color)); in renderLetterTile() 167 paint.setTextSize(letterToTileRatio * minOfWidthAndHeight); in renderLetterTile() 171 paint.getTextBounds(firstCharString, 0, 1, textBound); in renderLetterTile() 176 canvas.drawText(firstCharString, xOffset, yOffset, paint); in renderLetterTile()
|
/packages/apps/Camera2/src/com/android/camera/ui/focus/ |
D | FocusRingView.java | 64 Paint paint = makePaint(res, R.color.focus_color); in FocusRingView() local 73 mAutoFocusRing = new AutoFocusRing(mAnimator, paint, in FocusRingView() 76 mManualFocusRing = new ManualFocusRing(mAnimator, paint, in FocusRingView() 206 Paint paint = new Paint(); in makePaint() local 207 paint.setAntiAlias(true); in makePaint() 208 paint.setColor(res.getColor(color)); in makePaint() 209 paint.setStyle(Paint.Style.STROKE); in makePaint() 210 paint.setStrokeCap(Paint.Cap.ROUND); in makePaint() 211 paint.setStrokeWidth(res.getDimension(R.dimen.focus_circle_stroke)); in makePaint() 212 return paint; in makePaint()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/suggestions/ |
D | SuggestionStripLayoutHelper.java | 182 final Paint paint = new Paint(); in getMoreSuggestionsHint() local 183 paint.setAntiAlias(true); in getMoreSuggestionsHint() 184 paint.setTextAlign(Align.CENTER); in getMoreSuggestionsHint() 185 paint.setTextSize(textSize); in getMoreSuggestionsHint() 186 paint.setColor(color); in getMoreSuggestionsHint() 188 paint.getTextBounds(MORE_SUGGESTIONS_HINT, 0, MORE_SUGGESTIONS_HINT.length(), bounds); in getMoreSuggestionsHint() 193 canvas.drawText(MORE_SUGGESTIONS_HINT, width / 2, height, paint); in getMoreSuggestionsHint() 570 final TextPaint paint) { in getTextScaleX() argument 571 paint.setTextScaleX(1.0f); in getTextScaleX() 572 final int width = getTextWidth(text, paint); in getTextScaleX() [all …]
|
/packages/apps/Settings/src/com/android/settings/deviceinfo/ |
D | PercentageBarChart.java | 45 public final Paint paint; field in PercentageBarChart.Entry 47 protected Entry(int order, float percentage, Paint paint) { in Entry() argument 50 this.paint = paint; in Entry() 97 canvas.drawRect(left, top, nextX, bottom, e.paint); in onDraw() 101 canvas.drawRect(lastX, top, nextX, bottom, e.paint); in onDraw() 121 canvas.drawRect(lastX, top, right, bottom, e.paint); in onDraw() 125 canvas.drawRect(lastX, top, nextX, bottom, e.paint); in onDraw()
|
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ |
D | BadgeSpan.java | 63 public int getSize(Paint paint, CharSequence text, int start, int end, FontMetricsInt fm) { in getSize() argument 65 paint.getFontMetricsInt(fm); in getSize() 69 return measureWidth(paint, text, start, end); in getSize() 72 private int measureWidth(Paint paint, CharSequence text, int start, int end) { in measureWidth() argument 73 return (int) paint.measureText(text, start, end) + 2 * mDims.getHorizontalPadding(); in measureWidth() 78 int y, int bottom, Paint paint) { in draw() argument 80 mWorkPaint.set(paint); in draw()
|
/packages/apps/Camera2/src/com/android/camera/ui/ |
D | ProgressRenderer.java | 118 Paint paint = new Paint(); in createProgressPaint() local 119 paint.setAntiAlias(true); in createProgressPaint() 121 paint.setColor(Color.argb((int) (alpha * 255), 255, 255, 255)); in createProgressPaint() 122 paint.setStrokeWidth(width); in createProgressPaint() 123 paint.setStyle(Paint.Style.STROKE); in createProgressPaint() 124 return paint; in createProgressPaint()
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/ui/ |
D | SelectionRenderer.java | 25 int stroke, Paint paint) { in drawSelection() argument 26 canvas.drawRect(left, top, right, top + stroke, paint); in drawSelection() 27 canvas.drawRect(left, bottom - stroke, right, bottom, paint); in drawSelection() 28 canvas.drawRect(left, top, left + stroke, bottom, paint); in drawSelection() 29 canvas.drawRect(right - stroke, top, right, bottom, paint); in drawSelection()
|
/packages/apps/Settings/src/com/android/settings/widget/ |
D | ChartGridView.java | 167 final TextPaint paint = new TextPaint(Paint.ANTI_ALIAS_FLAG); in makeLabel() local 168 paint.density = res.getDisplayMetrics().density; in makeLabel() 169 paint.setCompatibilityScaling(res.getCompatibilityInfo().applicationScale); in makeLabel() 170 paint.setColor(mLabelColor); in makeLabel() 171 paint.setTextSize(mLabelSize); in makeLabel() 173 return new StaticLayout(text, paint, in makeLabel() 174 (int) Math.ceil(Layout.getDesiredWidth(text, paint)), in makeLabel()
|
/packages/apps/TV/usbtuner/src/com/android/usbtuner/cc/ |
D | CaptionWindowLayout.java | 339 Paint paint = new Paint(); in initWindow() local 340 paint.setTypeface(mCaptionStyleCompat.typeface); in initWindow() 341 paint.setTextSize(mTextSize); in initWindow() 342 float maxWindowWidth = paint.measureText(widestTextBuilder.toString()); in initWindow() 429 Paint paint = new Paint(); in updateWidestChar() local 430 paint.setTypeface(mCaptionStyleCompat.typeface); in updateWidestChar() 435 float charWidth = paint.measureText(ch); in updateWidestChar() 455 Paint paint = new Paint(); in updateTextSize() local 456 paint.setTypeface(mCaptionStyleCompat.typeface); in updateTextSize() 461 paint.setTextSize(testTextSize); in updateTextSize() [all …]
|
/packages/apps/Email/tests/src/com/android/email/ |
D | ResourceHelperTest.java | 40 Paint paint = mResourceHelper.getAccountColorPaint(accountId); in brokentestGetAccountColor() local 44 assertNotNull(paint); in brokentestGetAccountColor() 46 assertFalse(paint.equals(lastPaint)); in brokentestGetAccountColor() 49 lastPaint = paint; in brokentestGetAccountColor()
|
/packages/apps/ExactCalculator/src/com/android/calculator2/ |
D | AlignedTextView.java | 55 final Paint paint = getPaint(); in onMeasure() local 58 paint.getTextBounds(LATIN_CAPITAL_LETTER, 0, 1, mTempRect); in onMeasure() 61 (int) Math.ceil(mTempRect.top - paint.ascent())); in onMeasure() 62 mBottomPaddingOffset = Math.min(getPaddingBottom(), (int) Math.ceil(paint.descent())); in onMeasure()
|