sk_bitmap_try_alloc_pixels_with_color_table() private method

private sk_bitmap_try_alloc_pixels_with_color_table ( IntPtr cbitmap, SKImageInfo &requestedInfo, IntPtr factory, IntPtr ctable ) : bool
cbitmap System.IntPtr
requestedInfo SKImageInfo
factory System.IntPtr
ctable System.IntPtr
return bool
Ejemplo n.º 1
0
 public SKBitmap(SKImageInfo info, SKColorTable ctable)
     : this()
 {
     if (!SkiaApi.sk_bitmap_try_alloc_pixels_with_color_table(Handle, ref info, IntPtr.Zero, ctable != null ? ctable.Handle : IntPtr.Zero))
     {
         throw new Exception(UnableToAllocatePixelsMessage);
     }
 }
Ejemplo n.º 2
0
        public SKBitmap(SKImageInfo info, SKColorTable ctable, SKBitmapAllocFlags flags)
            : this()
        {
            var cinfo = SKImageInfoNative.FromManaged(ref info);

            if (!SkiaApi.sk_bitmap_try_alloc_pixels_with_color_table(Handle, ref cinfo, ctable != null ? ctable.Handle : IntPtr.Zero, flags))
            {
                throw new Exception(UnableToAllocatePixelsMessage);
            }
        }
Ejemplo n.º 3
0
        private bool TryAllocPixels(SKImageInfo info, SKColorTable ctable, SKBitmapAllocFlags flags = SKBitmapAllocFlags.None)
        {
            var cinfo = SKImageInfoNative.FromManaged(ref info);

            return(SkiaApi.sk_bitmap_try_alloc_pixels_with_color_table(Handle, ref cinfo, ctable != null ? ctable.Handle : IntPtr.Zero, flags));
        }