Home
last modified time | relevance | path

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

123

/cts/tests/tests/uirendering/src/android/uirendering/cts/testinfrastructure/
DDisplayModifier.java90 public void modifyDrawing(Paint paint, Canvas canvas) {
91 paint.setAntiAlias(true);
96 public void modifyDrawing(Paint paint, Canvas canvas) {
97 paint.setAntiAlias(false);
106 public void modifyDrawing(Paint paint, Canvas canvas) {
107 paint.setStyle(Paint.Style.FILL);
112 public void modifyDrawing(Paint paint, Canvas canvas) {
113 paint.setStyle(Paint.Style.STROKE);
118 public void modifyDrawing(Paint paint, Canvas canvas) {
119 paint.setStyle(Paint.Style.FILL_AND_STROKE);
[all …]
DCanvasClientView.java57 Paint paint = new Paint(); in onDraw() local
58 paint.setColor(Color.BLACK); in onDraw()
59 paint.setTextSize(20); in onDraw()
60 canvas.drawText(s, 200, 200, paint); in onDraw()
/cts/tests/tests/graphics/src/android/graphics/cts/
DLightingColorFilterTest.java47 Paint paint = new Paint(); in testLightingColorFilter() local
49 paint.setColor(Color.MAGENTA); in testLightingColorFilter()
50 paint.setColorFilter(new LightingColorFilter(Color.WHITE, Color.BLACK)); in testLightingColorFilter()
51 canvas.drawPaint(paint); in testLightingColorFilter()
54 paint.setColor(Color.MAGENTA); in testLightingColorFilter()
55 paint.setColorFilter(new LightingColorFilter(Color.CYAN, Color.BLACK)); in testLightingColorFilter()
56 canvas.drawPaint(paint); in testLightingColorFilter()
59 paint.setColor(Color.MAGENTA); in testLightingColorFilter()
60 paint.setColorFilter(new LightingColorFilter(Color.BLUE, Color.GREEN)); in testLightingColorFilter()
61 canvas.drawPaint(paint); in testLightingColorFilter()
[all …]
DColorMatrixColorFilterTest.java55 Paint paint = new Paint(); in testColorMatrixColorFilter() local
56 paint.setColor(Color.BLUE); in testColorMatrixColorFilter()
57 paint.setColorFilter(filter); in testColorMatrixColorFilter()
58 canvas.drawPoint(0, 0, paint); in testColorMatrixColorFilter()
60 paint.setColor(Color.GREEN); in testColorMatrixColorFilter()
61 canvas.drawPoint(0, 0, paint); in testColorMatrixColorFilter()
63 paint.setColor(Color.RED); in testColorMatrixColorFilter()
64 canvas.drawPoint(0, 0, paint); in testColorMatrixColorFilter()
67 paint.setColor(Color.MAGENTA); in testColorMatrixColorFilter()
68 canvas.drawPoint(0, 0, paint); in testColorMatrixColorFilter()
[all …]
DDiscretePathEffectTest.java53 Paint paint = new Paint(); in testDiscretePathEffect() local
54 paint.setColor(Color.GREEN); in testDiscretePathEffect()
55 paint.setStyle(Style.STROKE); in testDiscretePathEffect()
56 paint.setStrokeWidth(0); in testDiscretePathEffect()
57 paint.setPathEffect(effect); in testDiscretePathEffect()
67 canvas.drawPath(path, paint); in testDiscretePathEffect()
70 paint = new Paint(); in testDiscretePathEffect()
71 paint.setColor(Color.RED); in testDiscretePathEffect()
72 paint.setStyle(Style.STROKE); in testDiscretePathEffect()
73 paint.setStrokeWidth(0); in testDiscretePathEffect()
[all …]
DComposePathEffectTest.java64 Paint paint = makePaint(); in testComposePathEffect() local
65 paint.setPathEffect(composedEffect); in testComposePathEffect()
66 canvas.drawPath(path, paint); in testComposePathEffect()
70 paint = makePaint(); in testComposePathEffect()
71 paint.setPathEffect(expectedEffect); in testComposePathEffect()
72 canvas.drawPath(path, paint); in testComposePathEffect()
82 Paint paint = new Paint(); in makePaint() local
83 paint.setColor(Color.GREEN); in makePaint()
84 paint.setStyle(Paint.Style.STROKE); in makePaint()
85 paint.setStrokeWidth(0); in makePaint()
[all …]
DSumPathEffectTest.java57 Paint paint = new Paint(); in testSumPathEffect() local
58 paint.setColor(Color.GREEN); in testSumPathEffect()
59 paint.setPathEffect(first); in testSumPathEffect()
60 paint.setStyle(Paint.Style.STROKE); in testSumPathEffect()
61 paint.setStrokeWidth(0); // 1-pixel hairline in testSumPathEffect()
62 canvas.drawPath(path, paint); in testSumPathEffect()
65 paint.setPathEffect(second); in testSumPathEffect()
66 canvas.drawPath(path, paint); in testSumPathEffect()
69 paint.setPathEffect(sumPathEffect); in testSumPathEffect()
71 canvas.drawPath(path, paint); in testSumPathEffect()
DBitmapShaderTest.java55 Paint paint = new Paint(); in testBitmapShader() local
56 paint.setShader(shader); in testBitmapShader()
62 canvas.drawPaint(paint); in testBitmapShader()
110 Paint paint = new Paint(); in testClamp() local
111 paint.setShader(shader); in testClamp()
112 canvas.drawRect(0, 0, 4, 1, paint); in testClamp()
132 Paint paint = new Paint(); in testRepeat() local
133 paint.setShader(shader); in testRepeat()
134 canvas.drawRect(0, 0, 4, 1, paint); in testRepeat()
154 Paint paint = new Paint(); in testMirror() local
[all …]
DComposeShaderTest.java56 Paint paint = new Paint(); in testPorterDuff() local
57 paint.setShader(shader); in testPorterDuff()
58 canvas.drawPaint(paint); in testPorterDuff()
95 Paint paint = new Paint(); in testXfermode() local
96 paint.setShader(shader); in testXfermode()
97 canvas.drawPaint(paint); in testXfermode()
124 Paint paint = new Paint(); in testChildLocalMatrix() local
125 paint.setShader(composeShader); in testChildLocalMatrix()
129 canvas.drawPaint(paint); in testChildLocalMatrix()
136 canvas.drawPaint(paint); in testChildLocalMatrix()
[all …]
DPictureTest.java90 Paint paint = new Paint(); in createImbalance() local
91 paint.setColor(Color.GREEN); in createImbalance()
92 canvas.drawRect(0, 0, 10, 10, paint); in createImbalance()
165 Paint paint = new Paint(); in drawPicture() local
167 paint.setColor(Color.GREEN); in drawPicture()
168 paint.setStyle(Style.FILL); in drawPicture()
169 canvas.drawRect(0, 0, TEST_WIDTH, TEST_HEIGHT, paint); in drawPicture()
171 paint.setColor(Color.RED); in drawPicture()
172 canvas.drawLine(0, 0, TEST_WIDTH, 0, paint); in drawPicture()
174 paint.setColor(Color.BLUE); in drawPicture()
[all …]
DDashPathEffectTest.java59 Paint paint = new Paint(); in testDashPathEffect() local
60 paint.setStyle(Style.STROKE); in testDashPathEffect()
61 paint.setStrokeWidth(0); in testDashPathEffect()
62 paint.setColor(FOREGROUND); in testDashPathEffect()
63 paint.setPathEffect(effect); in testDashPathEffect()
66 canvas.drawPath(path, paint); in testDashPathEffect()
DEmbossMaskFilterTest.java51 Paint paint = new Paint(); in testEmbossMaskFilter() local
52 paint.setMaskFilter(filter); in testEmbossMaskFilter()
53 paint.setStyle(Paint.Style.STROKE); in testEmbossMaskFilter()
54 paint.setStrokeWidth(STROKE_WIDTH); in testEmbossMaskFilter()
55 paint.setColor(Color.GRAY); in testEmbossMaskFilter()
65 c.drawPath(path, paint); in testEmbossMaskFilter()
/cts/tests/tests/text/src/android/text/cts/
DLayoutTest.java39 TextPaint paint = new TextPaint(); in testGetDesiredWidthRange() local
40 float widthShort = Layout.getDesiredWidth(textShort, 0, textShort.length(), paint); in testGetDesiredWidthRange()
41 float widthLonger = Layout.getDesiredWidth(textLonger, 0, textLonger.length(), paint); in testGetDesiredWidthRange()
42 float widthLongest = Layout.getDesiredWidth(textLongest, 0, textLongest.length(), paint); in testGetDesiredWidthRange()
43 float widthPartShort = Layout.getDesiredWidth(textShort, 2, textShort.length(), paint); in testGetDesiredWidthRange()
44 float widthZero = Layout.getDesiredWidth(textLonger, 5, textShort.length() - 3, paint); in testGetDesiredWidthRange()
56 TextPaint paint = new TextPaint(); in testGetDesiredWidth() local
57 float widthShort = Layout.getDesiredWidth(textShort, paint); in testGetDesiredWidth()
58 float widthLonger = Layout.getDesiredWidth(textLonger, paint); in testGetDesiredWidth()
59 float widthLongest = Layout.getDesiredWidth(textLongest, paint); in testGetDesiredWidth()
/cts/tests/tests/widget/src/android/widget/cts/
DTextViewPrecomputedTextTest.java76 final TextPaint paint = new TextPaint(params.getTextPaint()); in makeDifferentParams() local
80 paint.setTextSize(paint.getTextSize() * 2.0f + 1.0f); in makeDifferentParams()
84 paint.setTextScaleX(paint.getTextScaleX() * 2.0f + 1.0f); in makeDifferentParams()
88 paint.setTextSkewX(paint.getTextSkewX() * 2.0f + 1.0f); in makeDifferentParams()
92 paint.setLetterSpacing(paint.getLetterSpacing() * 2.0f + 1.0f); in makeDifferentParams()
96 paint.setTextLocale(Locale.US.equals(paint.getTextLocale()) ? Locale.JAPAN : Locale.US); in makeDifferentParams()
99 final Typeface tf = paint.getTypeface(); in makeDifferentParams()
101 paint.setTypeface(Typeface.SERIF); in makeDifferentParams()
103 paint.setTypeface(Typeface.DEFAULT); in makeDifferentParams()
111 final String varSettings = paint.getFontVariationSettings(); in makeDifferentParams()
[all …]
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
DPathTests.java25 Paint paint = new Paint(); in testTextPathWithOffset() local
26 paint.setColor(Color.BLACK); in testTextPathWithOffset()
27 paint.setAntiAlias(true); in testTextPathWithOffset()
28 paint.setTypeface(Typeface.create("sans-serif", Typeface.NORMAL)); in testTextPathWithOffset()
29 paint.setTextSize(26); in testTextPathWithOffset()
32 paint.getTextPath(text, 0, text.length(), 0, 0, path); in testTextPathWithOffset()
34 canvas.drawPath(path, paint); in testTextPathWithOffset()
78 final Paint paint = new Paint(); in verifyPathApproximation() local
79 paint.setAntiAlias(true); in verifyPathApproximation()
80 paint.setStrokeWidth(2); in verifyPathApproximation()
[all …]
DGradientTests.java38 Paint paint = new Paint(); in testAlphaPreMultiplication() local
41 paint.setColor(Color.RED); in testAlphaPreMultiplication()
42 canvas.drawRect(0.0f, 0.0f, width, height, paint); in testAlphaPreMultiplication()
44 paint.setColor(Color.WHITE); in testAlphaPreMultiplication()
45 paint.setShader(new LinearGradient( in testAlphaPreMultiplication()
49 canvas.drawRect(0.0f, 0.0f, width, height, paint); in testAlphaPreMultiplication()
DPathClippingTests.java53 Paint paint = new Paint();
54 paint.setAntiAlias(false);
55 paint.setColor(Color.BLUE);
56 paint.setStyle(Paint.Style.STROKE);
57 paint.setStrokeWidth(20);
58 canvas.drawCircle(30, 30, 40, paint);
181 Paint paint = new Paint(); in testTextClip() local
182 paint.setAntiAlias(true); in testTextClip()
183 paint.setTextSize(90); in testTextClip()
184 paint.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD)); in testTextClip()
[all …]
DColorFilterTests.java43 Paint paint = new Paint(); in testColorMatrix() local
44 canvas.drawBitmap(whiteBitmap, 0, 0, paint); in testColorMatrix()
46 paint.setAntiAlias(true); in testColorMatrix()
47 paint.setColorFilter(new ColorMatrixColorFilter(new float[] { in testColorMatrix()
53 canvas.drawBitmap(whiteBitmap, 0, 0, paint); in testColorMatrix()
DSweepTests.java52 public void modifyDrawing(Paint paint, Canvas canvas) {
53 canvas.drawBitmap(mBitmap, 0, 0, paint);
70 public void modifyDrawing(Paint paint, Canvas canvas) {
71 canvas.drawCircle(TEST_WIDTH / 2, TEST_HEIGHT / 2, TEST_HEIGHT / 2, paint);
113 Paint paint = new Paint(); in sweepModifiersForMask()
114 modifierAccessor.modifyDrawing(canvas, paint); in sweepModifiersForMask()
116 drawOp.modifyDrawing(paint, canvas); in sweepModifiersForMask()
DBitmapFilterTests.java119 final Paint paint = new Paint(filterEnum.equals(FilterEnum.ADD_FILTER) ? in runScaleTest() local
129 canvas.drawBitmap(scaleUp ? mSmallGridBitmap : mBigGridBitmap, 0, 0, paint); in runScaleTest()
165 Paint paint = new Paint(); in testDrawSnapped() local
166 paint.setFilterBitmap(true); in testDrawSnapped()
167 paint.setAntiAlias(true); in testDrawSnapped()
168 canvas.drawBitmap(sFilterTestBitmap, 4, 4, paint); in testDrawSnapped()
189 Paint paint = new Paint(); in testDrawHalfPixelFiltered() local
190 paint.setFilterBitmap(true); in testDrawHalfPixelFiltered()
191 paint.setAntiAlias(true); in testDrawHalfPixelFiltered()
192 canvas.drawBitmap(sFilterTestBitmap, 4.5f, 4.0f, paint); in testDrawHalfPixelFiltered()
/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/graphics/src/android/graphics/drawable/shapes/cts/
DArcShapeTest.java74 Paint paint = new Paint(); in testDraw() local
75 paint.setStyle(Style.FILL); in testDraw()
76 paint.setColor(TEST_COLOR_1); in testDraw()
79 arcShape.draw(canvas, paint); in testDraw()
84 paint.setColor(TEST_COLOR_2); in testDraw()
87 arcShape.draw(canvas, paint); in testDraw()
DShapeTest.java112 Paint paint = new Paint(); in testDraw() local
113 paint.setStyle(Style.FILL); in testDraw()
114 paint.setColor(TEST_COLOR_1); in testDraw()
117 shape.draw(canvas, paint); in testDraw()
120 paint.setColor(TEST_COLOR_2); in testDraw()
121 shape.draw(canvas, paint); in testDraw()
138 public void draw(Canvas canvas, Paint paint) { in draw() argument
DPathShapeTest.java68 Paint paint = new Paint(); in testDraw() local
69 paint.setStyle(Style.FILL); in testDraw()
70 paint.setColor(TEST_COLOR_1); in testDraw()
73 pathShape.draw(canvas, paint); in testDraw()
77 paint.setColor(TEST_COLOR_2); in testDraw()
80 pathShape.draw(canvas, paint); in testDraw()
DOvalShapeTest.java59 Paint paint = new Paint(); in testDraw() local
60 paint.setStyle(Style.FILL); in testDraw()
61 paint.setColor(TEST_COLOR_1); in testDraw()
64 ovalShape.draw(canvas, paint); in testDraw()
69 paint.setColor(TEST_COLOR_2); in testDraw()
71 ovalShape.draw(canvas, paint); in testDraw()

123