diff --git a/History.md b/History.md index d3bb98c..76bb6a1 100644 --- a/History.md +++ b/History.md @@ -1,30 +1,42 @@ +1.1.2 / 2013-10-31 +================== + + * NAN dep upgrade, full node@<=0.11.8 compatibility + * Use node::MakeCallback() instead of v8::Function::Call() + * Improve nan location discovery + * Fix enabling gif/jpeg options on Ubuntu 13.04 + +1.1.1 / 2013-10-09 +================== + + * add better support for outdated versions of Cairo -1.1.0 / 2013-08-01 +1.1.0 / 2013-08-01 ================== - * add png compression options - * add jpeg stream progressive mode option + * add png compression options + * add jpeg stream progressive mode option * fix resource leaks on read errors -1.0.4 / 2013-07-23 +1.0.4 / 2013-07-23 ================== * 0.11.4+ compatibility using NAN * fix typo in context2d for imageSmoothingEnabled -1.0.3 / 2013-06-04 +1.0.3 / 2013-06-04 ================== * add "nearest" and "bilinear" to patternQuality * fix fread() retval check (items not bytes) * removed unneeded private fields -1.0.2 / 2013-03-22 +1.0.2 / 2013-03-22 ================== * add Context2d#imageSmoothingEnabled= -1.0.1 / 2013-02-25 +1.0.1 / 2013-02-25 ================== * travis: test modern node versions diff --git a/Readme.md b/Readme.md index c76f94e..e209320 100644 --- a/Readme.md +++ b/Readme.md @@ -109,7 +109,7 @@ _Note: At the moment, `jpegStream()` is the same as `syncJPEGStream()`, both are synchronous_ ```javascript -var stream = canvas.JPEGStream({ +var stream = canvas.jpegStream({ bufsize: 4096 // output buffer size in bytes, default: 4096 , quality: 75 // JPEG quality (0-100) default: 75 , progressive: false // true for progressive compression, default: false diff --git a/binding.gyp b/binding.gyp index 0f23e2a..67a8d6c 100644 --- a/binding.gyp +++ b/binding.gyp @@ -21,7 +21,7 @@ 'targets': [ { 'target_name': 'canvas', - 'include_dirs': ["" , "keywords": ["canvas", "graphic", "graphics", "pixman", "cairo", "image", "images", "pdf"] , "homepage": "https://github.com/learnboost/node-canvas" @@ -9,7 +9,7 @@ "test": "make test" } , "dependencies": { - "nan": "~0.3.0" + "nan": "~0.4.1" } , "devDependencies": { "express": "3.0" diff --git a/src/Canvas.cc b/src/Canvas.cc index 2fa189d..3a88b41 100644 --- a/src/Canvas.cc +++ b/src/Canvas.cc @@ -351,7 +351,7 @@ streamPNG(void *c, const uint8_t *data, unsigned len) { Local::New(Null()) , buf , Integer::New(len) }; - closure->fn->Call(Context::GetCurrent()->Global(), 3, argv); + MakeCallback(Context::GetCurrent()->Global(), closure->fn, 3, argv); return CAIRO_STATUS_SUCCESS; } @@ -420,13 +420,13 @@ NAN_METHOD(Canvas::StreamPNGSync) { NanReturnValue(try_catch.ReThrow()); } else if (status) { Local argv[1] = { Canvas::Error(status) }; - closure.fn->Call(Context::GetCurrent()->Global(), 1, argv); + MakeCallback(Context::GetCurrent()->Global(), closure.fn, 1, argv); } else { Local argv[3] = { Local::New(Null()) , Local::New(Null()) , Integer::New(0) }; - closure.fn->Call(Context::GetCurrent()->Global(), 3, argv); + MakeCallback(Context::GetCurrent()->Global(), closure.fn, 3, argv); } NanReturnUndefined(); } diff --git a/src/CanvasPattern.cc b/src/CanvasPattern.cc index 1a42557..16bb99f 100644 --- a/src/CanvasPattern.cc +++ b/src/CanvasPattern.cc @@ -17,7 +17,7 @@ Persistent Pattern::constructor; void Pattern::Initialize(Handle target) { - HandleScope scope; + NanScope(); // Constructor Local ctor = FunctionTemplate::New(Pattern::New); diff --git a/src/init.cc b/src/init.cc index 6cb17ff..f7c822d 100755 --- a/src/init.cc +++ b/src/init.cc @@ -20,7 +20,7 @@ extern "C" void init (Handle target) { - HandleScope scope; + NanScope(); Canvas::Initialize(target); Image::Initialize(target); ImageData::Initialize(target); diff --git a/util/has_lib.sh b/util/has_lib.sh index cb9c663..8313a6c 100755 --- a/util/has_lib.sh +++ b/util/has_lib.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash has_lib() { - local regex="lib$1.+(so|dylib)$" + local regex="lib$1.+(so|dylib)" # Try using ldconfig on linux systems for LINE in `which ldconfig > /dev/null && ldconfig -p 2>/dev/null | grep -E $regex`; do