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() {
complete = false;
filename = NULL;
_surface = NULL;
}
@ -181,6 +182,7 @@ Image::loaded() {
if (try_catch.HasCaught()) {
error(try_catch.Exception());
}
complete = true;
}
Unref();

1
src/Image.h

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

Loading…
Cancel
Save