Browse Source

Allow `canvas.toBuffer(raw, undefined, undefined)`

v1.x
Adam Hooper 8 years ago
parent
commit
94ae2a822d
  1. 2
      src/Canvas.cc

2
src/Canvas.cc

@ -257,7 +257,7 @@ NAN_METHOD(Canvas::ToBuffer) {
return;
}
if (info.Length() == 1 && info[0]->StrictEquals(Nan::New<String>("raw").ToLocalChecked())) {
if (info.Length() >= 1 && info[0]->StrictEquals(Nan::New<String>("raw").ToLocalChecked())) {
// Return raw ARGB data -- just a memcpy()
cairo_surface_t *surface = canvas->surface();
cairo_surface_flush(surface);

Loading…
Cancel
Save