Beispiel #1
0
 public Pixbuf(byte[] data, Gdk.Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height, int rowstride, Gdk.PixbufDestroyNotify destroy_fn)
     : base(IntPtr.Zero)
 {
     if (GetType () != typeof (Pixbuf)) {
         throw new InvalidOperationException ("Can't override this constructor.");
     }
     DestroyHelper helper = new DestroyHelper (data, destroy_fn);
     Raw = gdk_pixbuf_new_from_data(data, (int) colorspace, has_alpha, bits_per_sample, width, height, rowstride, helper.Handler, IntPtr.Zero);
 }
Beispiel #2
0
 public Pixbuf(Gdk.Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height) : base(IntPtr.Zero)
 {
     if (GetType() != typeof(Pixbuf))
     {
         var vals  = new List <GLib.Value> ();
         var names = new List <string> ();
         names.Add("colorspace");
         vals.Add(new GLib.Value(colorspace));
         names.Add("has_alpha");
         vals.Add(new GLib.Value(has_alpha));
         names.Add("bits_per_sample");
         vals.Add(new GLib.Value(bits_per_sample));
         names.Add("width");
         vals.Add(new GLib.Value(width));
         names.Add("height");
         vals.Add(new GLib.Value(height));
         CreateNativeObject(names.ToArray(), vals.ToArray());
         return;
     }
     Raw = gdk_pixbuf_new((int)colorspace, has_alpha, bits_per_sample, width, height);
 }
Beispiel #3
0
 public Pixbuf(byte [] data, Gdk.Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height, int rowstride)
     : this(data, colorspace, has_alpha, bits_per_sample, width, height, rowstride, null)
 {
 }