/// <summary> /// Returns the bitmap representation that most closely matches |scale_factor|. /// Only 32-bit RGBA/BGRA formats are supported. |color_type| and |alpha_type| /// values specify the desired output pixel format. |pixel_width| and /// |pixel_height| are the output representation size in pixel coordinates. /// Returns a CefBinaryValue containing the pixel data on success or NULL on /// failure. /// </summary> public CefBinaryValue GetAsBitmap(float scaleFactor, CefColorType colorType, CefAlphaType alphaType, out int pixelWidth, out int pixelHeight) { int n_pixelWidth; int n_pixelHeight; var n_result = cef_image_t.get_as_bitmap(_self, scaleFactor, colorType, alphaType, &n_pixelWidth, &n_pixelHeight); if (n_result != null) { pixelWidth = n_pixelWidth; pixelHeight = n_pixelHeight; return(CefBinaryValue.FromNative(n_result)); } else { pixelWidth = 0; pixelHeight = 0; return(null); } }
public static cef_binary_value_t *get_as_bitmap(cef_image_t *self, float scale_factor, CefColorType color_type, CefAlphaType alpha_type, int *pixel_width, int *pixel_height) { get_as_bitmap_delegate d; var p = self->_get_as_bitmap; if (p == _pe) { d = _de; } else { d = (get_as_bitmap_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_as_bitmap_delegate)); if (_pe == IntPtr.Zero) { _de = d; _pe = p; } } return(d(self, scale_factor, color_type, alpha_type, pixel_width, pixel_height)); }
public static int add_bitmap(cef_image_t *self, float scale_factor, int pixel_width, int pixel_height, CefColorType color_type, CefAlphaType alpha_type, void *pixel_data, UIntPtr pixel_data_size) { add_bitmap_delegate d; var p = self->_add_bitmap; if (p == _p6) { d = _d6; } else { d = (add_bitmap_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_bitmap_delegate)); if (_p6 == IntPtr.Zero) { _d6 = d; _p6 = p; } } return(d(self, scale_factor, pixel_width, pixel_height, color_type, alpha_type, pixel_data, pixel_data_size)); }
public unsafe extern int AddBitmap(float scale_factor, int pixel_width, int pixel_height, CefColorType color_type, CefAlphaType alpha_type, [Immutable] void *pixel_data, UIntPtr pixel_data_size);
public unsafe extern cef_binary_value_t *GetAsBitmap(float scale_factor, CefColorType color_type, CefAlphaType alpha_type, int *pixel_width, int *pixel_height);
/// <summary> /// Add a bitmap image representation for |scale_factor|. Only 32-bit RGBA/BGRA /// formats are supported. |pixel_width| and |pixel_height| are the bitmap /// representation size in pixel coordinates. |pixel_data| is the array of /// pixel data and should be |pixel_width| x |pixel_height| x 4 bytes in size. /// |color_type| and |alpha_type| values specify the pixel format. /// </summary> public unsafe virtual int AddBitmap(float scaleFactor, int pixelWidth, int pixelHeight, CefColorType colorType, CefAlphaType alphaType, IntPtr pixelData, long pixelDataSize) { return(SafeCall(NativeInstance->AddBitmap(scaleFactor, pixelWidth, pixelHeight, colorType, alphaType, (void *)pixelData, new UIntPtr((ulong)pixelDataSize)))); }
/// <summary> /// Returns the bitmap representation that most closely matches |scale_factor|. /// Only 32-bit RGBA/BGRA formats are supported. |color_type| and |alpha_type| /// values specify the desired output pixel format. |pixel_width| and /// |pixel_height| are the output representation size in pixel coordinates. /// Returns a cef_binary_value_t containing the pixel data on success or NULL /// on failure. /// </summary> public unsafe virtual CefBinaryValue GetAsBitmap(float scaleFactor, CefColorType colorType, CefAlphaType alphaType, ref int pixelWidth, ref int pixelHeight) { fixed(int *p3 = &pixelWidth) fixed(int *p4 = &pixelHeight) { return(SafeCall(CefBinaryValue.Wrap(CefBinaryValue.Create, NativeInstance->GetAsBitmap(scaleFactor, colorType, alphaType, p3, p4)))); } }
/// <summary> /// Add a bitmap image representation for |scale_factor|. Only 32-bit RGBA/BGRA /// formats are supported. |pixel_width| and |pixel_height| are the bitmap /// representation size in pixel coordinates. |pixel_data| is the array of /// pixel data and should be |pixel_width| x |pixel_height| x 4 bytes in size. /// |color_type| and |alpha_type| values specify the pixel format. /// </summary> public bool AddBitmap(float scaleFactor, int pixelWidth, int pixelHeight, CefColorType colorType, CefAlphaType alphaType, IntPtr pixelData, int pixelDataSize) { if (pixelData == IntPtr.Zero) { throw new ArgumentNullException(nameof(pixelData)); } if (pixelDataSize < 0) { throw new ArgumentOutOfRangeException(nameof(pixelDataSize)); } var n_result = cef_image_t.add_bitmap(_self, scaleFactor, pixelWidth, pixelHeight, colorType, alphaType, (void *)pixelData, (UIntPtr)pixelDataSize); return(n_result != 0); }
public unsafe int AddBitmap(float scale_factor, int pixel_width, int pixel_height, CefColorType color_type, CefAlphaType alpha_type, [Immutable] void *pixel_data, UIntPtr pixel_data_size) { fixed(cef_image_t *self = &this) { return(((delegate * unmanaged[Stdcall] < cef_image_t *, float, int, int, CefColorType, CefAlphaType, void *, UIntPtr, int >)add_bitmap)(self, scale_factor, pixel_width, pixel_height, color_type, alpha_type, pixel_data, pixel_data_size)); } }
public unsafe cef_binary_value_t *GetAsBitmap(float scale_factor, CefColorType color_type, CefAlphaType alpha_type, int *pixel_width, int *pixel_height) { fixed(cef_image_t *self = &this) { return(((delegate * unmanaged[Stdcall] < cef_image_t *, float, CefColorType, CefAlphaType, int *, int *, cef_binary_value_t * >)get_as_bitmap)(self, scale_factor, color_type, alpha_type, pixel_width, pixel_height)); } }
/// <summary> /// Add a bitmap image representation for |scale_factor|. Only 32-bit RGBA/BGRA /// formats are supported. |pixel_width| and |pixel_height| are the bitmap /// representation size in pixel coordinates. |pixel_data| is the array of /// pixel data and should be |pixel_width| x |pixel_height| x 4 bytes in size. /// |color_type| and |alpha_type| values specify the pixel format. /// </summary> public bool AddBitmap(float scaleFactor, int pixelWidth, int pixelHeight, CefColorType colorType, CefAlphaType alphaType, IntPtr pixelData, int pixelDataSize) { throw new NotImplementedException(); // TODO: CefImage.AddBitmap }
/// <summary> /// Returns the bitmap representation that most closely matches |scale_factor|. /// Only 32-bit RGBA/BGRA formats are supported. |color_type| and |alpha_type| /// values specify the desired output pixel format. |pixel_width| and /// |pixel_height| are the output representation size in pixel coordinates. /// Returns a CefBinaryValue containing the pixel data on success or NULL on /// failure. /// </summary> public CefBinaryValue GetAsBitmap(float scaleFactor, CefColorType colorType, CefAlphaType alphaType, out int pixelWidth, out int pixelHeight) { throw new NotImplementedException(); // TODO: CefImage.GetAsBitmap }