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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: experimental/fiddle/draw.cpp
diff --git a/experimental/fiddle/draw.cpp b/experimental/fiddle/draw.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..7d8bd060ffde616f133a52851b23f5bac50dfc23
--- /dev/null
+++ b/experimental/fiddle/draw.cpp
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2015 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+#include "fiddle_main.h"
+void draw(SkCanvas* canvas) {
+ canvas->clear(SK_ColorWHITE);
+ SkMatrix matrix;
+ matrix.setScale(0.75f, 0.75f);
+ matrix.preRotate(30.0f);
+ SkShader* shader =
+ SkShader::CreateBitmapShader(source, SkShader::kRepeat_TileMode,
+ SkShader::kRepeat_TileMode, &matrix);
+ SkPaint paint;
+ paint.setShader(shader);
+ shader->unref();
+ canvas->drawPaint(paint);
+}

Powered by Google App Engine
This is Rietveld 408576698