/frameworks/base/libs/hwui/tests/common/scenes/ |
ShadowGridAnimation.cpp | 31 void createContent(int width, int height, TestCanvas& canvas) override { 32 canvas.drawColor(0xFFFFFFFF, SkXfermode::kSrcOver_Mode); 33 canvas.insertReorderBarrier(true); 38 canvas.drawRenderNode(card.get()); 43 canvas.insertReorderBarrier(false); 56 [width, height](RenderProperties& props, TestCanvas& canvas) { 60 canvas.drawColor(0xFFEEEEEE, SkXfermode::kSrcOver_Mode);
|
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/ |
AssetsAtlasActivity.java | 22 import android.graphics.Canvas; 50 protected void onDraw(Canvas canvas) { 51 super.onDraw(canvas); 59 canvas.drawBitmap(mBitmap, 0.0f, 0.0f, null); 60 canvas.translate(0.0f, mBitmap.getHeight()); 61 canvas.drawBitmap(mBitmap, matrix, null); 62 canvas.translate(0.0f, mBitmap.getHeight()); 63 canvas.drawBitmap(mBitmap, src, dst, null);
|
ClipRegion3Activity.java | 21 import android.graphics.Canvas; 67 protected void dispatchDraw(Canvas canvas) { 68 canvas.drawARGB(255, 255, 255, 255); 70 canvas.save(Canvas.MATRIX_SAVE_FLAG); 71 canvas.translate(mClipPosition * getWidth(), getHeight() / 2.0f); 72 canvas.clipPath(mClipPath); 73 canvas.restore(); 75 super.dispatchDraw(canvas); [all...] |
PaintDrawFilterActivity.java | 21 import android.graphics.Canvas; 54 protected void onDraw(Canvas canvas) { 55 super.onDraw(canvas); 56 canvas.drawRGB(255, 255, 255); 58 canvas.setDrawFilter(null); 59 canvas.drawText("Hello OpenGL renderer!", 100, 120, mMediumPaint); 60 canvas.setDrawFilter(mDrawFilter); 61 canvas.drawText("Hello OpenGL renderer!", 100, 220, mMediumPaint);
|
/frameworks/support/core-ui/java/android/support/v4/widget/ |
SwipeProgressBar.java | 19 import android.graphics.Canvas; 138 void draw(Canvas canvas) { 144 int restoreCount = canvas.save(); 145 canvas.clipRect(mBounds); 172 canvas.saveLayerAlpha(mClipRect, 0, 0); 182 canvas.drawColor(mColor1); 185 canvas.drawColor(mColor4); 187 canvas.drawColor(mColor1); 189 canvas.drawColor(mColor2) [all...] |
/external/skia/gm/ |
all_bitmap_configs.cpp | 58 SkCanvas* canvas) { 62 canvas->drawText(&c, 1, x - bounds.centerX(), y - bounds.centerY(), *p); 65 static void color_wheel_native(SkCanvas* canvas) { 66 SkAutoCanvasRestore autoCanvasRestore(canvas, true); 67 canvas->translate(0.5f * SCALE, 0.5f * SCALE); 71 canvas->drawCircle(0.0f, 0.0f, SCALE * 0.5f, p); 80 draw_center_letter('K', &p, SK_ColorBLACK, Z, Z, canvas); 81 draw_center_letter('R', &p, SK_ColorRED, Z, D, canvas); 82 draw_center_letter('G', &p, SK_ColorGREEN, -X, -Y, canvas); 83 draw_center_letter('B', &p, SK_ColorBLUE, X, -Y, canvas); [all...] |
blurquickreject.cpp | 33 void onDraw(SkCanvas* canvas) override { 63 canvas->clear(SK_ColorBLACK); 64 canvas->save(); 65 canvas->translate(kBoxSize, kBoxSize); 66 canvas->drawRect(clipRect, hairlinePaint); 67 canvas->clipRect(clipRect); 70 canvas->drawRect(blurRects[i], blurPaint); 71 canvas->drawRect(blurRects[i], hairlinePaint); 73 canvas->restore();
|
bmpfilterqualityrepeat.cpp | 23 SkCanvas canvas(fBmp); 27 canvas.drawBitmap(colorBmp, 0, 0); 29 canvas.drawBitmap(colorBmp, 20, 0); 31 canvas.drawBitmap(colorBmp, 0, 20); 33 canvas.drawBitmap(colorBmp, 20, 20); 40 void onDraw(SkCanvas* canvas) override { 65 canvas->drawRect(rect, bmpPaint); 67 canvas->drawText(kQualities[q].fName, strlen(kQualities[q].fName), 20, 40, paint); 68 canvas->translate(250, 0);
|
fontcache.cpp | 15 static SkScalar draw_string(SkCanvas* canvas, const SkString& text, SkScalar x, 17 canvas->drawText(text.c_str(), text.size(), x, y, paint); 47 void onDraw(SkCanvas* canvas) override { 61 draw_string(canvas, text, x, y, paint); 64 draw_string(canvas, text2, x, y, paint); 67 draw_string(canvas, text3, x, y, paint); 70 draw_string(canvas, text, x, y, paint); 72 draw_string(canvas, text2, x, y, paint); 74 draw_string(canvas, text3, x, y, paint);
|
pictureshader.cpp | 56 void onDraw(SkCanvas* canvas) override { 57 this->drawSceneColumn(canvas, SkPoint::Make(0, 0), 1, 1, 0); 58 this->drawSceneColumn(canvas, SkPoint::Make(0, fSceneSize * 6.4f), 1, 2, 0); 59 this->drawSceneColumn(canvas, SkPoint::Make(fSceneSize * 2.4f, 0), 1, 1, 1); 60 this->drawSceneColumn(canvas, SkPoint::Make(fSceneSize * 2.4f, fSceneSize * 6.4f), 1, 1, 2); 61 this->drawSceneColumn(canvas, SkPoint::Make(fSceneSize * 4.8f, 0), 2, 1, 0); 62 this->drawSceneColumn(canvas, SkPoint::Make(fSceneSize * 9.6f, 0), 2, 2, 0); 69 this->drawScene(canvas, ctm, localMatrix, 0); 73 this->drawScene(canvas, ctm, localMatrix, 0); 77 this->drawScene(canvas, ctm, localMatrix, 0) [all...] |
shadertext2.cpp | 16 SkCanvas canvas(*bm); 29 canvas.drawPaint(paint); 32 canvas.drawPaint(paint); 42 DEF_SIMPLE_GM_BG(shadertext2, canvas, 1800, 900, 104 canvas->translate(15.f, 15.f); 105 canvas->drawBitmap(bmp, 0, 0); 106 canvas->translate(0, bmp.height() + labelPaint.getTextSize() + 15.f); 109 canvas->drawText(kLabelLabel, strlen(kLabelLabel), 0, 0, labelPaint); 110 canvas->translate(0, 15.f); 112 canvas->save() [all...] |
showmiplevels.cpp | 26 SkCanvas canvas(bm); 27 canvas.clear(0xFFFFFFFF); 32 canvas.drawCircle(w/2.0f, h/2.0f, w/3.0f, paint); 39 SkCanvas canvas(bm); 40 canvas.clear(0xFFFFFFFF); 48 canvas.drawRect(r, paint); 59 SkCanvas canvas(bm); 60 canvas.clear(0xFFFFFFFF); 70 canvas.drawLine(p[0],p[1], p[2], p[3], paint); 128 static void DrawAndFrame(SkCanvas* canvas, const SkBitmap& orig, SkScalar x, SkScalar y) [all...] |
transparency.cpp | 12 static void make_transparency(SkCanvas* canvas, 39 canvas->drawRect(r, p); 55 static void checkerboard(SkCanvas* canvas, SkColor c1, SkColor c2, int size) { 58 canvas->drawPaint(paint); 65 DEF_SIMPLE_GM(transparency_check, canvas, 1792, 1080) { 66 checkerboard(canvas, sk_tool_utils::color_to_565(0xFF999999), 69 SkAutoCanvasRestore autoCanvasRestore(canvas, true); 72 canvas->scale(7.0f, 120.0f); 73 surface->draw(canvas, 0, 0, nullptr);
|
bigtileimagefilter.cpp | 15 SkCanvas* canvas = surface->getCanvas(); local 16 canvas->clear(0xFF000000); 23 canvas->drawCircle(SkScalarHalf(size), SkScalarHalf(size), SkScalarHalf(size), paint); 51 void onDraw(SkCanvas* canvas) override { 52 canvas->clear(SK_ColorBLACK); 65 canvas->saveLayer(&bound, &p); 66 canvas->restore(); 80 canvas->translate(320, 320); 81 canvas->saveLayer(&bound2, &p2); 82 canvas->setMatrix(SkMatrix::I()) [all...] |
copyTo4444.cpp | 33 virtual void onDraw(SkCanvas* canvas) { 42 canvas->drawBitmap(bm, 0, 0); 44 canvas->drawBitmap(bm4444, SkIntToScalar(bm.width()), 0);
|
gradient_matrix.cpp | 78 static void draw_gradients(SkCanvas* canvas, 91 canvas->save(); 95 canvas->restore(); 96 canvas->translate(0, TESTGRID_Y); 97 canvas->save(); 105 canvas->drawRect(rectGrad, paint); 108 canvas->translate(TESTGRID_X, 0); 111 canvas->restore(); 114 DEF_SIMPLE_GM_BG(gradient_matrix, canvas, 800, 800, 116 draw_gradients(canvas, &make_linear_gradient [all...] |
lcdoverlap.cpp | 52 void drawTestCase(SkCanvas* canvas, SkScalar x, SkScalar y, SkXfermode::Mode mode, 66 canvas->save(); 67 canvas->translate(x, y); 68 canvas->rotate(360.0f / SK_ARRAY_COUNT(colors) * i); 69 canvas->translate(-fBlob->bounds().width() / 2.0f + 0.5f, 0); 74 canvas->drawTextBlob(fBlob, 0, 0, textPaint); 75 canvas->restore(); 79 void onDraw(SkCanvas* canvas) override { 82 drawTestCase(canvas, offsetX, offsetY, SkXfermode::kSrc_Mode, SkXfermode::kSrc_Mode); 83 drawTestCase(canvas, 3 * offsetX, offsetY, SkXfermode::kSrcOver_Mode [all...] |
localmatriximagefilter.cpp | 52 static void show_image(SkCanvas* canvas, SkImage* image, SkImageFilter* filter) { 57 canvas->drawRect(r, paint); 61 canvas->drawImage(image, 0, 0, &paint); 64 void onDraw(SkCanvas* canvas) override { 65 SkAutoTUnref<SkImage> image0(make_image(canvas)); 82 canvas->translate(40, 40); 86 canvas->save(); 87 show_image(canvas, image0, filter); 90 canvas->translate(spacer, 0); 91 show_image(canvas, image0, localFilter) [all...] |
/external/skia/samplecode/ |
SampleLines.cpp | 48 void drawRings(SkCanvas* canvas) { 49 canvas->scale(SkIntToScalar(1)/2, SkIntToScalar(1)/2); 62 canvas->drawRect(r, paint); 65 void onDrawContent(SkCanvas* canvas) override { 68 canvas->drawBitmap(bm, 0, 0, nullptr); 70 this->drawRings(canvas); 83 canvas->drawRect(r, paint); 92 canvas->drawLine(x, y, x + SkIntToScalar(90), y + SkIntToScalar(90), paint); 96 canvas->drawLine(x, y, x + SkIntToScalar(90), y + SkIntToScalar(90), paint);
|
SampleFontScalerTest.cpp | 67 static void rotate_about(SkCanvas* canvas, SkScalar degrees, SkScalar px, SkScalar py) { 68 canvas->translate(px, py); 69 canvas->rotate(degrees); 70 canvas->translate(-px, -py); 73 virtual void onDrawContent(SkCanvas* canvas) { 90 canvas->drawPath(path, paint); 107 SkAutoCanvasRestore acr(canvas, true); 108 canvas->translate(SkIntToScalar(50 + i * 230), 110 rotate_about(canvas, SkIntToScalar(i * 5), x, y * 10); 117 canvas->drawRect(r, p) [all...] |
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/crop/ |
CropDrawingUtils.java | 19 import android.graphics.Canvas; 30 public static void drawRuleOfThird(Canvas canvas, RectF bounds) { 40 canvas.drawLine(x, bounds.top, x, bounds.bottom, p); 44 canvas.drawLine(bounds.left, y, bounds.right, y, p); 49 public static void drawCropRect(Canvas canvas, RectF bounds) { 54 canvas.drawRect(bounds, p); 57 public static void drawShade(Canvas canvas, RectF bounds) [all...] |
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/ |
LayoutPoint.java | 27 * A {@link LayoutPoint} is a coordinate in the Android canvas (in other words, 28 * it may differ from the canvas control mouse coordinate because the canvas may 32 /** Containing canvas which the point is relative to. */ 35 /** The X coordinate of the canvas coordinate. */ 38 /** The Y coordinate of the canvas coordinate. */ 45 * {@link MouseEvent#y} fields are relative to the canvas. 47 * @param canvas The {@link LayoutCanvas} this point is within. 53 public static LayoutPoint create(LayoutCanvas canvas, MouseEvent event) { 54 // The mouse event coordinates should already be relative to the canvas [all...] |
/external/pdfium/xfa/src/fdp/src/fde/ |
fde_iterator.cpp | 19 FDE_CANVASITEM canvas;
local 20 canvas.hCanvas = NULL;
21 canvas.pCanvas = pCanvas;
22 canvas.hPos = pCanvas->GetFirstPosition(NULL);
23 if (canvas.hPos == NULL) {
26 return m_CanvasStack.Push(canvas) == 0;
66 FDE_CANVASITEM canvas;
local 67 canvas.hCanvas = hObj;
68 canvas.pCanvas = (IFDE_CanvasSet*)pVisualSet;
69 canvas.hPos = canvas.pCanvas->GetFirstPosition(hObj); [all...] |
/external/skia/bench/ |
GMBench.cpp | 24 void GMBench::onDraw(int loops, SkCanvas* canvas) { 27 fGM->drawBackground(canvas); 29 fGM->drawContent(canvas);
|
/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/glrenderer/ |
BasicTexture.java | 57 protected BasicTexture(GLCanvas canvas, int id, int state) { 58 setAssociatedCanvas(canvas); 70 protected void setAssociatedCanvas(GLCanvas canvas) { 71 mCanvasRef = canvas; 137 public void draw(GLCanvas canvas, int x, int y) { 138 canvas.drawTexture(this, x, y, getWidth(), getHeight()); 142 public void draw(GLCanvas canvas, int x, int y, int w, int h) { 143 canvas.drawTexture(this, x, y, w, h); 148 abstract protected boolean onBind(GLCanvas canvas); 173 GLCanvas canvas = mCanvasRef local [all...] |