Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Changed: renamed .nextPage() to .addPage()

  • Loading branch information...
commit eb0edf2ce406d97c6d2b2c821cabf4e9747bd3bc 1 parent 47e9ea1
@tj tj authored
View
4 examples/multi-page-pdf.js
@@ -24,12 +24,12 @@ function p(str) {
reset();
h1('PDF demo');
p('Multi-page PDF demonstration');
-ctx.nextPage();
+ctx.addPage();
reset();
h1('Page #2');
p('This is the second page');
-ctx.nextPage();
+ctx.addPage();
reset();
h1('Page #3');
View
4 examples/pdf-images.js
@@ -34,14 +34,14 @@ h1('PDF image demo');
p('This is an image embedded in a PDF');
img('examples/images/squid.png');
p('Figure 1.0 - Some squid thing');
-ctx.nextPage();
+ctx.addPage();
reset();
h1('Lime cat');
p('This is a pretty sweet cat');
img('examples/images/lime-cat.jpg');
p('Figure 1.1 - Lime cat is awesome');
-ctx.nextPage();
+ctx.addPage();
fs.writeFile('out.pdf', canvas.toBuffer());
console.log('created out.pdf');
View
4 src/CanvasRenderingContext2d.cc
@@ -62,7 +62,7 @@ Context2d::Initialize(Handle<Object> target) {
Local<ObjectTemplate> proto = constructor->PrototypeTemplate();
NODE_SET_PROTOTYPE_METHOD(constructor, "drawImage", DrawImage);
NODE_SET_PROTOTYPE_METHOD(constructor, "putImageData", PutImageData);
- NODE_SET_PROTOTYPE_METHOD(constructor, "nextPage", NextPage);
+ NODE_SET_PROTOTYPE_METHOD(constructor, "addPage", AddPage);
NODE_SET_PROTOTYPE_METHOD(constructor, "save", Save);
NODE_SET_PROTOTYPE_METHOD(constructor, "restore", Restore);
NODE_SET_PROTOTYPE_METHOD(constructor, "rotate", Rotate);
@@ -417,7 +417,7 @@ Context2d::New(const Arguments &args) {
*/
Handle<Value>
-Context2d::NextPage(const Arguments &args) {
+Context2d::AddPage(const Arguments &args) {
HandleScope scope;
Context2d *context = ObjectWrap::Unwrap<Context2d>(args.This());
if (!context->canvas()->isPDF()) {
View
2  src/CanvasRenderingContext2d.h
@@ -57,7 +57,7 @@ class Context2d: public node::ObjectWrap {
static Handle<Value> IsPointInPath(const Arguments &args);
static Handle<Value> BeginPath(const Arguments &args);
static Handle<Value> ClosePath(const Arguments &args);
- static Handle<Value> NextPage(const Arguments &args);
+ static Handle<Value> AddPage(const Arguments &args);
static Handle<Value> Clip(const Arguments &args);
static Handle<Value> Fill(const Arguments &args);
static Handle<Value> Stroke(const Arguments &args);
Please sign in to comment.
Something went wrong with that request. Please try again.