Home
last modified time | relevance | path

Searched refs:canvas (Results 1 – 25 of 36) sorted by relevance

12

/developers/build/prebuilts/androidtv/visual-game-controller/src/com/example/android/visualgamecontroller/
DControllerView.java342 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/samples/android/wearable/wear/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/
DSweepWatchFaceService.java306 Canvas canvas = new Canvas(mGrayBackgroundBitmap); in initGrayBackgroundBitmap() local
312 canvas.drawBitmap(mBackgroundBitmap, 0, 0, grayPaint); in initGrayBackgroundBitmap()
316 public void onDraw(Canvas canvas, Rect bounds) { in onDraw() argument
324 canvas.drawColor(Color.BLACK); in onDraw()
326 canvas.drawBitmap(mGrayBackgroundBitmap, 0, 0, mBackgroundPaint); in onDraw()
328 canvas.drawBitmap(mBackgroundBitmap, 0, 0, mBackgroundPaint); in onDraw()
344 canvas.drawLine(mCenterX + innerX, mCenterY + innerY, in onDraw()
364 canvas.save(); in onDraw()
366 canvas.rotate(hoursRotation, mCenterX, mCenterY); in onDraw()
367 canvas.drawLine( in onDraw()
[all …]
DComplicationSimpleWatchFaceService.java512 Canvas canvas = new Canvas(mGrayBackgroundBitmap); in initGrayBackgroundBitmap() local
518 canvas.drawBitmap(mBackgroundBitmap, 0, 0, grayPaint); in initGrayBackgroundBitmap()
522 public void onDraw(Canvas canvas, Rect bounds) { in onDraw() argument
529 drawBackground(canvas); in onDraw()
530 drawComplications(canvas, now); in onDraw()
531 drawWatchFace(canvas); in onDraw()
536 private void drawBackground(Canvas canvas) { in drawBackground() argument
538 canvas.drawColor(Color.BLACK); in drawBackground()
540 canvas.drawBitmap(mGrayBackgroundBitmap, 0, 0, mBackgroundPaint); in drawBackground()
542 canvas.drawBitmap(mBackgroundBitmap, 0, 0, mBackgroundPaint); in drawBackground()
[all …]
DAnalogWatchFaceService.java341 Canvas canvas = new Canvas(mGrayBackgroundBitmap); in initGrayBackgroundBitmap() local
347 canvas.drawBitmap(mBackgroundBitmap, 0, 0, grayPaint); in initGrayBackgroundBitmap()
351 public void onDraw(Canvas canvas, Rect bounds) { in onDraw() argument
359 canvas.drawColor(Color.BLACK); in onDraw()
361 canvas.drawBitmap(mGrayBackgroundBitmap, 0, 0, mBackgroundPaint); in onDraw()
363 canvas.drawBitmap(mBackgroundBitmap, 0, 0, mBackgroundPaint); in onDraw()
379 canvas.drawLine(mCenterX + innerX, mCenterY + innerY, in onDraw()
399 canvas.save(); in onDraw()
401 canvas.rotate(hoursRotation, mCenterX, mCenterY); in onDraw()
402 canvas.drawLine( in onDraw()
[all …]
DInteractiveWatchFaceService.java198 public void onDraw(Canvas canvas, Rect bounds) { in onDraw() argument
200 canvas.drawColor(Color.BLACK); in onDraw()
202 canvas.drawText( in onDraw()
208 canvas.drawText( in onDraw()
214 canvas.drawText( in onDraw()
220 canvas.drawText( in onDraw()
229 canvas.drawRect(mCardBounds, mPeekCardBackgroundPaint); in onDraw()
DCardBoundsWatchFaceService.java85 public void onDraw(Canvas canvas, Rect bounds) { in onDraw() argument
87 canvas.drawColor(isInAmbientMode() ? Color.BLACK : Color.BLUE); in onDraw()
92 canvas.drawRect(mCardBounds.left - BORDER_WIDTH_PX, in onDraw()
100 canvas.drawRect(mCardBounds, mPaint); in onDraw()
DFitDistanceWatchFaceService.java371 public void onDraw(Canvas canvas, Rect bounds) { in onDraw() argument
377 canvas.drawColor(BACKGROUND_COLOR); in onDraw()
391 canvas.drawText(hourString, x, mYOffset, mHourPaint); in onDraw()
395 canvas.drawText(COLON_STRING, x, mYOffset, mColonPaint); in onDraw()
401 canvas.drawText(minuteString, x, mYOffset, mMinutePaint); in onDraw()
407 canvas.drawText(COLON_STRING, x, mYOffset, mColonPaint); in onDraw()
410 canvas.drawText(formatTwoDigitNumber( in onDraw()
414 canvas.drawText(getAmPmString( in onDraw()
421 canvas.drawText( in onDraw()
DFitStepsWatchFaceService.java372 public void onDraw(Canvas canvas, Rect bounds) { in onDraw() argument
378 canvas.drawColor(BACKGROUND_COLOR); in onDraw()
392 canvas.drawText(hourString, x, mYOffset, mHourPaint); in onDraw()
396 canvas.drawText(COLON_STRING, x, mYOffset, mColonPaint); in onDraw()
402 canvas.drawText(minuteString, x, mYOffset, mMinutePaint); in onDraw()
408 canvas.drawText(COLON_STRING, x, mYOffset, mColonPaint); in onDraw()
411 canvas.drawText(formatTwoDigitNumber( in onDraw()
415 canvas.drawText(getAmPmString( in onDraw()
422 canvas.drawText( in onDraw()
DDigitalWatchFaceService.java446 public void onDraw(Canvas canvas, Rect bounds) { in onDraw() argument
457 canvas.drawRect(0, 0, bounds.width(), bounds.height(), mBackgroundPaint); in onDraw()
471 canvas.drawText(hourString, x, mYOffset, mHourPaint); in onDraw()
477 canvas.drawText(COLON_STRING, x, mYOffset, mColonPaint); in onDraw()
483 canvas.drawText(minuteString, x, mYOffset, mMinutePaint); in onDraw()
490 canvas.drawText(COLON_STRING, x, mYOffset, mColonPaint); in onDraw()
493 canvas.drawText(formatTwoDigitNumber( in onDraw()
497 canvas.drawText(getAmPmString( in onDraw()
505 canvas.drawText( in onDraw()
509 canvas.drawText( in onDraw()
/developers/build/prebuilts/gradle/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/
DSweepWatchFaceService.java306 Canvas canvas = new Canvas(mGrayBackgroundBitmap); in initGrayBackgroundBitmap() local
312 canvas.drawBitmap(mBackgroundBitmap, 0, 0, grayPaint); in initGrayBackgroundBitmap()
316 public void onDraw(Canvas canvas, Rect bounds) { in onDraw() argument
324 canvas.drawColor(Color.BLACK); in onDraw()
326 canvas.drawBitmap(mGrayBackgroundBitmap, 0, 0, mBackgroundPaint); in onDraw()
328 canvas.drawBitmap(mBackgroundBitmap, 0, 0, mBackgroundPaint); in onDraw()
344 canvas.drawLine(mCenterX + innerX, mCenterY + innerY, in onDraw()
364 canvas.save(); in onDraw()
366 canvas.rotate(hoursRotation, mCenterX, mCenterY); in onDraw()
367 canvas.drawLine( in onDraw()
[all …]
DComplicationSimpleWatchFaceService.java512 Canvas canvas = new Canvas(mGrayBackgroundBitmap); in initGrayBackgroundBitmap() local
518 canvas.drawBitmap(mBackgroundBitmap, 0, 0, grayPaint); in initGrayBackgroundBitmap()
522 public void onDraw(Canvas canvas, Rect bounds) { in onDraw() argument
529 drawBackground(canvas); in onDraw()
530 drawComplications(canvas, now); in onDraw()
531 drawWatchFace(canvas); in onDraw()
536 private void drawBackground(Canvas canvas) { in drawBackground() argument
538 canvas.drawColor(Color.BLACK); in drawBackground()
540 canvas.drawBitmap(mGrayBackgroundBitmap, 0, 0, mBackgroundPaint); in drawBackground()
542 canvas.drawBitmap(mBackgroundBitmap, 0, 0, mBackgroundPaint); in drawBackground()
[all …]
DAnalogWatchFaceService.java341 Canvas canvas = new Canvas(mGrayBackgroundBitmap); in initGrayBackgroundBitmap() local
347 canvas.drawBitmap(mBackgroundBitmap, 0, 0, grayPaint); in initGrayBackgroundBitmap()
351 public void onDraw(Canvas canvas, Rect bounds) { in onDraw() argument
359 canvas.drawColor(Color.BLACK); in onDraw()
361 canvas.drawBitmap(mGrayBackgroundBitmap, 0, 0, mBackgroundPaint); in onDraw()
363 canvas.drawBitmap(mBackgroundBitmap, 0, 0, mBackgroundPaint); in onDraw()
379 canvas.drawLine(mCenterX + innerX, mCenterY + innerY, in onDraw()
399 canvas.save(); in onDraw()
401 canvas.rotate(hoursRotation, mCenterX, mCenterY); in onDraw()
402 canvas.drawLine( in onDraw()
[all …]
DInteractiveWatchFaceService.java198 public void onDraw(Canvas canvas, Rect bounds) { in onDraw() argument
200 canvas.drawColor(Color.BLACK); in onDraw()
202 canvas.drawText( in onDraw()
208 canvas.drawText( in onDraw()
214 canvas.drawText( in onDraw()
220 canvas.drawText( in onDraw()
229 canvas.drawRect(mCardBounds, mPeekCardBackgroundPaint); in onDraw()
DCardBoundsWatchFaceService.java85 public void onDraw(Canvas canvas, Rect bounds) { in onDraw() argument
87 canvas.drawColor(isInAmbientMode() ? Color.BLACK : Color.BLUE); in onDraw()
92 canvas.drawRect(mCardBounds.left - BORDER_WIDTH_PX, in onDraw()
100 canvas.drawRect(mCardBounds, mPaint); in onDraw()
DFitDistanceWatchFaceService.java371 public void onDraw(Canvas canvas, Rect bounds) { in onDraw() argument
377 canvas.drawColor(BACKGROUND_COLOR); in onDraw()
391 canvas.drawText(hourString, x, mYOffset, mHourPaint); in onDraw()
395 canvas.drawText(COLON_STRING, x, mYOffset, mColonPaint); in onDraw()
401 canvas.drawText(minuteString, x, mYOffset, mMinutePaint); in onDraw()
407 canvas.drawText(COLON_STRING, x, mYOffset, mColonPaint); in onDraw()
410 canvas.drawText(formatTwoDigitNumber( in onDraw()
414 canvas.drawText(getAmPmString( in onDraw()
421 canvas.drawText( in onDraw()
DFitStepsWatchFaceService.java372 public void onDraw(Canvas canvas, Rect bounds) { in onDraw() argument
378 canvas.drawColor(BACKGROUND_COLOR); in onDraw()
392 canvas.drawText(hourString, x, mYOffset, mHourPaint); in onDraw()
396 canvas.drawText(COLON_STRING, x, mYOffset, mColonPaint); in onDraw()
402 canvas.drawText(minuteString, x, mYOffset, mMinutePaint); in onDraw()
408 canvas.drawText(COLON_STRING, x, mYOffset, mColonPaint); in onDraw()
411 canvas.drawText(formatTwoDigitNumber( in onDraw()
415 canvas.drawText(getAmPmString( in onDraw()
422 canvas.drawText( in onDraw()
DDigitalWatchFaceService.java446 public void onDraw(Canvas canvas, Rect bounds) { in onDraw() argument
457 canvas.drawRect(0, 0, bounds.width(), bounds.height(), mBackgroundPaint); in onDraw()
471 canvas.drawText(hourString, x, mYOffset, mHourPaint); in onDraw()
477 canvas.drawText(COLON_STRING, x, mYOffset, mColonPaint); in onDraw()
483 canvas.drawText(minuteString, x, mYOffset, mMinutePaint); in onDraw()
490 canvas.drawText(COLON_STRING, x, mYOffset, mColonPaint); in onDraw()
493 canvas.drawText(formatTwoDigitNumber( in onDraw()
497 canvas.drawText(getAmPmString( in onDraw()
505 canvas.drawText( in onDraw()
509 canvas.drawText( in onDraw()
/developers/build/prebuilts/gradle/BasicMultitouch/Application/src/main/java/com/example/android/basicmultitouch/
DTouchDisplayView.java286 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/
DTouchDisplayView.java286 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/build/prebuilts/gradle/BasicAccessibility/Application/src/main/java/com/example/android/basicaccessibility/
DDialView.java199 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/
DDialView.java199 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/
DPartyLightView.java66 protected void onDraw(Canvas canvas) { in onDraw() argument
67 canvas.drawColor(mCurrentColor); in onDraw()
68 super.onDraw(canvas); in onDraw()
/developers/samples/android/wearable/wear/Flashlight/Wearable/src/main/java/com/example/android/wearable/flashlight/
DPartyLightView.java66 protected void onDraw(Canvas canvas) { in onDraw() argument
67 canvas.drawColor(mCurrentColor); in onDraw()
68 super.onDraw(canvas); in onDraw()
/developers/build/prebuilts/gradle/SwipeRefreshListFragment/Application/src/main/java/com/example/android/common/view/
DSlidingTabStrip.java117 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/BasicTransition/Application/src/main/java/com/example/android/common/view/
DSlidingTabStrip.java117 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()

12