/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/ |
D | ShapesActivity.java | 79 protected void onDraw(Canvas canvas) { in onDraw() argument 80 super.onDraw(canvas); in onDraw() 82 canvas.save(); in onDraw() 83 canvas.translate(50.0f, 50.0f); in onDraw() 84 canvas.drawRoundRect(mRect, 6.0f, 6.0f, mNormalPaint); in onDraw() 86 canvas.translate(0.0f, 110.0f); in onDraw() 87 canvas.drawRoundRect(mRect, 6.0f, 6.0f, mStrokePaint); in onDraw() 89 canvas.translate(0.0f, 110.0f); in onDraw() 90 canvas.drawRoundRect(mRect, 6.0f, 6.0f, mFillPaint); in onDraw() 91 canvas.restore(); in onDraw() [all …]
|
D | XfermodeActivity.java | 54 protected void onDraw(Canvas canvas) { in onDraw() argument 55 super.onDraw(canvas); in onDraw() 58 canvas.translate(100.0f, 100.0f); in onDraw() 61 canvas.save(); in onDraw() 63 drawRects(canvas, Mode.SRC_OVER); in onDraw() 64 canvas.translate(0.0f, 100.0f); in onDraw() 66 drawRects(canvas, Mode.SRC_IN); in onDraw() 67 canvas.translate(0.0f, 100.0f); in onDraw() 69 drawRects(canvas, Mode.SRC_OUT); in onDraw() 70 canvas.translate(0.0f, 100.0f); in onDraw() [all …]
|
D | Lines2Activity.java | 75 private void drawLines(Canvas canvas, Paint p, float xOffset, float yOffset) { in drawLines() argument 76 canvas.drawLine(10 + xOffset, yOffset, 10 + xOffset, 40 + yOffset, p); in drawLines() 77 canvas.drawLine(30 + xOffset, yOffset, 40 + xOffset, 40 + yOffset, p); in drawLines() 78 canvas.drawLine(40 + xOffset, yOffset, 75 + xOffset, 35 + yOffset, p); in drawLines() 79 canvas.drawLine(50 + xOffset, 5+ yOffset, 100 + xOffset, 15 + yOffset, p); in drawLines() 80 canvas.drawLine(60 + xOffset, yOffset, 110 + xOffset, 2 + yOffset, p); in drawLines() 81 canvas.drawLine(60 + xOffset, 40 + yOffset, 110 + xOffset, 40 + yOffset, p); in drawLines() 86 canvas.drawLines(copyPoints, 0, 12, p); in drawLines() 89 private void drawVerticalLine(Canvas canvas, Paint p, float length, float x, float y) { in drawVerticalLine() argument 90 canvas.drawLine(x, y, x, y + length, p); in drawVerticalLine() [all …]
|
D | ColoredRectsActivity.java | 72 protected void onDraw(Canvas canvas) { in onDraw() argument 73 super.onDraw(canvas); in onDraw() 79 canvas.save(); in onDraw() 80 canvas.translate(mOffset, yOffset); in onDraw() 81 canvas.drawRect(0, 0, 20, 10, p); in onDraw() 82 canvas.drawRect(35, 0, 45, 20, p); in onDraw() 83 canvas.translate(0, -yOffset); in onDraw() 84 canvas.scale(2, 2); in onDraw() 85 canvas.translate(60, yOffset/2); in onDraw() 86 canvas.drawRect(0, 0, 20, 10, p); in onDraw() [all …]
|
D | AlphaLayersActivity.java | 65 protected void onDraw(Canvas canvas) { in onDraw() argument 66 super.onDraw(canvas); in onDraw() 67 canvas.drawRGB(0, 255, 0); in onDraw() 80 public void dispatchDraw(Canvas canvas) { in dispatchDraw() argument 81 canvas.drawRGB(255, 255, 255); in dispatchDraw() 84 canvas.drawRect(200.0f, 0.0f, 220.0f, 20.0f, mPaint); in dispatchDraw() 86 canvas.save(); in dispatchDraw() 87 canvas.clipRect(20.0f, 0.0f, 40.0f, 20.0f); in dispatchDraw() 88 Log.d(LOG_TAG, "clipRect = " + canvas.getClipBounds()); in dispatchDraw() 89 Log.d(LOG_TAG, "rejected = " + canvas.quickReject(100.0f, 100.0f, 110.0f, 110.0f, in dispatchDraw() [all …]
|
D | QuickRejectActivity.java | 52 protected void onDraw(Canvas canvas) { in onDraw() argument 53 super.onDraw(canvas); in onDraw() 55 int count = canvas.getSaveCount(); in onDraw() 57 count = canvas.save(); in onDraw() 59 count = canvas.getSaveCount(); in onDraw() 61 canvas.restore(); in onDraw() 62 count = canvas.getSaveCount(); in onDraw() 64 canvas.save(); in onDraw() 65 Log.d("OpenGLRenderer", "count after save=" + canvas.getSaveCount()); in onDraw() 66 canvas.save(); in onDraw() [all …]
|
D | ScaledTextActivity.java | 94 protected void onDraw(Canvas canvas) { in onDraw() argument 95 super.onDraw(canvas); in onDraw() 97 canvas.drawText(TEXT, 30.0f, 30.0f, mPaint); in onDraw() 99 canvas.drawText(TEXT, 30.0f, 50.0f, mPaint); in onDraw() 101 canvas.drawText(TEXT, 30.0f, 70.0f, mPaint); in onDraw() 103 canvas.save(); in onDraw() 104 canvas.translate(400.0f, 0.0f); in onDraw() 105 canvas.scale(3.0f, 3.0f); in onDraw() 108 canvas.drawText(TEXT, 30.0f, 30.0f, mPaint); in onDraw() 111 canvas.drawText(TEXT, 30.0f, 50.0f, mPaint); in onDraw() [all …]
|
D | TextActivity.java | 83 protected void onDraw(Canvas canvas) { in onDraw() argument 84 super.onDraw(canvas); in onDraw() 85 canvas.drawRGB(255, 255, 255); in onDraw() 87 canvas.drawText("Hello OpenGL renderer!", 300, 20, mEventPaint); in onDraw() 91 canvas.drawText("Hello OpenGL renderer!", 100, 20, mMediumPaint); in onDraw() 95 canvas.drawText("Hello OpenGL renderer!", 100, 40, mMediumPaint); in onDraw() 100 canvas.drawText("Hello OpenGL renderer!", 100, 60, mMediumPaint); in onDraw() 104 canvas.drawText("Hello OpenGL renderer!", 100, 100, mMediumPaint); in onDraw() 107 canvas.drawText("Hello OpenGL renderer!", 100, 150, mMediumPaint); in onDraw() 109 canvas.drawText("Hello OpenGL renderer!", 100, 200, mLargePaint); in onDraw() [all …]
|
D | LinesActivity.java | 115 protected void onDraw(Canvas canvas) { in onDraw() argument 116 super.onDraw(canvas); in onDraw() 118 canvas.save(); in onDraw() 119 canvas.translate(100.0f, 20.0f); in onDraw() 121 canvas.drawLine(0.0f, 0.0f, 40.0f, 400.0f, mSmallPaint); in onDraw() 122 canvas.drawLine(5.0f, 0.0f, 95.0f, 400.0f, mMediumPaint); in onDraw() 123 canvas.drawLine(22.0f, 0.0f, 162.0f, 400.0f, mLargePaint); in onDraw() 126 canvas.drawLine(42.0f, 0.0f, 222.0f, 400.0f, mLargePaint); in onDraw() 129 canvas.drawPoint(500.0f + x * (15.0f + mOffset), in onDraw() 135 canvas.drawLines(mPoints, mAlphaPaint); in onDraw() [all …]
|
D | FramebufferBlendActivity.java | 64 protected void onDraw(Canvas canvas) { in onDraw() argument 65 super.onDraw(canvas); in onDraw() 66 canvas.drawRGB(255, 255, 255); in onDraw() 68 canvas.save(); in onDraw() 69 canvas.translate(40.0f, 40.0f); in onDraw() 71 drawBlendedBitmap(canvas, PorterDuff.Mode.DARKEN); in onDraw() 72 drawBlendedBitmap(canvas, PorterDuff.Mode.LIGHTEN); in onDraw() 73 drawBlendedBitmap(canvas, PorterDuff.Mode.MULTIPLY); in onDraw() 75 canvas.restore(); in onDraw() 77 canvas.save(); in onDraw() [all …]
|
D | LayersActivity.java | 48 protected void onDraw(Canvas canvas) { in onDraw() argument 49 super.onDraw(canvas); in onDraw() 51 canvas.translate(140.0f, 100.0f); in onDraw() 55 int count = canvas.saveLayer(0.0f, 0.0f, 200.0f, 100.0f, mLayerPaint, in onDraw() 59 canvas.drawRect(0.0f, 0.0f, 200.0f, 100.0f, mRectPaint); in onDraw() 61 canvas.restoreToCount(count); in onDraw() 63 canvas.translate(0.0f, 125.0f); in onDraw() 65 count = canvas.saveLayer(0.0f, 0.0f, 200.0f, 100.0f, mLayerPaint, in onDraw() 70 canvas.drawRect(0.0f, 0.0f, 200.0f, 100.0f, mRectPaint); in onDraw() 72 canvas.restoreToCount(count); in onDraw() [all …]
|
D | PathsActivity.java | 101 Canvas canvas = new Canvas(mBitmap); in PathsView() local 102 canvas.translate(-mPathBounds.left + mOffset * 1.5f, -mPathBounds.top + mOffset * 1.5f); in PathsView() 103 canvas.drawPath(mPath, mMediumPaint); in PathsView() 104 canvas.setBitmap(null); in PathsView() 108 protected void onDraw(Canvas canvas) { in onDraw() argument 109 super.onDraw(canvas); in onDraw() 111 canvas.drawARGB(255, 255, 255, 255); in onDraw() 113 canvas.save(); in onDraw() 114 canvas.translate(200.0f, 60.0f); in onDraw() 115 canvas.drawPath(mPath, mSmallPaint); in onDraw() [all …]
|
D | ScaledPathsActivity.java | 61 protected void onDraw(Canvas canvas) { in onDraw() argument 62 super.onDraw(canvas); in onDraw() 63 canvas.drawARGB(255, 255, 255, 255); in onDraw() 68 canvas.save(); in onDraw() 69 drawPath(canvas, 1.0f, 1.0f); in onDraw() 70 drawPath(canvas, 2.0f, 2.0f); in onDraw() 71 drawPath(canvas, 4.0f, 4.0f); in onDraw() 72 canvas.restore(); in onDraw() 77 canvas.save(); in onDraw() 78 drawPath(canvas, 1.0f, 1.0f); in onDraw() [all …]
|
D | TJunctionActivity.java | 46 protected void onDraw(Canvas canvas) { in onDraw() argument 47 super.onDraw(canvas); in onDraw() 51 canvas.translate(10.0f, 10.0f); in onDraw() 52 canvas.drawRect(0.0f, 0.0f, 100.0f, 50.0f, mPaint); in onDraw() 56 canvas.translate(50.0f, 50.0f); in onDraw() 57 canvas.drawRect(0.0f, 0.0f, 100.0f, 50.0f, mPaint); in onDraw() 61 canvas.translate(-25.0f, 50.0f); in onDraw() 62 canvas.drawRect(0.0f, 0.0f, 100.0f, 50.0f, mPaint); in onDraw() 66 canvas.translate(150.0f, 75.0f); in onDraw() 67 canvas.drawRect(0.0f, 0.0f, 100.0f, 50.0f, mPaint); in onDraw() [all …]
|
D | ColorFiltersActivity.java | 69 protected void onDraw(Canvas canvas) { in onDraw() argument 70 super.onDraw(canvas); in onDraw() 72 canvas.drawARGB(255, 255, 255, 255); in onDraw() 74 canvas.save(); in onDraw() 75 canvas.translate(120.0f, 50.0f); in onDraw() 76 canvas.drawBitmap(mBitmap1, 0.0f, 0.0f, mColorMatrixPaint); in onDraw() 78 canvas.translate(0.0f, 50.0f + mBitmap1.getHeight()); in onDraw() 79 canvas.drawBitmap(mBitmap1, 0.0f, 0.0f, mLightingPaint); in onDraw() 81 canvas.translate(0.0f, 50.0f + mBitmap1.getHeight()); in onDraw() 82 canvas.drawBitmap(mBitmap1, 0.0f, 0.0f, mBlendPaint); in onDraw() [all …]
|
D | TextOnPathActivity.java | 107 protected void onDraw(Canvas canvas) { in onDraw() argument 108 super.onDraw(canvas); in onDraw() 110 canvas.drawARGB(255, 255, 255, 255); in onDraw() 112 canvas.save(); in onDraw() 113 canvas.translate(400.0f, 350.0f); in onDraw() 115 canvas.drawTextOnPath(mText + mText, mPath, 0.0f, 0.0f, mPaint); in onDraw() 116 canvas.drawPath(mPath, mPathPaint); in onDraw() 125 canvas.drawLines(mLines, mPathPaint); in onDraw() 127 canvas.translate(200.0f, 0.0f); in onDraw() 128 canvas.drawTextOnPath(mText + mText, mStraightPath, 0.0f, 0.0f, mPaint); in onDraw() [all …]
|
D | AdvancedGradientsActivity.java | 69 protected void onDraw(Canvas canvas) { in onDraw() argument 70 super.onDraw(canvas); in onDraw() 71 canvas.drawRGB(255, 255, 255); in onDraw() 73 canvas.save(); in onDraw() 74 canvas.translate(130.0f, 100.0f); in onDraw() 78 canvas.drawRect(0.0f, 0.0f, 200.0f, 200.0f, mPaint); in onDraw() 80 canvas.translate(400.0f, 000.0f); in onDraw() 84 canvas.drawRect(0.0f, 0.0f, 200.0f, 200.0f, mPaint); in onDraw() 86 canvas.translate(400.0f, 000.0f); in onDraw() 90 canvas.drawRect(0.0f, 0.0f, 200.0f, 200.0f, mPaint); in onDraw() [all …]
|
D | NewLayersActivity.java | 49 protected void onDraw(Canvas canvas) { in onDraw() argument 50 super.onDraw(canvas); in onDraw() 51 canvas.drawRGB(128, 255, 128); in onDraw() 53 canvas.save(); in onDraw() 55 canvas.translate(140.0f, 100.0f); in onDraw() 56 drawStuff(canvas, Canvas.ALL_SAVE_FLAG); in onDraw() 58 canvas.translate(0.0f, 200.0f); in onDraw() 59 drawStuff(canvas, Canvas.HAS_ALPHA_LAYER_SAVE_FLAG); in onDraw() 61 canvas.restore(); in onDraw() 64 private void drawStuff(Canvas canvas, int saveFlags) { in drawStuff() argument [all …]
|
D | GradientStopsActivity.java | 44 protected void onDraw(Canvas canvas) { in onDraw() argument 53 canvas.drawRect(0.0f, 0.0f, 256.0f, 50.0f, paint); in onDraw() 62 canvas.translate(0.0f, 75.0f); in onDraw() 63 canvas.drawRect(0.0f, 0.0f, 256.0f, 50.0f, paint); in onDraw() 72 canvas.translate(0.0f, 75.0f); in onDraw() 73 canvas.drawRect(0.0f, 0.0f, 256.0f, 50.0f, paint); in onDraw() 81 canvas.translate(0.0f, 75.0f); in onDraw() 82 canvas.drawRect(0.0f, 0.0f, 256.0f, 50.0f, paint); in onDraw() 89 canvas.translate(0.0f, 75.0f); in onDraw() 90 canvas.drawRect(0.0f, 0.0f, 768.0f, 50.0f, paint); in onDraw() [all …]
|
D | PathsCacheActivity.java | 89 protected void onDraw(Canvas canvas) { in onDraw() argument 90 super.onDraw(canvas); in onDraw() 92 canvas.drawARGB(255, 255, 255, 255); in onDraw() 94 canvas.save(); in onDraw() 95 canvas.translate(550.0f, 60.0f); in onDraw() 96 canvas.drawPath(mPath, mMediumPaint); in onDraw() 101 canvas.translate(30.0f, 30.0f); in onDraw() 102 canvas.drawPath(mPath, mMediumPaint); in onDraw() 103 canvas.drawPath(mPath, mMediumPaint); in onDraw() 108 canvas.translate(30.0f, 30.0f); in onDraw() [all …]
|
/frameworks/base/tests/CanvasCompare/src/com/android/test/hwuicompare/ |
D | DisplayModifier.java | 40 abstract public void modifyDrawing(Paint paint, Canvas canvas); in modifyDrawing() argument 85 public void modifyDrawing(Paint paint, Canvas canvas) { 91 public void modifyDrawing(Paint paint, Canvas canvas) { 101 public void modifyDrawing(Paint paint, Canvas canvas) { 107 public void modifyDrawing(Paint paint, Canvas canvas) { 115 public void modifyDrawing(Paint paint, Canvas canvas) { 128 public void modifyDrawing(Paint paint, Canvas canvas) { 136 public void modifyDrawing(Paint paint, Canvas canvas) { 142 public void modifyDrawing(Paint paint, Canvas canvas) { 148 public void modifyDrawing(Paint paint, Canvas canvas) { [all …]
|
/frameworks/base/tools/layoutlib/bridge/src/android/view/ |
D | RectShadowPainter.java | 46 public static void paintShadow(Outline viewOutline, float elevation, Canvas canvas) { in paintShadow() argument 48 int saved = modifyCanvas(canvas, shadowSize); in paintShadow() 80 sideShadow(canvas, edgePaint, edgeShadowRect, outline.left, inset.top, 0); in paintShadow() 82 sideShadow(canvas, edgePaint, edgeShadowRect, outline.right, inset.bottom, 2); in paintShadow() 85 sideShadow(canvas, edgePaint, edgeShadowRect, inset.right, outline.top, 1); in paintShadow() 91 sideShadow(canvas, edgePaint, edgeShadowRect, inset.left, outline.bottom, 3); in paintShadow() 94 drawCorner(canvas, cornerPaint, path, inset.right, inset.bottom, outerArcRadius, 0); in paintShadow() 95 drawCorner(canvas, cornerPaint, path, inset.left, inset.bottom, outerArcRadius, 1); in paintShadow() 96 drawCorner(canvas, cornerPaint, path, inset.left, inset.top, outerArcRadius, 2); in paintShadow() 97 drawCorner(canvas, cornerPaint, path, inset.right, inset.top, outerArcRadius, 3); in paintShadow() [all …]
|
D | ViewGroup_Delegate.java | 46 /*package*/ static boolean drawChild(ViewGroup thisVG, Canvas canvas, View child, in drawChild() argument 56 int restoreTo = transformCanvas(thisVG, canvas, child); in drawChild() 57 drawShadow(thisVG, canvas, child, outline); in drawChild() 58 canvas.restoreToCount(restoreTo); in drawChild() 61 return thisVG.drawChild_Original(canvas, child, drawingTime); in drawChild() 64 private static void drawShadow(ViewGroup parent, Canvas canvas, View child, in drawShadow() argument 68 RectShadowPainter.paintShadow(outline, elevation, canvas); in drawShadow() 73 shadow = getPathShadow(outline, canvas, elevation); in drawShadow() 79 Density.getEnum(canvas.getDensity())); in drawShadow() 80 Rect clipBounds = canvas.getClipBounds(); in drawShadow() [all …]
|
/frameworks/support/v4/java/android/support/v4/widget/ |
D | SwipeProgressBar.java | 138 void draw(Canvas canvas) { in draw() argument 144 int restoreCount = canvas.save(); in draw() 145 canvas.clipRect(mBounds); in draw() 172 canvas.saveLayerAlpha(mClipRect, 0, 0); in draw() 182 canvas.drawColor(mColor1); in draw() 185 canvas.drawColor(mColor4); in draw() 187 canvas.drawColor(mColor1); in draw() 189 canvas.drawColor(mColor2); in draw() 191 canvas.drawColor(mColor3); in draw() 203 drawCircle(canvas, cx, cy, mColor1, pct); in draw() [all …]
|
/frameworks/support/design/base/android/support/design/widget/ |
D | ShadowDrawableWrapper.java | 188 public void draw(Canvas canvas) { in draw() argument 193 drawShadow(canvas); in draw() 195 super.draw(canvas); in draw() 198 private void drawShadow(Canvas canvas) { in drawShadow() argument 213 int saved = canvas.save(); in drawShadow() 214 canvas.translate(mContentBounds.left + shadowOffset, mContentBounds.top + shadowOffset); in drawShadow() 215 canvas.scale(shadowScaleHorizontal, shadowScaleTop); in drawShadow() 216 canvas.drawPath(mCornerShadowPath, mCornerShadowPaint); in drawShadow() 219 canvas.scale(1f / shadowScaleHorizontal, 1f); in drawShadow() 220 canvas.drawRect(0, edgeShadowTop, in drawShadow() [all …]
|