Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Side by Side Diff: experimental/fiddle/draw.cpp

Issue 1349163003: experiment/fiddle (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 /*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7 #include "fiddle_main.h"
8 void draw(SkCanvas* canvas) {
9 canvas->clear(SK_ColorWHITE);
10 SkMatrix matrix;
11 matrix.setScale(0.75f, 0.75f);
12 matrix.preRotate(30.0f);
13 SkShader* shader =
14 SkShader::CreateBitmapShader(source, SkShader::kRepeat_TileMode,
15 SkShader::kRepeat_TileMode, &matrix);
16 SkPaint paint;
17 paint.setShader(shader);
18 shader->unref();
19 canvas->drawPaint(paint);
20 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698