Permalink
Browse files

Add saveAlpha method (Thanks to Suor)

  • Loading branch information...
1 parent 695f52c commit df49aa6db107fb34c123275cab203122821aa46a taggon committed Aug 27, 2010
Showing with 11 additions and 0 deletions.
  1. +11 −0 gd_bindings.cc
View
@@ -287,6 +287,7 @@ class Gd
NODE_SET_PROTOTYPE_METHOD(t, "setStyle", SetStyle);
NODE_SET_PROTOTYPE_METHOD(t, "setThickness", SetThickness);
NODE_SET_PROTOTYPE_METHOD(t, "alphaBlending", AlphaBlending);
+ NODE_SET_PROTOTYPE_METHOD(t, "saveAlpha", SaveAlpha);
NODE_SET_PROTOTYPE_METHOD(t, "setClip", SetClip);
NODE_SET_PROTOTYPE_METHOD(t, "getClip", GetClip);
@@ -869,6 +870,16 @@ class Gd
return args.This();
}
+ static Handle<Value> SaveAlpha (const Arguments &args)
+ {
+ Image *im = ObjectWrap::Unwrap<Image>(args.This());
+
+ REQ_INT_ARG(0, saveFlag)
+ gdImageSaveAlpha(*im, saveFlag);
+
+ return args.This();
+ }
+
static Handle<Value> SetClip (const Arguments &args)
{
Image *im = ObjectWrap::Unwrap<Image>(args.This());

0 comments on commit df49aa6

Please sign in to comment.