OLD | NEW |
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 "SkLua.h" | 8 #include "SkLua.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkData.h" | 10 #include "SkData.h" |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 { "translate", lcanvas_translate }, | 428 { "translate", lcanvas_translate }, |
429 { "rotate", lcanvas_rotate }, | 429 { "rotate", lcanvas_rotate }, |
430 { "__gc", lcanvas_gc }, | 430 { "__gc", lcanvas_gc }, |
431 { NULL, NULL } | 431 { NULL, NULL } |
432 }; | 432 }; |
433 | 433 |
434 /////////////////////////////////////////////////////////////////////////////// | 434 /////////////////////////////////////////////////////////////////////////////// |
435 | 435 |
436 static int ldocument_beginPage(lua_State* L) { | 436 static int ldocument_beginPage(lua_State* L) { |
437 const SkRect* contentPtr = NULL; | 437 const SkRect* contentPtr = NULL; |
438 push_ref(L, get_ref<SkDocument>(L, 1)->beginPage(lua2scalar(L, 2), | 438 push_ref(L, get_ref<SkDocument>(L, 1)->beginPage(SkSize::Make(lua2scalar(L,
2), |
439 lua2scalar(L, 3), | 439 lua2scalar(L,
3)), |
440 contentPtr)); | 440 contentPtr)); |
441 return 1; | 441 return 1; |
442 } | 442 } |
443 | 443 |
444 static int ldocument_endPage(lua_State* L) { | 444 static int ldocument_endPage(lua_State* L) { |
445 get_ref<SkDocument>(L, 1)->endPage(); | 445 get_ref<SkDocument>(L, 1)->endPage(); |
446 return 0; | 446 return 0; |
447 } | 447 } |
448 | 448 |
449 static int ldocument_close(lua_State* L) { | 449 static int ldocument_close(lua_State* L) { |
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1120 REG_CLASS(L, SkShader); | 1120 REG_CLASS(L, SkShader); |
1121 REG_CLASS(L, SkTypeface); | 1121 REG_CLASS(L, SkTypeface); |
1122 REG_CLASS(L, SkMatrix); | 1122 REG_CLASS(L, SkMatrix); |
1123 } | 1123 } |
1124 | 1124 |
1125 extern "C" int luaopen_skia(lua_State* L); | 1125 extern "C" int luaopen_skia(lua_State* L); |
1126 extern "C" int luaopen_skia(lua_State* L) { | 1126 extern "C" int luaopen_skia(lua_State* L) { |
1127 SkLua::Load(L); | 1127 SkLua::Load(L); |
1128 return 0; | 1128 return 0; |
1129 } | 1129 } |
OLD | NEW |