/// <summary>
        /// Returns the value at the specified key as type binary. The returned value
        /// will reference existing data.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_values_capi.h">cef/include/capi/cef_values_capi.h</see>.
        /// </remarks>
        public CfxBinaryValue GetBinary(string key)
        {
            var key_pinned = new PinnedString(key);
            var __retval   = CfxApi.DictionaryValue.cfx_dictionary_value_get_binary(NativePtr, key_pinned.Obj.PinnedPtr, key_pinned.Length);

            key_pinned.Obj.Free();
            return(CfxBinaryValue.Wrap(__retval));
        }
Beispiel #2
0
 /// <summary>
 /// Returns the value at the specified index as type binary. The returned value
 /// will reference existing data.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_values_capi.h">cef/include/capi/cef_values_capi.h</see>.
 /// </remarks>
 public CfxBinaryValue GetBinary(int index)
 {
     return(CfxBinaryValue.Wrap(CfxApi.cfx_list_value_get_binary(NativePtr, index)));
 }
Beispiel #3
0
 /// <summary>
 /// Returns a copy of this object. The data in this object will also be copied.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_values_capi.h">cef/include/capi/cef_values_capi.h</see>.
 /// </remarks>
 public CfxBinaryValue Copy()
 {
     return(CfxBinaryValue.Wrap(CfxApi.BinaryValue.cfx_binary_value_copy(NativePtr)));
 }
Beispiel #4
0
 /// <summary>
 /// Creates a new object that is not owned by any other object. The specified
 /// |data| will be copied.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_values_capi.h">cef/include/capi/cef_values_capi.h</see>.
 /// </remarks>
 public static CfxBinaryValue Create(IntPtr data, ulong dataSize)
 {
     return(CfxBinaryValue.Wrap(CfxApi.BinaryValue.cfx_binary_value_create(data, (UIntPtr)dataSize)));
 }
Beispiel #5
0
 /// <summary>
 /// Creates a new object that is not owned by any other object. The specified
 /// |data| will be copied.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_values_capi.h">cef/include/capi/cef_values_capi.h</see>.
 /// </remarks>
 public static CfxBinaryValue Create(IntPtr data, int dataSize)
 {
     return(CfxBinaryValue.Wrap(CfxApi.cfx_binary_value_create(data, dataSize)));
 }
Beispiel #6
0
 /// <summary>
 /// Returns the JPEG representation that most closely matches |scaleFactor|.
 /// |quality| determines the compression level with 0 == lowest and 100 ==
 /// highest. The JPEG format does not support alpha transparency and the alpha
 /// channel, if any, will be discarded. |pixelWidth| and |pixelHeight| are
 /// the output representation size in pixel coordinates. Returns a
 /// CfxBinaryValue containing the JPEG image 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 GetAsJpeg(float scaleFactor, int quality, out int pixelWidth, out int pixelHeight)
 {
     return(CfxBinaryValue.Wrap(CfxApi.Image.cfx_image_get_as_jpeg(NativePtr, scaleFactor, quality, out pixelWidth, out pixelHeight)));
 }
Beispiel #7
0
 /// <summary>
 /// Returns the PNG representation that most closely matches |scaleFactor|. If
 /// |withTransparency| is true (1) any alpha transparency in the image will be
 /// represented in the resulting PNG data. |pixelWidth| and |pixelHeight| are
 /// the output representation size in pixel coordinates. Returns a
 /// CfxBinaryValue containing the PNG image 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 GetAsPng(float scaleFactor, bool withTransparency, out int pixelWidth, out int pixelHeight)
 {
     return(CfxBinaryValue.Wrap(CfxApi.Image.cfx_image_get_as_png(NativePtr, scaleFactor, withTransparency ? 1 : 0, out pixelWidth, out pixelHeight)));
 }
Beispiel #8
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)));
 }
Beispiel #9
0
 /// <summary>
 /// Returns the value at the specified index as type binary. The returned value
 /// will reference existing data.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_values_capi.h">cef/include/capi/cef_values_capi.h</see>.
 /// </remarks>
 public CfxBinaryValue GetBinary(ulong index)
 {
     return(CfxBinaryValue.Wrap(CfxApi.ListValue.cfx_list_value_get_binary(NativePtr, (UIntPtr)index)));
 }