Esempio n. 1
0
 /// <summary>
 /// Returns the bitmap representation that most closely matches |scaleFactor|.
 /// Only 32-bit RGBA/BGRA formats are supported. |colorType| and |alphaType|
 /// values specify the desired output pixel format. |pixelWidth| and
 /// |pixelHeight| are the output representation size in pixel coordinates.
 /// Returns a CfxBinaryValue containing the pixel data on success or NULL
 /// on failure.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_image_capi.h">cef/include/capi/cef_image_capi.h</see>.
 /// </remarks>
 public CfxBinaryValue GetAsBitmap(float scaleFactor, CfxColorType colorType, CfxAlphaType alphaType, out int pixelWidth, out int pixelHeight)
 {
     return(CfxBinaryValue.Wrap(CfxApi.Image.cfx_image_get_as_bitmap(NativePtr, scaleFactor, (int)colorType, (int)alphaType, out pixelWidth, out pixelHeight)));
 }
Esempio n. 2
0
 /// <summary>
 /// Add a bitmap image representation for |scaleFactor|. Only 32-bit RGBA/BGRA
 /// formats are supported. |pixelWidth| and |pixelHeight| are the bitmap
 /// representation size in pixel coordinates. |pixelData| is the array of
 /// pixel data and should be |pixelWidth| x |pixelHeight| x 4 bytes in size.
 /// |colorType| and |alphaType| values specify the pixel format.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_image_capi.h">cef/include/capi/cef_image_capi.h</see>.
 /// </remarks>
 public bool AddBitmap(float scaleFactor, int pixelWidth, int pixelHeight, CfxColorType colorType, CfxAlphaType alphaType, IntPtr pixelData, ulong pixelDataSize)
 {
     return(0 != CfxApi.Image.cfx_image_add_bitmap(NativePtr, scaleFactor, pixelWidth, pixelHeight, (int)colorType, (int)alphaType, pixelData, (UIntPtr)pixelDataSize));
 }