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

Unified Diff: samplecode/SampleLua.cpp

Issue 646613004: add fade_slide transition to lua slides (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « resources/slides.lua ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleLua.cpp
diff --git a/samplecode/SampleLua.cpp b/samplecode/SampleLua.cpp
index e7af727ab5b7b63e30870eeb347878fee5de286b..1536ed4fb846198cf2efb23cc0cf038383d4da72 100644
--- a/samplecode/SampleLua.cpp
+++ b/samplecode/SampleLua.cpp
@@ -100,6 +100,12 @@ protected:
}
virtual void onDrawContent(SkCanvas* canvas) SK_OVERRIDE {
+ SkMatrix matrix;
+ matrix.setRectToRect(SkRect::MakeWH(640, 480),
+ SkRect::MakeWH(this->width(), this->height()),
+ SkMatrix::kCenter_ScaleToFit);
+ canvas->concat(matrix);
+
lua_State* L = this->ensureLua();
lua_getglobal(L, gDrawName);
« no previous file with comments | « resources/slides.lua ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698