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

Side by Side Diff: samplecode/SampleLua.cpp

Issue 667803004: add gradients and drawPaint to lua (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 unified diff | Download patch
« no previous file with comments | « resources/slides.lua ('k') | src/utils/SkLua.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SampleCode.h" 8 #include "SampleCode.h"
9 #include "SkView.h" 9 #include "SkView.h"
10 #include "SkLua.h" 10 #include "SkLua.h"
11 #include "SkCanvas.h" 11 #include "SkCanvas.h"
12 #include "Resources.h" 12 #include "Resources.h"
13 #include "SkData.h" 13 #include "SkData.h"
14 14
15 extern "C" { 15 extern "C" {
16 #include "lua.h" 16 #include "lua.h"
17 #include "lualib.h" 17 #include "lualib.h"
18 #include "lauxlib.h" 18 #include "lauxlib.h"
19 } 19 }
20 20
21 #define LUA_FILENAME "test.lua" 21 //#define LUA_FILENAME "test.lua"
22 //#define LUA_FILENAME "slides.lua" 22 #define LUA_FILENAME "slides.lua"
23 23
24 static const char gDrawName[] = "onDrawContent"; 24 static const char gDrawName[] = "onDrawContent";
25 static const char gClickName[] = "onClickHandler"; 25 static const char gClickName[] = "onClickHandler";
26 static const char gUnicharName[] = "onCharHandler"; 26 static const char gUnicharName[] = "onCharHandler";
27 27
28 static const char gMissingCode[] = "" 28 static const char gMissingCode[] = ""
29 "local paint = Sk.newPaint()" 29 "local paint = Sk.newPaint()"
30 "paint:setAntiAlias(true)" 30 "paint:setAntiAlias(true)"
31 "paint:setTextSize(30)" 31 "paint:setTextSize(30)"
32 "" 32 ""
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 private: 148 private:
149 SkLua* fLua; 149 SkLua* fLua;
150 150
151 typedef SampleView INHERITED; 151 typedef SampleView INHERITED;
152 }; 152 };
153 153
154 ////////////////////////////////////////////////////////////////////////////// 154 //////////////////////////////////////////////////////////////////////////////
155 155
156 static SkView* MyFactory() { return new LuaView; } 156 static SkView* MyFactory() { return new LuaView; }
157 static SkViewRegister reg(MyFactory); 157 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « resources/slides.lua ('k') | src/utils/SkLua.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698