diff options
author | 2014-10-12 19:05:52 -0700 | |
---|---|---|
committer | 2014-10-12 19:05:52 -0700 | |
commit | 0d76b95ae0239010bc3eec5297b91c952cdab3cc (patch) | |
tree | fab90bda88c1a15f4651708c8fbc068d7b314868 /samplecode/SampleLua.cpp | |
parent | f355df58517691b05be8bc3f0e99331ede6c4d44 (diff) |
add fade_slide transition to lua slides
TBR=
BUG=skia:
Review URL: https://codereview.chromium.org/646613004
Diffstat (limited to 'samplecode/SampleLua.cpp')
-rw-r--r-- | samplecode/SampleLua.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/samplecode/SampleLua.cpp b/samplecode/SampleLua.cpp index e7af727ab5..1536ed4fb8 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); |