Browse Source

Restore Uintiness

v1.x
King Koopa 11 years ago
parent
commit
b0d70c5baa
  1. 2
      package.json
  2. 18
      src/Canvas.cc

2
package.json

@ -14,7 +14,7 @@
"test": "make test"
}
, "dependencies": {
"nan": "git://github.com/rvagg/nan.git#cleanup"
"nan": "git://github.com/rvagg/nan.git#0.9-wip"
}
, "devDependencies": {
"express": "3.0"

18
src/Canvas.cc

@ -46,13 +46,13 @@ Canvas::Initialize(Handle<Object> target) {
proto->SetAccessor(NanSymbol("width"), GetWidth, SetWidth);
proto->SetAccessor(NanSymbol("height"), GetHeight, SetHeight);
NanSetTemplate(proto, "PNG_NO_FILTERS", NanNew<Integer>(PNG_NO_FILTERS));
NanSetTemplate(proto, "PNG_FILTER_NONE", NanNew<Integer>(PNG_FILTER_NONE));
NanSetTemplate(proto, "PNG_FILTER_SUB", NanNew<Integer>(PNG_FILTER_SUB));
NanSetTemplate(proto, "PNG_FILTER_UP", NanNew<Integer>(PNG_FILTER_UP));
NanSetTemplate(proto, "PNG_FILTER_AVG", NanNew<Integer>(PNG_FILTER_AVG));
NanSetTemplate(proto, "PNG_FILTER_PAETH", NanNew<Integer>(PNG_FILTER_PAETH));
NanSetTemplate(proto, "PNG_ALL_FILTERS", NanNew<Integer>(PNG_ALL_FILTERS));
NanSetTemplate(proto, "PNG_NO_FILTERS", NanNew<Uint32>(PNG_NO_FILTERS));
NanSetTemplate(proto, "PNG_FILTER_NONE", NanNew<Uint32>(PNG_FILTER_NONE));
NanSetTemplate(proto, "PNG_FILTER_SUB", NanNew<Uint32>(PNG_FILTER_SUB));
NanSetTemplate(proto, "PNG_FILTER_UP", NanNew<Uint32>(PNG_FILTER_UP));
NanSetTemplate(proto, "PNG_FILTER_AVG", NanNew<Uint32>(PNG_FILTER_AVG));
NanSetTemplate(proto, "PNG_FILTER_PAETH", NanNew<Uint32>(PNG_FILTER_PAETH));
NanSetTemplate(proto, "PNG_ALL_FILTERS", NanNew<Uint32>(PNG_ALL_FILTERS));
target->Set(NanSymbol("Canvas"), ctor->GetFunction());
}
@ -350,7 +350,7 @@ streamPNG(void *c, const uint8_t *data, unsigned len) {
Local<Value> argv[3] = {
NanNew(NanNull())
, buf
, NanNew<Integer>(len) };
, NanNew<Uint32>(len) };
NanMakeCallback(NanGetCurrentContext()->Global(), closure->fn, 3, argv);
return CAIRO_STATUS_SUCCESS;
}
@ -425,7 +425,7 @@ NAN_METHOD(Canvas::StreamPNGSync) {
Local<Value> argv[3] = {
NanNew(NanNull())
, NanNew(NanNull())
, NanNew<Integer>(0) };
, NanNew<Uint32>(0) };
NanMakeCallback(NanGetCurrentContext()->Global(), closure.fn, 3, argv);
}
NanReturnUndefined();

Loading…
Cancel
Save