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

Side by Side Diff: src/utils/SkLua.cpp

Issue 24811002: Update the SkDocument interface to allow for 1) abort won't emit pdf, 2) close can report success/f… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: update comments Created 7 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 | Annotate | Revision Log
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 "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
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
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 }
OLDNEW
« src/pdf/SkPDFDevice.cpp ('K') | « src/pdf/SkPDFShader.cpp ('k') | tools/PdfRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698