public SKBitmap (SKImageInfo info, SKBitmapAllocFlags flags) : this () { if (!TryAllocPixels (info, flags)) { throw new Exception (UnableToAllocatePixelsMessage); } }
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); } }
public bool TryAllocPixels(SKImageInfo info, SKBitmapAllocFlags flags) { var cinfo = SKImageInfoNative.FromManaged(ref info); return(SkiaApi.sk_bitmap_try_alloc_pixels_with_flags(Handle, ref cinfo, flags)); }
public SKBitmap(SKImageInfo info, SKColorTable ctable, SKBitmapAllocFlags flags) : this(info, SKBitmapAllocFlags.None) { }
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)); }