Home
last modified time | relevance | path

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

12345678910>>...15

/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/crop/
DCropDrawingUtils.java30 public static void drawRuleOfThird(Canvas canvas, RectF bounds) { in drawRuleOfThird() argument
40 canvas.drawLine(x, bounds.top, x, bounds.bottom, p); in drawRuleOfThird()
44 canvas.drawLine(bounds.left, y, bounds.right, y, p); in drawRuleOfThird()
49 public static void drawCropRect(Canvas canvas, RectF bounds) { in drawCropRect() argument
54 canvas.drawRect(bounds, p); in drawCropRect()
57 public static void drawShade(Canvas canvas, RectF bounds) { in drawShade() argument
58 int w = canvas.getWidth(); in drawShade()
59 int h = canvas.getHeight(); in drawShade()
66 canvas.drawRect(r, p); in drawShade()
68 canvas.drawRect(r, p); in drawShade()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/ui/
DAbstractSlotRenderer.java46 protected void drawContent(GLCanvas canvas, in drawContent() argument
48 canvas.save(GLCanvas.SAVE_FLAG_MATRIX); in drawContent()
54 canvas.translate(width / 2, height / 2); in drawContent()
55 canvas.rotate(rotation, 0, 0, 1); in drawContent()
56 canvas.translate(-width / 2, -height / 2); in drawContent()
63 canvas.scale(scale, scale, 1); in drawContent()
64 content.draw(canvas, 0, 0); in drawContent()
66 canvas.restore(); in drawContent()
69 protected void drawVideoOverlay(GLCanvas canvas, int width, int height) { in drawVideoOverlay() argument
76 v.draw(canvas, 0, 0, w, h); in drawVideoOverlay()
[all …]
DSlideshowView.java93 protected void render(GLCanvas canvas) { in render() argument
100 canvas.save(GLCanvas.SAVE_FLAG_ALPHA | GLCanvas.SAVE_FLAG_MATRIX); in render()
101 canvas.setAlpha(1f - alpha); in render()
102 mPrevAnimation.apply(canvas); in render()
103 canvas.rotate(mPrevRotation, 0, 0, 1); in render()
104 mPrevTexture.draw(canvas, -mPrevTexture.getWidth() / 2, in render()
106 canvas.restore(); in render()
110 canvas.save(GLCanvas.SAVE_FLAG_ALPHA | GLCanvas.SAVE_FLAG_MATRIX); in render()
111 canvas.setAlpha(alpha); in render()
112 mCurrentAnimation.apply(canvas); in render()
[all …]
DPhotoView.java583 void draw(GLCanvas canvas, Rect r); in draw() argument
643 public void draw(GLCanvas canvas, Rect r) { in draw() argument
644 drawTileView(canvas, r); in draw()
675 private void drawTileView(GLCanvas canvas, Rect r) { in drawTileView() argument
683 canvas.save(GLCanvas.SAVE_FLAG_MATRIX | GLCanvas.SAVE_FLAG_ALPHA); in drawTileView()
706 canvas.multiplyAlpha(alpha); in drawTileView()
724 canvas.multiplyAlpha(alpha); in drawTileView()
729 renderChild(canvas, mTileView); in drawTileView()
732 canvas.translate((int) (cx + 0.5f), (int) (cy + 0.5f)); in drawTileView()
734 if (mIsVideo) drawVideoPlayIcon(canvas, s); in drawTileView()
[all …]
DPhotoFallbackEffect.java80 public boolean draw(GLCanvas canvas) { in draw() argument
86 drawEntry(canvas, entry); in draw()
91 private void drawEntry(GLCanvas canvas, Entry entry) { in drawEntry() argument
117 canvas.drawTexture(entry.texture, mSource, mTarget); in drawEntry()
119 canvas.save(GLCanvas.SAVE_FLAG_ALPHA); in drawEntry()
120 canvas.multiplyAlpha(1 - p); in drawEntry()
125 canvas.drawTexture(entry.texture, mSource, mTarget); in drawEntry()
130 canvas.drawTexture(entry.texture, mSource, mTarget); in drawEntry()
132 canvas.restore(); in drawEntry()
137 canvas.drawTexture(entry.texture, mSource, mTarget); in drawEntry()
[all …]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/
DKeyboardView.java238 protected void onDraw(final Canvas canvas) { in onDraw() argument
239 super.onDraw(canvas); in onDraw()
240 if (canvas.isHardwareAccelerated()) { in onDraw()
241 onDrawKeyboard(canvas); in onDraw()
254 canvas.drawBitmap(mOffscreenBuffer, 0.0f, 0.0f, null); in onDraw()
281 private void onDrawKeyboard(@Nonnull final Canvas canvas) { in onDrawKeyboard() argument
291 final boolean isHardwareAccelerated = canvas.isHardwareAccelerated(); in onDrawKeyboard()
296 canvas.drawColor(Color.BLACK, PorterDuff.Mode.CLEAR); in onDrawKeyboard()
297 background.draw(canvas); in onDrawKeyboard()
301 onDrawKey(key, canvas, paint); in onDrawKeyboard()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/imageshow/
DImageShow.java256 public void onDraw(Canvas canvas) { in onDraw() argument
277 canvas.save(); in onDraw()
287 drawImageAndAnimate(canvas, getFilteredImage()); in onDraw()
289 drawImageAndAnimate(canvas, highresPreview); in onDraw()
292 drawHighresImage(canvas, fullHighres); in onDraw()
293 drawCompareImage(canvas, getGeometryOnlyImage()); in onDraw()
295 canvas.restore(); in onDraw()
298 canvas.save(); in onDraw()
304 canvas.rotate(180, getWidth()/2, getHeight()/2); in onDraw()
306 canvas.rotate(90, getWidth()/2, getHeight()/2); in onDraw()
[all …]
DGradControl.java183 public void paintGrayPoint(Canvas canvas, float x, float y) { in paintGrayPoint() argument
193 canvas.drawCircle(x, y, mCenterDotSize, paint); in paintGrayPoint()
196 public void paintPoint(Canvas canvas, float x, float y) { in paintPoint() argument
206 canvas.drawCircle(x, y, mCenterDotSize, paint); in paintPoint()
209 void paintLines(Canvas canvas, float p1x, float p1y, float p2x, float p2y) { in paintLines() argument
220 paintOvallines(canvas, mPaint, p1x, p1y, p2x, p2y); in paintLines()
225 paintOvallines(canvas, mPaint, p1x, p1y, p2x, p2y); in paintLines()
229 Canvas canvas, Paint paint, float p1x, float p1y, float p2x, float p2y) { in paintOvallines() argument
233 canvas.drawLine(p1x, p1y, p2x, p2y, paint); in paintOvallines()
243 canvas.drawLine(p1x + dy, p1y - dx, p1x - dy, p1y + dx, paint); in paintOvallines()
[all …]
/packages/apps/Camera2/src/com/android/camera/util/
DDebugBoundsRenderer.java32 public static void drawBounds(Canvas canvas, Paint paint, float size, Rect rect) { in drawBounds() argument
33 drawBounds(canvas, paint, size, rect.left, rect.top, rect.right, rect.bottom); in drawBounds()
40 public static void drawBounds(Canvas canvas, Paint paint, float size, RectF rect) { in drawBounds() argument
41 drawBounds(canvas, paint, size, rect.left, rect.top, rect.right, rect.bottom); in drawBounds()
48 public static void drawBounds(Canvas canvas, Paint paint, float size, float x1, float y1, in drawBounds() argument
52 canvas.drawLine(x1, y1, x1 + size, y1, paint); in drawBounds()
54 canvas.drawLine(x1, y1, x1, y1 + size, paint); in drawBounds()
58 canvas.drawLine(x2 - size, y1, x2, y1, paint); in drawBounds()
60 canvas.drawLine(x2, y1, x2, y1 + size, paint); in drawBounds()
64 canvas.drawLine(x2 - size, y2, x2, y2, paint); in drawBounds()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/filters/
DImageFilterDraw.java91 public void paint(FilterDrawRepresentation.StrokeData sd, Canvas canvas, Matrix toScrMatrix, in paint() argument
109 public void paint(FilterDrawRepresentation.StrokeData sd, Canvas canvas, Matrix toScrMatrix, in paint() argument
133 canvas.drawPath(mCacheTransPath, paint); in paint()
158 public void paint(FilterDrawRepresentation.StrokeData sd, Canvas canvas, in paint() argument
169 draw(canvas, paint, sd.mColor, toScrMatrix.mapRadius(sd.mRadius) * 2, in paint()
178 Canvas canvas = new Canvas(result); in createScaledBitmap() local
182 canvas.drawBitmap(src, m, paint); in createScaledBitmap()
187 void draw(Canvas canvas, Paint paint, int color, float size, Path path) { in draw() argument
208 canvas.drawBitmap(brush, mPosition[0] - s2, mPosition[1] - s2, paint); in draw()
218 void paint(FilterDrawRepresentation.StrokeData sd, Canvas canvas, Matrix toScrMatrix, in paint() argument
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/anim/
DStateTransitionAnimation.java146 …private void applyOldTexture(GLView view, GLCanvas canvas, float alpha, float scale, boolean clear… in applyOldTexture() argument
149 if (clear) canvas.clearBuffer(view.getBackgroundColor()); in applyOldTexture()
150 canvas.save(); in applyOldTexture()
151 canvas.setAlpha(alpha); in applyOldTexture()
154 canvas.translate(xOffset, yOffset); in applyOldTexture()
155 canvas.scale(scale, scale, 1); in applyOldTexture()
156 mOldScreenTexture.draw(canvas, -xOffset, -yOffset); in applyOldTexture()
157 canvas.restore(); in applyOldTexture()
160 public void applyBackground(GLView view, GLCanvas canvas) { in applyBackground() argument
162 applyOldTexture(view, canvas, mCurrentBackgroundAlpha, mCurrentBackgroundScale, true); in applyBackground()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/ui/
DSelectionRenderer.java24 public static void drawSelection(Canvas canvas, int left, int top, int right, int bottom, in drawSelection() argument
26 canvas.drawRect(left, top, right, top + stroke, paint); in drawSelection()
27 canvas.drawRect(left, bottom - stroke, right, bottom, paint); in drawSelection()
28 canvas.drawRect(left, top, left + stroke, bottom, paint); in drawSelection()
29 canvas.drawRect(right - stroke, top, right, bottom, paint); in drawSelection()
32 public static void drawSelection(Canvas canvas, int left, int top, int right, int bottom, in drawSelection() argument
34 canvas.drawRect(left, top, right, top + stroke, selectPaint); in drawSelection()
35 canvas.drawRect(left, bottom - stroke, right, bottom, selectPaint); in drawSelection()
36 canvas.drawRect(left, top, left + stroke, bottom, selectPaint); in drawSelection()
37 canvas.drawRect(right - stroke, top, right, bottom, selectPaint); in drawSelection()
[all …]
/packages/apps/Dialer/java/com/android/dialer/simulator/impl/
DSimulatorRemoteVideo.java90 Canvas canvas; in drawFrame() local
92 canvas = surface.lockCanvas(null /* dirtyRect */); in drawFrame()
102 canvas.getWidth(), in drawFrame()
103 canvas.getHeight()); in drawFrame()
104 canvas.drawColor(Color.GREEN); in drawFrame()
105 moveCircle(canvas); in drawFrame()
106 drawCircle(canvas); in drawFrame()
107 surface.unlockCanvasAndPost(canvas); in drawFrame()
111 private void moveCircle(Canvas canvas) { in moveCircle() argument
113 int width = canvas.getWidth(); in moveCircle()
[all …]
/packages/apps/Terminal/src/com/android/terminal/
DTerminalLineView.java53 protected void onDraw(Canvas canvas) { in onDraw() argument
54 super.onDraw(canvas); in onDraw()
58 canvas.drawColor(Color.MAGENTA); in onDraw()
73 canvas.save(); in onDraw()
74 canvas.translate(x, 0); in onDraw()
75 canvas.clipRect(0, 0, m.run.colSize * m.charWidth, m.charHeight); in onDraw()
77 canvas.drawPaint(m.bgPaint); in onDraw()
78 canvas.drawPosText(m.run.data, 0, m.run.dataSize, m.pos, m.textPaint); in onDraw()
80 canvas.restore(); in onDraw()
86 canvas.save(); in onDraw()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/glrenderer/
DUploadedTexture.java186 public void updateContent(GLCanvas canvas) { in updateContent() argument
191 uploadToCanvas(canvas); in updateContent()
196 canvas.texSubImage2D(this, mBorder, mBorder, bitmap, format, type); in updateContent()
210 private void uploadToCanvas(GLCanvas canvas) { in uploadToCanvas() argument
225 mId = canvas.getGLId().generateTexture(); in uploadToCanvas()
226 canvas.setTextureParameters(this); in uploadToCanvas()
229 canvas.initializeTexture(this, bitmap); in uploadToCanvas()
235 canvas.initializeTextureSize(this, format, type); in uploadToCanvas()
236 canvas.texSubImage2D(this, mBorder, mBorder, bitmap, format, type); in uploadToCanvas()
241 canvas.texSubImage2D(this, 0, 0, line, format, type); in uploadToCanvas()
[all …]
DNinePatchTexture.java140 private NinePatchInstance findInstance(GLCanvas canvas, int w, int h) { in findInstance() argument
149 removed.recycle(canvas); in findInstance()
157 public void draw(GLCanvas canvas, int x, int y, int w, int h) { in draw() argument
163 findInstance(canvas, w, h).draw(canvas, this, x, y); in draw()
170 GLCanvas canvas = mCanvasRef; in recycle() local
171 if (canvas == null) return; in recycle()
175 instance.recycle(canvas); in recycle()
398 private void prepareBuffers(GLCanvas canvas) { in prepareBuffers() argument
399 mXyBufferName = canvas.uploadBuffer(mXyBuffer); in prepareBuffers()
400 mUvBufferName = canvas.uploadBuffer(mUvBuffer); in prepareBuffers()
[all …]
DBasicTexture.java57 protected BasicTexture(GLCanvas canvas, int id, int state) { in BasicTexture() argument
58 setAssociatedCanvas(canvas); in BasicTexture()
70 protected void setAssociatedCanvas(GLCanvas canvas) { in setAssociatedCanvas() argument
71 mCanvasRef = canvas; in setAssociatedCanvas()
137 public void draw(GLCanvas canvas, int x, int y) { in draw() argument
138 canvas.drawTexture(this, x, y, getWidth(), getHeight()); in draw()
142 public void draw(GLCanvas canvas, int x, int y, int w, int h) { in draw() argument
143 canvas.drawTexture(this, x, y, w, h); in draw()
148 abstract protected boolean onBind(GLCanvas canvas); in onBind() argument
173 GLCanvas canvas = mCanvasRef; in freeResource() local
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/widget/
DChartGridView.java106 protected void onDraw(Canvas canvas) { in onDraw() argument
118 secondary.draw(canvas); in onDraw()
131 primary.draw(canvas); in onDraw()
136 mBorder.draw(canvas); in onDraw()
142 final int saveCount = canvas.save(); in onDraw()
143 canvas.translate(0, height + padding); in onDraw()
144 start.draw(canvas); in onDraw()
145 canvas.restoreToCount(saveCount); in onDraw()
150 final int saveCount = canvas.save(); in onDraw()
151 canvas.translate((width - mid.getWidth()) / 2, height + padding); in onDraw()
[all …]
DUsageGraph.java243 protected void onDraw(Canvas canvas) { in onDraw() argument
247 drawDivider(0, canvas, mTopDividerTint); in onDraw()
250 (int) ((canvas.getHeight() - mDividerSize) * mMiddleDividerLoc), in onDraw()
251 canvas, in onDraw() local
253 drawDivider(canvas.getHeight() - mDividerSize, canvas, -1); in onDraw() local
259 canvas.save(); in onDraw()
262 canvas.scale(-1, 1, canvas.getWidth() * 0.5f, 0); in onDraw()
264 drawLinePath(canvas, mLocalProjectedPaths, mDottedPaint); in onDraw()
265 drawFilledPath(canvas, mLocalPaths, mFillPaint); in onDraw()
266 drawLinePath(canvas, mLocalPaths, mLinePaint); in onDraw()
[all …]
/packages/apps/Settings/src/com/android/settings/widget/
DChartGridView.java106 protected void onDraw(Canvas canvas) { in onDraw() argument
118 secondary.draw(canvas); in onDraw()
131 primary.draw(canvas); in onDraw()
136 mBorder.draw(canvas); in onDraw()
142 final int saveCount = canvas.save(); in onDraw()
143 canvas.translate(0, height + padding); in onDraw()
144 start.draw(canvas); in onDraw()
145 canvas.restoreToCount(saveCount); in onDraw()
150 final int saveCount = canvas.save(); in onDraw()
151 canvas.translate((width - mid.getWidth()) / 2, height + padding); in onDraw()
[all …]
DUsageGraph.java243 protected void onDraw(Canvas canvas) { in onDraw() argument
247 drawDivider(0, canvas, mTopDividerTint); in onDraw()
250 (int) ((canvas.getHeight() - mDividerSize) * mMiddleDividerLoc), in onDraw()
251 canvas, in onDraw() local
253 drawDivider(canvas.getHeight() - mDividerSize, canvas, -1); in onDraw() local
259 canvas.save(); in onDraw()
262 canvas.scale(-1, 1, canvas.getWidth() * 0.5f, 0); in onDraw()
264 drawLinePath(canvas, mLocalProjectedPaths, mDottedPaint); in onDraw()
265 drawFilledPath(canvas, mLocalPaths, mFillPaint); in onDraw()
266 drawLinePath(canvas, mLocalPaths, mLinePaint); in onDraw()
[all …]
/packages/apps/WallpaperPicker/src/com/android/gallery3d/glrenderer/
DUploadedTexture.java125 public void updateContent(GLCanvas canvas) { in updateContent() argument
127 uploadToCanvas(canvas); in updateContent()
132 canvas.texSubImage2D(this, 0, 0, bitmap, format, type); in updateContent()
138 private void uploadToCanvas(GLCanvas canvas) { in uploadToCanvas() argument
150 mId = canvas.getGLId().generateTexture(); in uploadToCanvas()
151 canvas.setTextureParameters(this); in uploadToCanvas()
154 canvas.initializeTexture(this, bitmap); in uploadToCanvas()
160 canvas.initializeTextureSize(this, format, type); in uploadToCanvas()
161 canvas.texSubImage2D(this, 0, 0, bitmap, format, type); in uploadToCanvas()
166 canvas.texSubImage2D(this, bWidth, 0, line, format, type); in uploadToCanvas()
[all …]
DBasicTexture.java54 protected BasicTexture(GLCanvas canvas, int id, int state) { in BasicTexture() argument
55 setAssociatedCanvas(canvas); in BasicTexture()
67 protected void setAssociatedCanvas(GLCanvas canvas) { in setAssociatedCanvas() argument
68 mCanvasRef = canvas; in setAssociatedCanvas()
111 public void draw(GLCanvas canvas, int x, int y) { in draw() argument
112 canvas.drawTexture(this, x, y, getWidth(), getHeight()); in draw()
116 public void draw(GLCanvas canvas, int x, int y, int w, int h) { in draw() argument
117 canvas.drawTexture(this, x, y, w, h); in draw()
122 abstract protected boolean onBind(GLCanvas canvas); in onBind() argument
144 GLCanvas canvas = mCanvasRef; in freeResource() local
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/category/
DIconView.java97 protected void drawText(Canvas canvas, String text) { in drawText() argument
102 int x = (int) (canvas.getWidth() - textWidth - 2*mMargin); in drawText()
104 x = (int) ((canvas.getWidth() - textWidth) / 2.0f); in drawText()
111 int y = canvas.getHeight() - 2*mMargin; in drawText()
112 canvas.drawText(text, x, y, mPaint); in drawText()
115 protected void drawOutlinedText(Canvas canvas, String text) { in drawOutlinedText() argument
119 drawText(canvas, text); in drawOutlinedText()
123 drawText(canvas, text); in drawOutlinedText()
193 public void onDraw(Canvas canvas) { in onDraw() argument
197 canvas.drawColor(mBackgroundColor); in onDraw()
[all …]
/packages/apps/Camera2/src/com/android/camera/widget/
DRoundedThumbnailView.java296 protected void onDraw(Canvas canvas) { in onDraw() argument
297 super.onDraw(canvas); in onDraw()
299 final float centerX = canvas.getWidth() / 2; in onDraw()
300 final float centerY = canvas.getHeight() / 2; in onDraw()
305 canvas.clipRect(mViewRect); in onDraw()
314 canvas.save(); in onDraw()
315 canvas.scale(scaleRatio, scaleRatio, centerX, centerY); in onDraw()
316 canvas.drawRoundRect( in onDraw()
321 canvas.restore(); in onDraw()
333 canvas.save(); in onDraw()
[all …]

12345678910>>...15