private sk_bitmap_try_alloc_pixels_with_color_table ( |
||
cbitmap | ||
requestedInfo | SKImageInfo | |
factory | ||
ctable | ||
return | bool |
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); } }
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); } }
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)); }