/cts/tests/tests/uirendering/src/android/uirendering/cts/testinfrastructure/ |
D | DisplayModifier.java | 90 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 …]
|
/cts/tests/tests/graphics/src/android/graphics/cts/ |
D | LightingColorFilterTest.java | 48 Paint paint = new Paint(); in testLightingColorFilter() local 50 paint.setColor(Color.MAGENTA); in testLightingColorFilter() 51 paint.setColorFilter(new LightingColorFilter(Color.WHITE, Color.BLACK)); in testLightingColorFilter() 52 canvas.drawPaint(paint); in testLightingColorFilter() 55 paint.setColor(Color.MAGENTA); in testLightingColorFilter() 56 paint.setColorFilter(new LightingColorFilter(Color.CYAN, Color.BLACK)); in testLightingColorFilter() 57 canvas.drawPaint(paint); in testLightingColorFilter() 60 paint.setColor(Color.MAGENTA); in testLightingColorFilter() 61 paint.setColorFilter(new LightingColorFilter(Color.BLUE, Color.GREEN)); in testLightingColorFilter() 62 canvas.drawPaint(paint); in testLightingColorFilter() [all …]
|
D | ColorMatrixColorFilterTest.java | 55 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 …]
|
D | DiscretePathEffectTest.java | 54 Paint paint = new Paint(); in testDiscretePathEffect() local 55 paint.setColor(Color.GREEN); in testDiscretePathEffect() 56 paint.setStyle(Style.STROKE); in testDiscretePathEffect() 57 paint.setStrokeWidth(0); in testDiscretePathEffect() 58 paint.setPathEffect(effect); in testDiscretePathEffect() 68 canvas.drawPath(path, paint); in testDiscretePathEffect() 71 paint = new Paint(); in testDiscretePathEffect() 72 paint.setColor(Color.RED); in testDiscretePathEffect() 73 paint.setStyle(Style.STROKE); in testDiscretePathEffect() 74 paint.setStrokeWidth(0); in testDiscretePathEffect() [all …]
|
D | ComposePathEffectTest.java | 63 Paint paint = makePaint(); in testComposePathEffect() local 64 paint.setPathEffect(composedEffect); in testComposePathEffect() 65 canvas.drawPath(path, paint); in testComposePathEffect() 69 paint = makePaint(); in testComposePathEffect() 70 paint.setPathEffect(expectedEffect); in testComposePathEffect() 71 canvas.drawPath(path, paint); in testComposePathEffect() 81 Paint paint = new Paint(); in makePaint() local 82 paint.setColor(Color.GREEN); in makePaint() 83 paint.setStyle(Paint.Style.STROKE); in makePaint() 84 paint.setStrokeWidth(0); in makePaint() [all …]
|
D | SumPathEffectTest.java | 58 Paint paint = new Paint(); in testSumPathEffect() local 59 paint.setColor(Color.GREEN); in testSumPathEffect() 60 paint.setPathEffect(first); in testSumPathEffect() 61 paint.setStyle(Paint.Style.STROKE); in testSumPathEffect() 62 paint.setStrokeWidth(0); // 1-pixel hairline in testSumPathEffect() 63 canvas.drawPath(path, paint); in testSumPathEffect() 66 paint.setPathEffect(second); in testSumPathEffect() 67 canvas.drawPath(path, paint); in testSumPathEffect() 70 paint.setPathEffect(sumPathEffect); in testSumPathEffect() 72 canvas.drawPath(path, paint); in testSumPathEffect()
|
D | ComposeShaderTest.java | 58 Paint paint = new Paint(); in testPorterDuff() local 59 paint.setShader(shader); in testPorterDuff() 60 canvas.drawPaint(paint); in testPorterDuff() 91 Paint paint = new Paint(); in testBlendMode() local 92 paint.setShader(shader); in testBlendMode() 93 canvas.drawPaint(paint); in testBlendMode() 130 Paint paint = new Paint(); in testXfermode() local 131 paint.setShader(shader); in testXfermode() 132 canvas.drawPaint(paint); in testXfermode() 159 Paint paint = new Paint(); in testChildLocalMatrix() local [all …]
|
D | PictureTest.java | 76 Paint paint = new Paint(); in createImbalance() local 77 paint.setColor(Color.GREEN); in createImbalance() 78 canvas.drawRect(0, 0, 10, 10, paint); in createImbalance() 140 Paint paint = new Paint(); in drawPicture() local 142 paint.setColor(Color.GREEN); in drawPicture() 143 paint.setStyle(Style.FILL); in drawPicture() 144 canvas.drawRect(0, 0, TEST_WIDTH, TEST_HEIGHT, paint); in drawPicture() 146 paint.setColor(Color.RED); in drawPicture() 147 canvas.drawLine(0, 0, TEST_WIDTH, 0, paint); in drawPicture() 149 paint.setColor(Color.BLUE); in drawPicture() [all …]
|
D | BitmapShaderTest.java | 56 Paint paint = new Paint(); in testBitmapShader() local 57 paint.setShader(shader); in testBitmapShader() 63 canvas.drawPaint(paint); in testBitmapShader() 111 Paint paint = new Paint(); in testClamp() local 112 paint.setShader(shader); in testClamp() 113 canvas.drawRect(0, 0, 4, 1, paint); in testClamp() 133 Paint paint = new Paint(); in testRepeat() local 134 paint.setShader(shader); in testRepeat() 135 canvas.drawRect(0, 0, 4, 1, paint); in testRepeat() 155 Paint paint = new Paint(); in testMirror() local [all …]
|
D | TypefaceTest.java | 62 final Paint paint = new Paint(); in measureText() local 64 paint.setTextLocale(Locale.US); in measureText() 65 paint.setTypeface(typeface); in measureText() 66 return paint.measureText(text); in measureText() 649 final Paint paint = new Paint(); in testFontVariationSettings() local 650 paint.setTextSize(100); // Make 1em = 100px in testFontVariationSettings() 653 paint.setTypeface(new Typeface.Builder(am, "fonts/var_fonts/WeightEqualsEmVariableFont.ttf") in testFontVariationSettings() 655 assertEquals(0.0f, paint.measureText("a"), 0.0f); in testFontVariationSettings() 657 paint.setTypeface(new Typeface.Builder(am, "fonts/var_fonts/WeightEqualsEmVariableFont.ttf") in testFontVariationSettings() 659 assertEquals(10.0f, paint.measureText("a"), 0.0f); in testFontVariationSettings() [all …]
|
D | PaintTest.java | 872 Paint paint = new Paint(); 873 paint.setShadowLayer(10, 1, 1, 0); 874 assertEquals(10, paint.getShadowLayerRadius(), 0.0f); 875 assertEquals(1, paint.getShadowLayerDx(), 0.0f); 876 assertEquals(1, paint.getShadowLayerDy(), 0.0f); 877 assertEquals(0, paint.getShadowLayerColor()); 1892 Paint paint = new Paint(); 1895 assertEquals(Paint.START_HYPHEN_EDIT_NO_EDIT, paint.getStartHyphenEdit()); 1896 assertEquals(Paint.END_HYPHEN_EDIT_NO_EDIT, paint.getEndHyphenEdit()); 1898 paint.setStartHyphenEdit(Paint.START_HYPHEN_EDIT_INSERT_HYPHEN); [all …]
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | TextViewPrecomputedTextTest.java | 73 final TextPaint paint = new TextPaint(params.getTextPaint()); in makeDifferentParams() local 77 paint.setTextSize(paint.getTextSize() * 2.0f + 1.0f); in makeDifferentParams() 81 paint.setTextScaleX(paint.getTextScaleX() * 2.0f + 1.0f); in makeDifferentParams() 85 paint.setTextSkewX(paint.getTextSkewX() * 2.0f + 1.0f); in makeDifferentParams() 89 paint.setLetterSpacing(paint.getLetterSpacing() * 2.0f + 1.0f); in makeDifferentParams() 93 paint.setTextLocale(Locale.US.equals(paint.getTextLocale()) ? Locale.JAPAN : Locale.US); in makeDifferentParams() 96 final Typeface tf = paint.getTypeface(); in makeDifferentParams() 98 paint.setTypeface(Typeface.SERIF); in makeDifferentParams() 100 paint.setTypeface(Typeface.DEFAULT); in makeDifferentParams() 108 final String varSettings = paint.getFontVariationSettings(); in makeDifferentParams() [all …]
|
/cts/tests/tests/text/src/android/text/cts/ |
D | LayoutTest.java | 40 TextPaint paint = new TextPaint(); in testGetDesiredWidthRange() local 41 float widthShort = Layout.getDesiredWidth(textShort, 0, textShort.length(), paint); in testGetDesiredWidthRange() 42 float widthLonger = Layout.getDesiredWidth(textLonger, 0, textLonger.length(), paint); in testGetDesiredWidthRange() 43 float widthLongest = Layout.getDesiredWidth(textLongest, 0, textLongest.length(), paint); in testGetDesiredWidthRange() 44 float widthPartShort = Layout.getDesiredWidth(textShort, 2, textShort.length(), paint); in testGetDesiredWidthRange() 45 float widthZero = Layout.getDesiredWidth(textLonger, 5, textShort.length() - 3, paint); in testGetDesiredWidthRange() 57 TextPaint paint = new TextPaint(); in testGetDesiredWidth() local 58 float widthShort = Layout.getDesiredWidth(textShort, paint); in testGetDesiredWidth() 59 float widthLonger = Layout.getDesiredWidth(textLonger, paint); in testGetDesiredWidth() 60 float widthLongest = Layout.getDesiredWidth(textLongest, paint); in testGetDesiredWidth()
|
D | PrecomputedTextTest.java | 317 final TextPaint paint = new TextPaint(); in testGetWidth() local 318 paint.setTypeface(tf); in testGetWidth() 319 paint.setTextSize(1); // Make 1em = 1px in testGetWidth() 321 final Params param = new Params.Builder(paint).build(); in testGetWidth() 359 final TextPaint paint = new TextPaint(); in testGetWidth_multiStyle() local 360 paint.setTypeface(tf); in testGetWidth_multiStyle() 361 paint.setTextSize(1); // Make 1em = 1px in testGetWidth_multiStyle() 363 final Params param = new Params.Builder(paint).build(); in testGetWidth_multiStyle() 388 final TextPaint paint = new TextPaint(); in testGetWidth_multiStyle2() local 389 paint.setTypeface(tf); in testGetWidth_multiStyle2() [all …]
|
D | BoringLayoutTest.java | 251 TextPaint paint = new TextPaint(); in testIsBoringString() local 252 assertNotNull(BoringLayout.isBoring("hello android", paint)); in testIsBoringString() 256 assertNotNull(BoringLayout.isBoring("hello android", paint, metrics)); in testIsBoringString() 258 assertNull(BoringLayout.isBoring("\u0590 \u0591", paint)); in testIsBoringString() 259 assertNull(BoringLayout.isBoring("hello \t android", paint)); in testIsBoringString() 260 assertNull(BoringLayout.isBoring("hello \n android", paint)); in testIsBoringString() 261 assertNull(BoringLayout.isBoring("hello \n\n\n android", paint)); in testIsBoringString() 262 assertNull(BoringLayout.isBoring("\nhello \n android\n", paint)); in testIsBoringString() 263 assertNull(BoringLayout.isBoring("hello android\n\n\n", paint)); in testIsBoringString() 271 TextPaint paint = new TextPaint(); in testIsBoring_resetsFontMetrics() local [all …]
|
/cts/tests/tests/graphics/src/android/graphics/text/cts/ |
D | MeasuredTextTest.java | 321 public Bitmap makeBitmapFromSsb(String text, TextPaint paint, boolean isRtl) { in makeBitmapFromSsb() argument 329 0.0f /* x */, 240.0f /* y */, isRtl, paint); in makeBitmapFromSsb() 334 public Bitmap makeBitmapFromMtWithSamePaint(String text, TextPaint paint, boolean isRtl) { in makeBitmapFromMtWithSamePaint() argument 337 .appendStyleRun(paint, text.length(), isRtl) in makeBitmapFromMtWithSamePaint() 344 0.0f /* x */, 240.0f /* y */, isRtl, paint); in makeBitmapFromMtWithSamePaint() 349 public Bitmap makeBitmapFromMtWithDifferentPaint(String text, TextPaint paint, boolean isRtl) { in makeBitmapFromMtWithDifferentPaint() argument 360 0.0f /* x */, 240.0f /* y */, isRtl, paint); in makeBitmapFromMtWithDifferentPaint() 365 public Bitmap makeBitmapFromPct(String text, TextPaint paint, boolean isRtl) { in makeBitmapFromPct() argument 367 text, new PrecomputedText.Params.Builder(paint).build()); in makeBitmapFromPct() 373 0.0f /* x */, 240.0f /* y */, isRtl, paint); in makeBitmapFromPct() [all …]
|
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/ |
D | PathTests.java | 26 Paint paint = new Paint(); in testTextPathWithOffset() local 27 paint.setColor(Color.BLACK); in testTextPathWithOffset() 28 paint.setAntiAlias(true); in testTextPathWithOffset() 29 paint.setTypeface(Typeface.create("sans-serif", Typeface.NORMAL)); in testTextPathWithOffset() 30 paint.setTextSize(26); in testTextPathWithOffset() 33 paint.getTextPath(text, 0, text.length(), 0, 0, path); in testTextPathWithOffset() 35 canvas.drawPath(path, paint); in testTextPathWithOffset() 79 final Paint paint = new Paint(); in verifyPathApproximation() local 80 paint.setAntiAlias(true); in verifyPathApproximation() 81 paint.setStrokeWidth(2); in verifyPathApproximation() [all …]
|
D | PathClippingTests.java | 54 Paint paint = new Paint(); 55 paint.setAntiAlias(false); 56 paint.setColor(Color.BLUE); 57 paint.setStyle(Paint.Style.STROKE); 58 paint.setStrokeWidth(20); 59 canvas.drawCircle(30, 30, 40, paint); 182 Paint paint = new Paint(); in testTextClip() local 183 paint.setAntiAlias(true); in testTextClip() 184 paint.setTextSize(90); in testTextClip() 185 paint.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD)); in testTextClip() [all …]
|
D | GradientTests.java | 40 Paint paint = new Paint(); in testAlphaPreMultiplication() local 43 paint.setColor(Color.RED); in testAlphaPreMultiplication() 44 canvas.drawRect(0.0f, 0.0f, width, height, paint); in testAlphaPreMultiplication() 46 paint.setColor(Color.WHITE); in testAlphaPreMultiplication() 47 paint.setShader(new LinearGradient( in testAlphaPreMultiplication() 51 canvas.drawRect(0.0f, 0.0f, width, height, paint); in testAlphaPreMultiplication()
|
D | BitmapFilterTests.java | 120 final Paint paint = new Paint(filterEnum.equals(FilterEnum.ADD_FILTER) ? in runScaleTest() local 130 canvas.drawBitmap(scaleUp ? mSmallGridBitmap : mBigGridBitmap, 0, 0, paint); in runScaleTest() 166 Paint paint = new Paint(); in testDrawSnapped() local 167 paint.setFilterBitmap(true); in testDrawSnapped() 168 paint.setAntiAlias(true); in testDrawSnapped() 169 canvas.drawBitmap(sFilterTestBitmap, 4, 4, paint); in testDrawSnapped() 190 Paint paint = new Paint(); in testDrawHalfPixelFiltered() local 191 paint.setFilterBitmap(true); in testDrawHalfPixelFiltered() 192 paint.setAntiAlias(true); in testDrawHalfPixelFiltered() 193 canvas.drawBitmap(sFilterTestBitmap, 4.5f, 4.0f, paint); in testDrawHalfPixelFiltered()
|
D | ColorFilterTests.java | 43 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()
|
D | SweepTests.java | 53 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/ |
D | DetermineFovActivity.java | 216 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/style/cts/ |
D | TextAppearanceSpanTest.java | 526 final TextPaint paint = new TextPaint(); in testSameAsTextView_Typeface() local 527 paint.setTypeface(textView0.getTypeface()); in testSameAsTextView_Typeface() 530 span.updateDrawState(paint); in testSameAsTextView_Typeface() 534 assertTypefaceSame(paint.getTypeface(), textView1.getTypeface()); in testSameAsTextView_Typeface() 542 final TextPaint paint = new TextPaint(); in testSameAsTextView_TypefaceWithStyle() local 543 paint.setTypeface(textView0.getTypeface()); in testSameAsTextView_TypefaceWithStyle() 546 span.updateDrawState(paint); in testSameAsTextView_TypefaceWithStyle() 550 assertTypefaceSame(paint.getTypeface(), textView1.getTypeface()); in testSameAsTextView_TypefaceWithStyle() 558 final TextPaint paint = new TextPaint(); in testSameAsTextView_TypefaceWithWeight() local 559 paint.setTypeface(textView0.getTypeface()); in testSameAsTextView_TypefaceWithWeight() [all …]
|
/cts/tests/tests/graphics/src/android/graphics/drawable/shapes/cts/ |
D | ArcShapeTest.java | 75 Paint paint = new Paint(); in testDraw() local 76 paint.setStyle(Style.FILL); in testDraw() 77 paint.setColor(TEST_COLOR_1); in testDraw() 80 arcShape.draw(canvas, paint); in testDraw() 85 paint.setColor(TEST_COLOR_2); in testDraw() 88 arcShape.draw(canvas, paint); in testDraw()
|