Lines Matching refs:canvas

27     void drawRect(SkCanvas* canvas, int x, int y, const SkPaint& paint, const SkISize& size) {  in drawRect()  argument
28 canvas->save(); in drawRect()
29 canvas->translate(SkIntToScalar(x), SkIntToScalar(y)); in drawRect()
32 canvas->drawRect(r, paint); in drawRect()
33 canvas->restore(); in drawRect()
36 void test(SkCanvas* canvas, int x, int y, SkPerlinNoiseShader::Type type, in test() argument
48 drawRect(canvas, x, y, paint, tileSize); in test()
50 drawRect(canvas, x, y, paint, tileSize); in test()
52 drawRect(canvas, x, y, paint, tileSize); in test()
54 drawRect(canvas, x, y, paint, tileSize); in test()
56 drawRect(canvas, x, y, paint, fSize); in test()
60 virtual void onDraw(SkCanvas* canvas) { in onDraw() argument
61 canvas->clear(SK_ColorBLACK); in onDraw()
62 test(canvas, 0, 0, SkPerlinNoiseShader::kFractalNoise_Type, in onDraw()
64 test(canvas, 100, 0, SkPerlinNoiseShader::kTurbulence_Type, in onDraw()
67 test(canvas, 0, 100, SkPerlinNoiseShader::kFractalNoise_Type, in onDraw()
69 test(canvas, 100, 100, SkPerlinNoiseShader::kFractalNoise_Type, in onDraw()
72 test(canvas, 0, 200, SkPerlinNoiseShader::kTurbulence_Type, in onDraw()
74 test(canvas, 100, 200, SkPerlinNoiseShader::kTurbulence_Type, in onDraw()
77 test(canvas, 0, 300, SkPerlinNoiseShader::kFractalNoise_Type, in onDraw()
79 test(canvas, 100, 300, SkPerlinNoiseShader::kFractalNoise_Type, in onDraw()
82 canvas->scale(0.75f, 1.0f); in onDraw()
84 test(canvas, 0, 400, SkPerlinNoiseShader::kFractalNoise_Type, in onDraw()
86 test(canvas, 100, 400, SkPerlinNoiseShader::kFractalNoise_Type, in onDraw()
121 virtual void onDraw(SkCanvas* canvas) { in onDraw() argument
122 canvas->translate(10, 10); in onDraw()
131 canvas->drawRect(r, paint); in onDraw()
133 canvas->save(); in onDraw()
134 canvas->translate(w * 5/4, 0); in onDraw()
135 canvas->drawRect(r, paint); in onDraw()
136 canvas->restore(); in onDraw()
138 canvas->save(); in onDraw()
139 canvas->translate(0, h + 10); in onDraw()
140 canvas->scale(2, 2); in onDraw()
141 canvas->drawRect(r, paint); in onDraw()
142 canvas->restore(); in onDraw()
144 canvas->save(); in onDraw()
145 canvas->translate(w + 100, h + 10); in onDraw()
146 canvas->scale(2, 2); in onDraw()
147 canvas->drawRect(r, paint); in onDraw()
148 canvas->restore(); in onDraw()
153 canvas->translate(0, h * 2 + 10); in onDraw()
161 canvas->save(); in onDraw()
162 canvas->translate(0, h + 10); in onDraw()
163 canvas->drawRect(r, paint); in onDraw()
164 canvas->restore(); in onDraw()
166 canvas->save(); in onDraw()
167 canvas->translate(w + 100, h + 10); in onDraw()
168 canvas->drawRect(r, paint); in onDraw()
169 canvas->restore(); in onDraw()