Home
last modified time | relevance | path

Searched refs:paint (Results 1 – 25 of 96) sorted by relevance

1234

/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/
DKeyboardView.java173 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 …]
DMainKeyboardView.java805 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/
DImageFilterDraw.java91 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/
DTypefaceUtils.java37 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/filtershow/imageshow/
DEclipseControl.java196 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 …]
DImageRedEye.java97 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 …]
DSpline.java309 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 …]
DGradControl.java188 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 …]
/packages/apps/Gallery2/src/com/android/gallery3d/glrenderer/
DStringTexture.java36 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/
DDebugBoundsRenderer.java32 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/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/internal/
DGestureTrailDrawingPoints.java157 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/Dialer/java/com/android/dialer/lettertile/
DLetterTileDrawable.java91 private final Paint paint = new Paint(); field in LetterTileDrawable
132 paint.setTypeface(Typeface.create("sans-serif-medium", Typeface.NORMAL)); in LetterTileDrawable()
133 paint.setTextAlign(Align.CENTER); in LetterTileDrawable()
134 paint.setAntiAlias(true); in LetterTileDrawable()
135 paint.setFilterBitmap(true); in LetterTileDrawable()
136 paint.setDither(true); in LetterTileDrawable()
200 paint.setColor(color); in drawLetterTile()
206 canvas.drawCircle(bounds.centerX(), bounds.centerY(), minDimension / 2, paint); in drawLetterTile() local
208 canvas.drawRect(bounds, paint); in drawLetterTile()
217 paint.setTextSize(scale * letterToTileRatio * minDimension); in drawLetterTile()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/graphics/
DDragPreviewProvider.java231 final Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG); in run() local
235 paint.setMaskFilter(new BlurMaskFilter(blurSizeOutline, BlurMaskFilter.Blur.OUTER)); in run()
237 Bitmap thickOuterBlur = preview.extractAlpha(paint, outerBlurOffset); in run()
239 paint.setMaskFilter(new BlurMaskFilter( in run()
243 Bitmap brightOutline = preview.extractAlpha(paint, brightOutlineOffset); in run()
248 paint.setMaskFilter(new BlurMaskFilter(blurSizeOutline, BlurMaskFilter.Blur.NORMAL)); in run()
250 Bitmap thickInnerBlur = preview.extractAlpha(paint, thickInnerBlurOffset); in run()
253 paint.setMaskFilter(null); in run()
254 paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_OUT)); in run()
257 -thickInnerBlurOffset[1], paint); in run()
[all …]
DTintedDrawableSpan.java41 public int getSize(Paint paint, CharSequence text, int start, int end, FontMetricsInt fm) { in getSize() argument
42 fm = fm == null ? paint.getFontMetricsInt() : fm; in getSize()
45 return super.getSize(paint, text, start, end, fm); in getSize()
50 int start, int end, float x, int top, int y, int bottom, Paint paint) { in draw() argument
51 int color = paint.getColor(); in draw()
56 super.draw(canvas, text, start, end, x, top, y, bottom, paint); in draw()
/packages/apps/Messaging/src/com/android/messaging/datamodel/media/
DSimSelectorAvatarRequest.java78 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 …]
DAvatarRequest.java145 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-medium", 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/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/suggestions/
DSuggestionStripLayoutHelper.java182 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/Car/Dialer/src/com/android/car/dialer/ui/view/
DScaleSpan.java46 public int getSize(Paint paint, CharSequence text, int start, int end, in getSize() argument
51 TextPaint textPaint = new TextPaint(paint); in getSize()
52 textPaint.setTextSize(Math.max(mStartTextSize, paint.getTextSize())); in getSize()
60 int bottom, Paint paint) { in draw() argument
62 paint.getTextBounds(text, start, end, targetRect); in draw()
64 paint.setTextSize(mTextSize); in draw()
66 paint.getTextBounds(text, start, end, currentRect); in draw()
69 canvas.drawText(text.subSequence(start, end).toString(), x, y + yShift, paint); in draw() local
/packages/apps/Camera2/src/com/android/camera/ui/focus/
DFocusRingView.java64 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/apps/DocumentsUI/src/com/android/documentsui/
DDragShadowBuilder.java41 private Paint paint; field in DragShadowBuilder
54 mShadowView.setLayerType(View.LAYER_TYPE_SOFTWARE, paint); in DragShadowBuilder()
55 paint = new Paint(Paint.ANTI_ALIAS_FLAG); in DragShadowBuilder()
76 paint.setColor(Color.TRANSPARENT); in onDrawShadow()
79 paint.setShadowLayer(mShadowRadius, 0, 0, Color.argb(opacity, 0, 0, 0)); in onDrawShadow()
81 r.bottom - mPadding, paint); in onDrawShadow()
84 paint.setShadowLayer(mShadowRadius, 0, mShadowRadius, Color.argb(opacity, 0, 0, 0)); in onDrawShadow()
86 r.bottom - mPadding, paint); in onDrawShadow()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/deviceinfo/
DPercentageBarChart.java45 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/Settings/src/com/android/settings/deviceinfo/
DPercentageBarChart.java45 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/Car/LatinIME/src/com/android/inputmethod/latin/car/
DKeyboardView.java739 final Paint paint = mPaint; in onBufferDraw()
748 paint.setColor(mKeyTextColorPrimary); in onBufferDraw()
767 paint.setColor(mBackgroundColor); in onBufferDraw()
775 getHeight(), paint); in onBufferDraw()
807 paint.setColor(mKeyTextColorPrimary); in onBufferDraw()
809 paint.setColor(mKeyTextColorSecondary); in onBufferDraw()
813 paint.setTextSize(mLabelTextSize); in onBufferDraw()
815 paint.setTextSize(mKeyPunctuationSize); in onBufferDraw()
817 paint.setTextSize(mKeyTextSize); in onBufferDraw()
827 paint.setAlpha(alpha); in onBufferDraw()
[all …]
/packages/apps/TV/tuner/src/com/android/tv/tuner/cc/
DCaptionWindowLayout.java409 Paint paint = new Paint(); in initWindow() local
411 paint.setTypeface(mCaptionStyleCompat.typeface); in initWindow()
413 paint.setTextSize(mTextSize); in initWindow()
414 float maxWindowWidth = paint.measureText(widestTextBuilder.toString()); in initWindow()
519 Paint paint = new Paint(); in updateWidestChar() local
521 paint.setTypeface(mCaptionStyleCompat.typeface); in updateWidestChar()
527 float charWidth = paint.measureText(ch); in updateWidestChar()
568 Paint paint = new Paint(); in updateTextSize() local
570 paint.setTypeface(mCaptionStyleCompat.typeface); in updateTextSize()
577 paint.setTextSize(testTextSize); in updateTextSize()
[all …]
/packages/apps/Camera2/src/com/android/camera/ui/
DProgressRenderer.java118 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()

1234