Home
last modified time | relevance | path

Searched refs:paint (Results 1 – 25 of 54) 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.java91 Paint paint = new Paint(); in createImbalance() local
92 paint.setColor(Color.GREEN); in createImbalance()
93 canvas.drawRect(0, 0, 10, 10, paint); in createImbalance()
159 Paint paint = new Paint(); in drawPicture() local
161 paint.setColor(Color.GREEN); in drawPicture()
162 paint.setStyle(Style.FILL); in drawPicture()
163 canvas.drawRect(0, 0, TEST_WIDTH, TEST_HEIGHT, paint); in drawPicture()
165 paint.setColor(Color.RED); in drawPicture()
166 canvas.drawLine(0, 0, TEST_WIDTH, 0, paint); in drawPicture()
168 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/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 …]
DSweepTests.java53 public void modifyDrawing(Paint paint, Canvas canvas) {
54 canvas.drawBitmap(mBitmap, 0, 0, paint);
71 public void modifyDrawing(Paint paint, Canvas canvas) {
72 canvas.drawCircle(TEST_WIDTH / 2, TEST_HEIGHT / 2, TEST_HEIGHT / 2, paint);
114 Paint paint = new Paint(); in sweepModifiersForMask()
115 modifierAccessor.modifyDrawing(canvas, paint); in sweepModifiersForMask()
117 drawOp.modifyDrawing(paint, canvas); in sweepModifiersForMask()
/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()
DRectShapeTest.java66 Paint paint = new Paint(); in testDraw() local
67 paint.setStyle(Style.FILL); in testDraw()
68 paint.setColor(TEST_COLOR_1); in testDraw()
71 rectShape.draw(canvas, paint); in testDraw()
74 paint.setColor(TEST_COLOR_2); in testDraw()
75 rectShape.draw(canvas, paint); in testDraw()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DNfcTestActivity.java143 Paint paint = new Paint(); in createSampleImage() local
144 paint.setStyle(Paint.Style.FILL); in createSampleImage()
145 paint.setTextSize(TEXT_SIZE); in createSampleImage()
147 paint.getTextBounds(text, 0, text.length(), rect); in createSampleImage()
153 paint.setColor(Color.WHITE); in createSampleImage()
154 canvas.drawPaint(paint); in createSampleImage()
155 paint.setColor(Color.RED); in createSampleImage()
156 canvas.drawText(text, MARGIN - rect.left, MARGIN - rect.top, paint); in createSampleImage()
/cts/tests/tests/text/src/android/text/cts/
DBoringLayoutTest.java245 TextPaint paint = new TextPaint(); in testIsBoringString() local
246 assertNotNull(BoringLayout.isBoring("hello android", paint)); in testIsBoringString()
250 assertNotNull(BoringLayout.isBoring("hello android", paint, metrics)); in testIsBoringString()
252 assertNull(BoringLayout.isBoring("\u0590 \u0591", paint)); in testIsBoringString()
253 assertNull(BoringLayout.isBoring("hello \t android", paint)); in testIsBoringString()
254 assertNull(BoringLayout.isBoring("hello \n android", paint)); in testIsBoringString()
255 assertNull(BoringLayout.isBoring("hello \n\n\n android", paint)); in testIsBoringString()
256 assertNull(BoringLayout.isBoring("\nhello \n android\n", paint)); in testIsBoringString()
257 assertNull(BoringLayout.isBoring("hello android\n\n\n", paint)); in testIsBoringString()
265 TextPaint paint = new TextPaint(); in testIsBoring_resetsFontMetrics() local
[all …]
DTextPaintTest.java42 final Paint paint = new Paint(); in testConstructor() local
43 paint.setTextSize(42f); in testConstructor()
44 textPaint = new TextPaint(paint); in testConstructor()
45 assertEquals(paint.getTextSize(), textPaint.getTextSize()); in testConstructor()

123