public ImageSurface(ref byte[] data, Cairo.Format format, int width, int height, int stride) { surface = CairoAPI.cairo_image_surface_create_for_data(data, format, width, height, stride); lock (surfaces.SyncRoot){ surfaces [surface] = this; } }
public ImageSurface(IntPtr data, Cairo.Format format, int width, int height, int stride) { surface = NativeMethods.cairo_image_surface_create_for_data(data, format, width, height, stride); lock (surfaces.SyncRoot){ surfaces [surface] = this; } }
public static Cairo.Surface CreateForImage( Cairo.Format format, int width, int height) { IntPtr p = NativeMethods.cairo_image_surface_create( format, width, height); return(new Cairo.Surface(p, true)); }
public static Cairo.Surface CreateForImage( ref byte[] data, Cairo.Format format, int width, int height, int stride) { IntPtr p = NativeMethods.cairo_image_surface_create_for_data( data, format, width, height, stride); return(new Cairo.Surface(p, true)); }
internal static extern IntPtr cairo_image_surface_create_for_data(IntPtr data, Cairo.Format format, int width, int height, int stride);
internal static extern IntPtr cairo_image_surface_create(Cairo.Format format, int width, int height);
public ImageSurface(ref byte[] data, Cairo.Format format, int width, int height, int stride) : this(data, format, width, height, stride) { }
public ImageSurface(System.IntPtr data, Cairo.Format format, int width, int height, int stride) { }
public ImageSurface(byte[] data, Cairo.Format format, int width, int height, int stride) { }
public ImageSurface(Cairo.Format format, int width, int height) { }
public static Cairo.Surface CreateForImage(ref byte[] data, Cairo.Format format, int width, int height, int stride) { throw null; }
public static Cairo.Surface CreateForImage(Cairo.Format format, int width, int height) { throw null; }
public MemorySurface(Cairo.Format format, int width, int height) : this(NativeMethods.f_image_surface_create(format, width, height)) { }
public static extern IntPtr f_image_surface_create(Cairo.Format format, int width, int height);
/// <summary> /// Build a ImageSurface /// </summary> /// <param name="Width">width</param> /// <param name="Height">height</param> /// <param name="Color">color</param> /// <param name="format">surface format</param> /// <returns>the created ImageSurface</returns> public static Cairo.ImageSurface BuildSurface(int Width, int Height, Color Color, Cairo.Format format) { var surface = new Cairo.ImageSurface(format, Width, Height); var c = new Cairo.Context(surface); c.Rectangle(0, 0, Width, Height); c.SetSourceColor(Color); c.Fill(); c.Dispose(); return(surface); }