Browse Source

Added Image::complete

v1.x
Tj Holowaychuk 14 years ago
parent
commit
9331041e29
  1. 2
      src/Image.cc
  2. 1
      src/Image.h

2
src/Image.cc

@ -129,6 +129,7 @@ Image::SetOnerror(Local<String>, Local<Value> val, const AccessorInfo &info) {
*/ */
Image::Image() { Image::Image() {
complete = false;
filename = NULL; filename = NULL;
_surface = NULL; _surface = NULL;
} }
@ -181,6 +182,7 @@ Image::loaded() {
if (try_catch.HasCaught()) { if (try_catch.HasCaught()) {
error(try_catch.Exception()); error(try_catch.Exception());
} }
complete = true;
} }
Unref(); Unref();

1
src/Image.h

@ -14,6 +14,7 @@ using namespace v8;
class Image: public node::ObjectWrap { class Image: public node::ObjectWrap {
public: public:
bool complete;
char *filename; char *filename;
Persistent<Function> onload; Persistent<Function> onload;
Persistent<Function> onerror; Persistent<Function> onerror;

Loading…
Cancel
Save