Home
last modified time | relevance | path

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

12

/cts/tests/tests/graphics/src/android/graphics/cts/
DLightingColorFilterTest.java37 Paint paint = new Paint(); in testLightingColorFilter() local
39 paint.setColor(Color.MAGENTA); in testLightingColorFilter()
40 paint.setColorFilter(new LightingColorFilter(Color.WHITE, Color.BLACK)); in testLightingColorFilter()
41 canvas.drawPaint(paint); in testLightingColorFilter()
44 paint.setColor(Color.MAGENTA); in testLightingColorFilter()
45 paint.setColorFilter(new LightingColorFilter(Color.CYAN, Color.BLACK)); in testLightingColorFilter()
46 canvas.drawPaint(paint); in testLightingColorFilter()
49 paint.setColor(Color.MAGENTA); in testLightingColorFilter()
50 paint.setColorFilter(new LightingColorFilter(Color.BLUE, Color.GREEN)); in testLightingColorFilter()
51 canvas.drawPaint(paint); in testLightingColorFilter()
[all …]
DColorMatrixColorFilterTest.java46 Paint paint = new Paint(); in testColorMatrixColorFilter() local
47 paint.setColor(Color.BLUE); in testColorMatrixColorFilter()
48 paint.setColorFilter(filter); in testColorMatrixColorFilter()
49 canvas.drawPoint(0, 0, paint); in testColorMatrixColorFilter()
51 paint.setColor(Color.GREEN); in testColorMatrixColorFilter()
52 canvas.drawPoint(0, 0, paint); in testColorMatrixColorFilter()
54 paint.setColor(Color.RED); in testColorMatrixColorFilter()
55 canvas.drawPoint(0, 0, paint); in testColorMatrixColorFilter()
58 paint.setColor(Color.MAGENTA); in testColorMatrixColorFilter()
59 canvas.drawPoint(0, 0, paint); in testColorMatrixColorFilter()
[all …]
DDiscretePathEffectTest.java45 Paint paint = new Paint(); in testDiscretePathEffect() local
46 paint.setColor(Color.GREEN); in testDiscretePathEffect()
47 paint.setStyle(Style.STROKE); in testDiscretePathEffect()
48 paint.setStrokeWidth(0); in testDiscretePathEffect()
49 paint.setPathEffect(effect); in testDiscretePathEffect()
59 canvas.drawPath(path, paint); in testDiscretePathEffect()
62 paint = new Paint(); in testDiscretePathEffect()
63 paint.setColor(Color.RED); in testDiscretePathEffect()
64 paint.setStyle(Style.STROKE); in testDiscretePathEffect()
65 paint.setStrokeWidth(0); in testDiscretePathEffect()
[all …]
DComposePathEffectTest.java55 Paint paint = makePaint(); in testComposePathEffect() local
56 paint.setPathEffect(composedEffect); in testComposePathEffect()
57 canvas.drawPath(path, paint); in testComposePathEffect()
61 paint = makePaint(); in testComposePathEffect()
62 paint.setPathEffect(expectedEffect); in testComposePathEffect()
63 canvas.drawPath(path, paint); in testComposePathEffect()
73 Paint paint = new Paint(); in makePaint() local
74 paint.setColor(Color.GREEN); in makePaint()
75 paint.setStyle(Paint.Style.STROKE); in makePaint()
76 paint.setStrokeWidth(0); in makePaint()
[all …]
DSumPathEffectTest.java50 Paint paint = new Paint(); in testSumPathEffect() local
51 paint.setColor(Color.GREEN); in testSumPathEffect()
52 paint.setPathEffect(first); in testSumPathEffect()
53 paint.setStyle(Paint.Style.STROKE); in testSumPathEffect()
54 paint.setStrokeWidth(0); // 1-pixel hairline in testSumPathEffect()
55 canvas.drawPath(path, paint); in testSumPathEffect()
58 paint.setPathEffect(second); in testSumPathEffect()
59 canvas.drawPath(path, paint); in testSumPathEffect()
62 paint.setPathEffect(sumPathEffect); in testSumPathEffect()
64 canvas.drawPath(path, paint); in testSumPathEffect()
DPictureTest.java77 Paint paint = new Paint(); in drawPicture() local
79 paint.setColor(Color.GREEN); in drawPicture()
80 paint.setStyle(Style.FILL); in drawPicture()
81 canvas.drawRect(0, 0, TEST_WIDTH, TEST_HEIGHT, paint); in drawPicture()
83 paint.setColor(Color.RED); in drawPicture()
84 canvas.drawLine(0, 0, TEST_WIDTH, 0, paint); in drawPicture()
86 paint.setColor(Color.BLUE); in drawPicture()
87 canvas.drawPoint(0, 0, paint); in drawPicture()
DDashPathEffectTest.java52 Paint paint = new Paint(); in testDashPathEffect() local
53 paint.setStyle(Style.STROKE); in testDashPathEffect()
54 paint.setStrokeWidth(0); in testDashPathEffect()
55 paint.setColor(FOREGROUND); in testDashPathEffect()
56 paint.setPathEffect(effect); in testDashPathEffect()
59 canvas.drawPath(path, paint); in testDashPathEffect()
DEmbossMaskFilterTest.java43 Paint paint = new Paint(); in testEmbossMaskFilter() local
44 paint.setMaskFilter(filter); in testEmbossMaskFilter()
45 paint.setStyle(Paint.Style.STROKE); in testEmbossMaskFilter()
46 paint.setStrokeWidth(STROKE_WIDTH); in testEmbossMaskFilter()
47 paint.setColor(Color.GRAY); in testEmbossMaskFilter()
57 c.drawPath(path, paint); in testEmbossMaskFilter()
DComposeShaderTest.java50 Paint paint = new Paint(); in testPorterDuff() local
51 paint.setShader(shader); in testPorterDuff()
52 canvas.drawPaint(paint); in testPorterDuff()
88 Paint paint = new Paint(); in testXfermode() local
89 paint.setShader(shader); in testXfermode()
90 canvas.drawPaint(paint); in testXfermode()
DBlurMaskFilterTest.java39 Paint paint = new Paint(); in testBlurMaskFilter() local
40 paint.setMaskFilter(filter); in testBlurMaskFilter()
41 paint.setColor(Color.RED); in testBlurMaskFilter()
45 canvas.drawRect(CENTER - OFFSET, CENTER - OFFSET, CENTER + OFFSET, CENTER + OFFSET, paint); in testBlurMaskFilter()
DBitmapShaderTest.java48 Paint paint = new Paint(); in testBitmapShader() local
49 paint.setShader(shader); in testBitmapShader()
55 canvas.drawPaint(paint); in testBitmapShader()
DLinearGradientTest.java66 Paint paint = new Paint();
67 paint.setShader(lg);
71 canvas.drawPaint(paint);
/cts/tests/tests/graphics/src/android/graphics/drawable/shapes/cts/
DOvalShapeTest.java46 Paint paint = new Paint(); in testDraw() local
47 paint.setStyle(Style.FILL); in testDraw()
48 paint.setColor(TEST_COLOR_1); in testDraw()
51 ovalShape.draw(canvas, paint); in testDraw()
56 paint.setColor(TEST_COLOR_2); in testDraw()
58 ovalShape.draw(canvas, paint); in testDraw()
DArcShapeTest.java51 Paint paint = new Paint(); in testDraw() local
52 paint.setStyle(Style.FILL); in testDraw()
53 paint.setColor(TEST_COLOR_1); in testDraw()
56 arcShape.draw(canvas, paint); in testDraw()
61 paint.setColor(TEST_COLOR_2); in testDraw()
64 arcShape.draw(canvas, paint); in testDraw()
DRoundRectShapeTest.java68 Paint paint = new Paint(); in testDraw() local
69 paint.setStyle(Style.FILL); in testDraw()
70 paint.setColor(TEST_COLOR_1); in testDraw()
73 roundRectShape.draw(canvas, paint); in testDraw()
77 paint.setColor(TEST_COLOR_2); in testDraw()
78 roundRectShape.draw(canvas, paint); in testDraw()
DShapeTest.java99 Paint paint = new Paint(); in testDraw() local
100 paint.setStyle(Style.FILL); in testDraw()
101 paint.setColor(TEST_COLOR_1); in testDraw()
104 shape.draw(canvas, paint); in testDraw()
107 paint.setColor(TEST_COLOR_2); in testDraw()
108 shape.draw(canvas, paint); in testDraw()
116 public void draw(Canvas canvas, Paint paint) { in draw() argument
DPathShapeTest.java57 Paint paint = new Paint(); in testDraw() local
58 paint.setStyle(Style.FILL); in testDraw()
59 paint.setColor(TEST_COLOR_1); in testDraw()
62 pathShape.draw(canvas, paint); in testDraw()
66 paint.setColor(TEST_COLOR_2); in testDraw()
69 pathShape.draw(canvas, paint); in testDraw()
DRectShapeTest.java53 Paint paint = new Paint(); in testDraw() local
54 paint.setStyle(Style.FILL); in testDraw()
55 paint.setColor(TEST_COLOR_1); in testDraw()
58 rectShape.draw(canvas, paint); in testDraw()
61 paint.setColor(TEST_COLOR_2); in testDraw()
62 rectShape.draw(canvas, paint); in testDraw()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/camera/fov/
DDetermineFovActivity.java216 Paint paint = new Paint(); in drawContents() local
217 paint.setColor(0xffffffff); in drawContents()
220 paint.setTextSize(textSize); in drawContents()
222 2 * textSize * (1.0f + TEXT_PADDING), paint); in drawContents()
224 textSize, textSize * (1.0f + TEXT_PADDING), paint); in drawContents()
227 paint.setColor(Color.BLACK); in drawContents()
228 paint.setStyle(Paint.Style.STROKE); in drawContents()
229 paint.setStrokeWidth(3); in drawContents()
233 canvas.drawLine(centerX, drawRect.top, centerX, drawRect.bottom, paint); in drawContents()
244 paint.setColor(Color.GREEN); in drawContents()
[all …]
/cts/tests/tests/text/src/android/text/cts/
DLayoutTest.java259 TextPaint paint = new TextPaint(); in testGetDesiredWidthRange() local
260 float widthShort = Layout.getDesiredWidth(textShort, 0, textShort.length(), paint); in testGetDesiredWidthRange()
261 float widthLonger = Layout.getDesiredWidth(textLonger, 0, textLonger.length(), paint); in testGetDesiredWidthRange()
262 float widthLongest = Layout.getDesiredWidth(textLongest, 0, textLongest.length(), paint); in testGetDesiredWidthRange()
263 float widthPartShort = Layout.getDesiredWidth(textShort, 2, textShort.length(), paint); in testGetDesiredWidthRange()
264 float widthZero = Layout.getDesiredWidth(textLonger, 5, textShort.length() - 3, paint); in testGetDesiredWidthRange()
275 TextPaint paint = new TextPaint(); in testGetDesiredWidth() local
276 float widthShort = Layout.getDesiredWidth(textShort, paint); in testGetDesiredWidth()
277 float widthLonger = Layout.getDesiredWidth(textLonger, paint); in testGetDesiredWidth()
278 float widthLongest = Layout.getDesiredWidth(textLongest, paint); in testGetDesiredWidth()
[all …]
DBoringLayoutTest.java235 TextPaint paint = new TextPaint(); in testIsBoringString() local
236 assertNotNull(BoringLayout.isBoring("hello android", paint)); in testIsBoringString()
240 assertNotNull(BoringLayout.isBoring("hello android", paint, metrics)); in testIsBoringString()
242 assertNull(BoringLayout.isBoring("\u0590 \u0591", paint)); in testIsBoringString()
243 assertNull(BoringLayout.isBoring("hello \t android", paint)); in testIsBoringString()
244 assertNull(BoringLayout.isBoring("hello \n android", paint)); in testIsBoringString()
245 assertNull(BoringLayout.isBoring("hello \n\n\n android", paint)); in testIsBoringString()
246 assertNull(BoringLayout.isBoring("\nhello \n android\n", paint)); in testIsBoringString()
247 assertNull(BoringLayout.isBoring("hello android\n\n\n", paint)); in testIsBoringString()
304 public void drawText(String text, float x, float y, Paint paint) { in drawText() argument
[all …]
/cts/tests/tests/text/src/android/text/method/cts/
DTouchTest.java61 TextPaint paint = tv.getPaint(); in testScrollTo() local
72 final int width = getTextWidth(LONG_TEXT, paint); in testScrollTo()
109 TextPaint paint = tv.getPaint(); in testOnTouchEvent() local
111 int textWidth = Math.round(paint.measureText(text)); in testOnTouchEvent()
114 textWidth = Math.round(paint.measureText(text)); in testOnTouchEvent()
184 private int getTextWidth(String str, TextPaint paint) { in getTextWidth() argument
187 paint.getTextWidths(str, widths); in getTextWidth()
/cts/tests/tests/text/src/android/text/style/cts/
DReplacementSpanTest.java43 float x, int top, int y, int bottom, Paint paint) { in draw() argument
48 public int getSize(Paint paint, CharSequence text, int start, int end, in getSize() argument
DBulletSpanTest.java60 Paint paint = new Paint(); in testDrawLeadingMargin() local
63 bulletSpan.drawLeadingMargin(canvas, paint, 10, 0, 10, 0, 20, text, 0, 0, true, null); in testDrawLeadingMargin()
/cts/tests/src/android/view/cts/
DSurfaceViewStubActivity.java181 Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG); in surfaceCreated() local
182 paint.setColor(Color.BLUE); in surfaceCreated()
183 canvas.drawRect(RECT_LEFT, RECT_TOP, RECT_RIGHT, RECT_BOTTOM, paint); in surfaceCreated()

12