/developers/samples/android/ui/text/TextStyling-Java/app/src/androidTest/java/com/android/example/text/styling/renderer/spans/ |
D | BulletPointSpanTest.java | 30 private Canvas canvas = mock(Canvas.class); field in BulletPointSpanTest 50 span.drawLeadingMargin(canvas, paint, 0, 0, 0, 0, 0, text, 0, 0, true, in drawLeadingMarginWithoutText() 54 verifyZeroInteractions(canvas); in drawLeadingMarginWithoutText() 68 when(canvas.isHardwareAccelerated()).thenReturn(true); in drawLeadingMarginHardwareAccelerated() 71 span.drawLeadingMargin(canvas, paint, x, dir, top, 0, bottom, text, 0, 0, true, mock in drawLeadingMarginHardwareAccelerated() 75 InOrder inOrder = inOrder(canvas, paint); in drawLeadingMarginHardwareAccelerated() 78 inOrder.verify(canvas).save(); in drawLeadingMarginHardwareAccelerated() 79 inOrder.verify(canvas).translate( in drawLeadingMarginHardwareAccelerated() 82 inOrder.verify(canvas).drawPath(Matchers.any(Path.class), eq(paint)); in drawLeadingMarginHardwareAccelerated() 83 inOrder.verify(canvas).restore(); in drawLeadingMarginHardwareAccelerated() [all …]
|
/developers/samples/android/ui/text/TextStyling-Kotlin/app/src/androidTest/java/com/android/example/text/styling/renderer/spans/ |
D | BulletPointSpanTest.kt | 20 private val canvas = mock(Canvas::class.java) constant 40 span.drawLeadingMargin(canvas, paint, 0, 0, 0, 0, 0, text, 0, 0, true, in drawLeadingMarginWithoutText() 44 verifyZeroInteractions(canvas) in drawLeadingMarginWithoutText() 58 `when`(canvas.isHardwareAccelerated).thenReturn(true) in drawLeadingMarginHardwareAccelerated() 61 span.drawLeadingMargin(canvas, paint, x, dir, top, 0, bottom, text, 0, 0, true, in drawLeadingMarginHardwareAccelerated() 65 val inOrder = inOrder(canvas, paint) in drawLeadingMarginHardwareAccelerated() 68 inOrder.verify(canvas).translate( in drawLeadingMarginHardwareAccelerated() 71 inOrder.verify(canvas).drawPath(Matchers.any(Path::class.java), eq(paint)) in drawLeadingMarginHardwareAccelerated() 84 `when`(canvas.isHardwareAccelerated).thenReturn(false) in drawLeadingMarginNotHardwareAccelerated() 87 span.drawLeadingMargin(canvas, paint, x, dir, top, 0, bottom, text, 0, 0, true, in drawLeadingMarginNotHardwareAccelerated() [all …]
|
/developers/samples/android/ui/text/RoundedBackground-Kotlin/lib/src/main/java/com/android/example/text/styling/roundedbg/ |
D | TextRoundedBgRenderer.kt | 46 canvas: Canvas, in draw() 91 canvas: Canvas, in draw() 105 drawable.draw(canvas) in draw() 127 canvas: Canvas, in draw() 144 drawStart(canvas, startOffset, lineTop, lineEndOffset, lineBottom) in draw() 156 drawableMid.draw(canvas) in draw() 169 drawEnd(canvas, lineStartOffset, lineTop, endOffset, lineBottom) in draw() 181 private fun drawStart(canvas: Canvas, start: Int, top: Int, end: Int, bottom: Int) { in drawStart() 184 drawableRight.draw(canvas) in drawStart() 187 drawableLeft.draw(canvas) in drawStart() [all …]
|
D | RoundedBgTextView.kt | 52 override fun onDraw(canvas: Canvas) { in onDraw() 55 canvas.withTranslation(totalPaddingLeft.toFloat(), totalPaddingTop.toFloat()) { in onDraw() 56 textRoundedBgHelper.draw(canvas, text as Spanned, layout) in onDraw() 59 super.onDraw(canvas) in onDraw()
|
D | TextRoundedBgHelper.kt | 79 fun draw(canvas: Canvas, text: Spanned, layout: Layout) { in <lambda>() 98 renderer.draw(canvas, layout, startLine, endLine, startOffset, endOffset) in <lambda>()
|
/developers/samples/android/ui/text/TextStyling-Java/app/src/main/java/com/android/example/text/styling/renderer/spans/ |
D | BulletPointSpan.java | 53 public void drawLeadingMargin(Canvas canvas, Paint paint, int x, int dir, in drawLeadingMargin() argument 66 if (canvas.isHardwareAccelerated()) { in drawLeadingMargin() 72 canvas.save(); in drawLeadingMargin() 73 canvas.translate(gapWidth + x + dir * BULLET_RADIUS, y); in drawLeadingMargin() 74 canvas.drawPath(bulletPath, paint); in drawLeadingMargin() 75 canvas.restore(); in drawLeadingMargin() 77 canvas.drawCircle(gapWidth + x + dir * BULLET_RADIUS, y, BULLET_RADIUS, paint); in drawLeadingMargin()
|
/developers/build/prebuilts/androidtv/visual-game-controller/src/com/example/android/visualgamecontroller/ |
D | ControllerView.java | 342 protected void onDraw(Canvas canvas) { in onDraw() argument 346 canvas.drawColor(Color.BLACK); in onDraw() 347 canvas.drawRect(0, 0, getWidth(), getHeight(), mBackgroundPaint); in onDraw() 352 canvas.drawBitmap(mGradientBitmap, offset + mLeftGradient[0] in onDraw() 357 canvas.drawBitmap(mGradientBitmap, offset + mRightGradient[0] in onDraw() 362 canvas.drawColor(Color.TRANSPARENT); in onDraw() 364 canvas.drawBitmap(mRightPaddleBitmap, offset + mRightPaddle[0] in onDraw() 367 canvas.drawBitmap(mRightPaddleBitmap, offset + mRightPaddlePressed[0] in onDraw() 371 canvas.drawBitmap(mLeftPaddleBitmap, offset + mLeftPaddle[0] in onDraw() 375 canvas.drawBitmap(mLeftPaddleBitmap, offset + mLeftPaddlePressed[0] in onDraw() [all …]
|
/developers/build/prebuilts/gradle/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/watchface/ |
D | AnalogComplicationWatchFaceService.java | 586 public void onDraw(Canvas canvas, Rect bounds) { in onDraw() argument 590 drawBackground(canvas); in onDraw() 591 drawComplications(canvas, now); in onDraw() 592 drawUnreadNotificationIcon(canvas); in onDraw() 593 drawWatchFace(canvas); in onDraw() 596 private void drawUnreadNotificationIcon(Canvas canvas) { in drawUnreadNotificationIcon() argument 600 int width = canvas.getWidth(); in drawUnreadNotificationIcon() 601 int height = canvas.getHeight(); in drawUnreadNotificationIcon() 603 canvas.drawCircle(width / 2, height - 40, 10, mTickAndCirclePaint); in drawUnreadNotificationIcon() 610 canvas.drawCircle(width / 2, height - 40, 4, mSecondAndHighlightPaint); in drawUnreadNotificationIcon() [all …]
|
D | InteractiveWatchFaceService.java | 200 public void onDraw(Canvas canvas, Rect bounds) { in onDraw() argument 202 canvas.drawColor(Color.BLACK); in onDraw() 204 canvas.drawText( in onDraw() 210 canvas.drawText( in onDraw() 216 canvas.drawText( in onDraw() 222 canvas.drawText( in onDraw() 231 canvas.drawRect(mCardBounds, mPeekCardBackgroundPaint); in onDraw()
|
/developers/samples/android/wearable/wear/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/watchface/ |
D | AnalogComplicationWatchFaceService.java | 586 public void onDraw(Canvas canvas, Rect bounds) { in onDraw() argument 590 drawBackground(canvas); in onDraw() 591 drawComplications(canvas, now); in onDraw() 592 drawUnreadNotificationIcon(canvas); in onDraw() 593 drawWatchFace(canvas); in onDraw() 596 private void drawUnreadNotificationIcon(Canvas canvas) { in drawUnreadNotificationIcon() argument 600 int width = canvas.getWidth(); in drawUnreadNotificationIcon() 601 int height = canvas.getHeight(); in drawUnreadNotificationIcon() 603 canvas.drawCircle(width / 2, height - 40, 10, mTickAndCirclePaint); in drawUnreadNotificationIcon() 610 canvas.drawCircle(width / 2, height - 40, 4, mSecondAndHighlightPaint); in drawUnreadNotificationIcon() [all …]
|
D | InteractiveWatchFaceService.java | 200 public void onDraw(Canvas canvas, Rect bounds) { in onDraw() argument 202 canvas.drawColor(Color.BLACK); in onDraw() 204 canvas.drawText( in onDraw() 210 canvas.drawText( in onDraw() 216 canvas.drawText( in onDraw() 222 canvas.drawText( in onDraw() 231 canvas.drawRect(mCardBounds, mPeekCardBackgroundPaint); in onDraw()
|
/developers/build/prebuilts/gradle/BasicMultitouch/Application/src/main/java/com/example/android/basicmultitouch/ |
D | TouchDisplayView.java | 286 protected void onDraw(Canvas canvas) { in onDraw() argument 287 super.onDraw(canvas); in onDraw() 291 canvas.drawColor(BACKGROUND_ACTIVE); in onDraw() 294 canvas.drawRect(mBorderWidth, mBorderWidth, getWidth() - mBorderWidth, getHeight() in onDraw() 306 drawCircle(canvas, id, data); in onDraw() 373 protected void drawCircle(Canvas canvas, int id, TouchHistory data) { in drawCircle() argument 386 canvas.drawCircle(data.x, (data.y) - (radius / 2f), radius, in drawCircle() 393 canvas.drawCircle(p.x, p.y, mCircleHistoricalRadius, mCirclePaint); in drawCircle() 397 canvas.drawText(data.label, data.x + radius, data.y in drawCircle()
|
/developers/samples/android/input/multitouch/BasicMultitouch/Application/src/main/java/com/example/android/basicmultitouch/ |
D | TouchDisplayView.java | 286 protected void onDraw(Canvas canvas) { in onDraw() argument 287 super.onDraw(canvas); in onDraw() 291 canvas.drawColor(BACKGROUND_ACTIVE); in onDraw() 294 canvas.drawRect(mBorderWidth, mBorderWidth, getWidth() - mBorderWidth, getHeight() in onDraw() 306 drawCircle(canvas, id, data); in onDraw() 373 protected void drawCircle(Canvas canvas, int id, TouchHistory data) { in drawCircle() argument 386 canvas.drawCircle(data.x, (data.y) - (radius / 2f), radius, in drawCircle() 393 canvas.drawCircle(p.x, p.y, mCircleHistoricalRadius, mCirclePaint); in drawCircle() 397 canvas.drawText(data.label, data.x + radius, data.y in drawCircle()
|
/developers/samples/android/ui/text/TextStyling-Kotlin/app/src/main/java/com/android/example/text/styling/renderer/spans/ |
D | BulletPointSpan.kt | 55 canvas: Canvas, paint: Paint, currentMarginLocation: Int, paragraphDirection: Int, in drawLeadingMargin() 61 if (canvas.isHardwareAccelerated) { in drawLeadingMargin() 65 canvas.withTranslation( in drawLeadingMargin() 72 canvas.drawCircle( in drawLeadingMargin()
|
/developers/build/prebuilts/gradle/BasicAccessibility/Application/src/main/java/com/example/android/basicaccessibility/ |
D | DialView.java | 199 protected void onDraw(Canvas canvas) { in onDraw() argument 200 super.onDraw(canvas); in onDraw() 202 canvas.drawCircle(mWidth / 2, mHeight / 2, (float) mRadius, mDialPaint); in onDraw() 210 canvas.drawText(Integer.toString(i + 1), x, y, mTextPaint); in onDraw() 218 canvas.drawCircle(x, y, 20, mTextPaint); in onDraw()
|
/developers/samples/android/ui/accessibility/BasicAccessibility/Application/src/main/java/com/example/android/basicaccessibility/ |
D | DialView.java | 199 protected void onDraw(Canvas canvas) { in onDraw() argument 200 super.onDraw(canvas); in onDraw() 202 canvas.drawCircle(mWidth / 2, mHeight / 2, (float) mRadius, mDialPaint); in onDraw() 210 canvas.drawText(Integer.toString(i + 1), x, y, mTextPaint); in onDraw() 218 canvas.drawCircle(x, y, 20, mTextPaint); in onDraw()
|
/developers/build/prebuilts/gradle/Flashlight/Wearable/src/main/java/com/example/android/wearable/flashlight/ |
D | PartyLightView.java | 66 protected void onDraw(Canvas canvas) { in onDraw() argument 67 canvas.drawColor(mCurrentColor); in onDraw() 68 super.onDraw(canvas); in onDraw()
|
/developers/samples/android/deprecated/wearable/wear/Flashlight/Wearable/src/main/java/com/example/android/wearable/flashlight/ |
D | PartyLightView.java | 66 protected void onDraw(Canvas canvas) { in onDraw() argument 67 canvas.drawColor(mCurrentColor); in onDraw() 68 super.onDraw(canvas); in onDraw()
|
/developers/build/prebuilts/gradle/BasicTransition/Application/src/main/java/com/example/android/common/view/ |
D | SlidingTabStrip.java | 117 protected void onDraw(Canvas canvas) { in onDraw() argument 148 canvas.drawRect(left, height - mSelectedIndicatorThickness, right, in onDraw() 153 canvas.drawRect(0, height - mBottomBorderThickness, getWidth(), height, mBottomBorderPaint); in onDraw() 160 canvas.drawLine(child.getRight(), separatorTop, child.getRight(), in onDraw()
|
/developers/build/prebuilts/gradle/SwipeRefreshLayoutBasic/Application/src/main/java/com/example/android/common/view/ |
D | SlidingTabStrip.java | 117 protected void onDraw(Canvas canvas) { in onDraw() argument 148 canvas.drawRect(left, height - mSelectedIndicatorThickness, right, in onDraw() 153 canvas.drawRect(0, height - mBottomBorderThickness, getWidth(), height, mBottomBorderPaint); in onDraw() 160 canvas.drawLine(child.getRight(), separatorTop, child.getRight(), in onDraw()
|
/developers/build/prebuilts/gradle/SlidingTabsColors/Application/src/main/java/com/example/android/common/view/ |
D | SlidingTabStrip.java | 117 protected void onDraw(Canvas canvas) { in onDraw() argument 148 canvas.drawRect(left, height - mSelectedIndicatorThickness, right, in onDraw() 153 canvas.drawRect(0, height - mBottomBorderThickness, getWidth(), height, mBottomBorderPaint); in onDraw() 160 canvas.drawLine(child.getRight(), separatorTop, child.getRight(), in onDraw()
|
/developers/build/prebuilts/gradle/SwipeRefreshMultipleViews/Application/src/main/java/com/example/android/common/view/ |
D | SlidingTabStrip.java | 117 protected void onDraw(Canvas canvas) { in onDraw() argument 148 canvas.drawRect(left, height - mSelectedIndicatorThickness, right, in onDraw() 153 canvas.drawRect(0, height - mBottomBorderThickness, getWidth(), height, mBottomBorderPaint); in onDraw() 160 canvas.drawLine(child.getRight(), separatorTop, child.getRight(), in onDraw()
|
/developers/build/prebuilts/gradle/SlidingTabsBasic/Application/src/main/java/com/example/android/common/view/ |
D | SlidingTabStrip.java | 117 protected void onDraw(Canvas canvas) { in onDraw() argument 148 canvas.drawRect(left, height - mSelectedIndicatorThickness, right, in onDraw() 153 canvas.drawRect(0, height - mBottomBorderThickness, getWidth(), height, mBottomBorderPaint); in onDraw() 160 canvas.drawLine(child.getRight(), separatorTop, child.getRight(), in onDraw()
|
/developers/build/prebuilts/gradle/SwipeRefreshListFragment/Application/src/main/java/com/example/android/common/view/ |
D | SlidingTabStrip.java | 117 protected void onDraw(Canvas canvas) { in onDraw() argument 148 canvas.drawRect(left, height - mSelectedIndicatorThickness, right, in onDraw() 153 canvas.drawRect(0, height - mBottomBorderThickness, getWidth(), height, mBottomBorderPaint); in onDraw() 160 canvas.drawLine(child.getRight(), separatorTop, child.getRight(), in onDraw()
|
/developers/samples/android/common/src/java/com/example/android/common/view/ |
D | SlidingTabStrip.java | 117 protected void onDraw(Canvas canvas) { in onDraw() argument 148 canvas.drawRect(left, height - mSelectedIndicatorThickness, right, in onDraw() 153 canvas.drawRect(0, height - mBottomBorderThickness, getWidth(), height, mBottomBorderPaint); in onDraw() 160 canvas.drawLine(child.getRight(), separatorTop, child.getRight(), in onDraw()
|