コード例 #1
0
 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;
     }
 }
コード例 #2
0
 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;
     }
 }
コード例 #3
0
        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));
        }
コード例 #4
0
        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));
        }
コード例 #5
0
 internal static extern IntPtr cairo_image_surface_create_for_data(IntPtr data, Cairo.Format format, int width, int height, int stride);
コード例 #6
0
 internal static extern IntPtr cairo_image_surface_create(Cairo.Format format, int width, int height);
コード例 #7
0
ファイル: ImageSurface.cs プロジェクト: Milstein/GameStack
 public ImageSurface(ref byte[] data, Cairo.Format format, int width, int height, int stride)
     : this(data, format, width, height, stride)
 {
 }
コード例 #8
0
 public ImageSurface(System.IntPtr data, Cairo.Format format, int width, int height, int stride)
 {
 }
コード例 #9
0
 public ImageSurface(byte[] data, Cairo.Format format, int width, int height, int stride)
 {
 }
コード例 #10
0
 public ImageSurface(Cairo.Format format, int width, int height)
 {
 }
コード例 #11
0
 public static Cairo.Surface CreateForImage(ref byte[] data, Cairo.Format format, int width, int height, int stride)
 {
     throw null;
 }
コード例 #12
0
 public static Cairo.Surface CreateForImage(Cairo.Format format, int width, int height)
 {
     throw null;
 }
コード例 #13
0
 public MemorySurface(Cairo.Format format, int width, int height)
     : this(NativeMethods.f_image_surface_create(format, width, height))
 {
 }
コード例 #14
0
 public static extern IntPtr f_image_surface_create(Cairo.Format format, int width, int height);
コード例 #15
0
        /// <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);
        }