/// <summary>Creates a result object providing the given bitmap.</summary> /// <param name="bitmap"> /// The bitmap to be provided. Setting this to null will create a failure result object. /// </param> public TextBitmapDataResult(WinRT.Interop.Graphics.IBitmap bitmap) { fHasSucceeded = (bitmap != null); fMessage = String.Empty; fBitmapInfo = (bitmap != null) ? bitmap.Info : null; fBitmap = bitmap; }
/// <summary>Creates a result object with the given bitmap information.</summary> /// <param name="info"> /// The bitmap information to be provided. Setting this to null will create a failure result object. /// </param> public TextBitmapDataResult(WinRT.Interop.Graphics.BitmapInfo info) { fHasSucceeded = (info != null); fMessage = String.Empty; fBitmapInfo = info; fBitmap = null; }
/// <summary>Creates a new bitmap with the given information.</summary> /// <param name="info"> /// <para>The bitmap's pixel width, height, format, orientation, etc.</para> /// <para>Cannot be null or else an exception will be thrown.</para> /// </param> /// <param name="byteBufferHandle">Handle storing the memory address to a bitmap's "pinned" pixel array.</param> private DotNetBitmap(WinRT.Interop.Graphics.BitmapInfo info, System.Runtime.InteropServices.GCHandle byteBufferHandle) { // Validate. if (info == null) { throw new NullReferenceException("info"); } // Store the given settings. fBitmapInfo = info; fByteBufferHandle = byteBufferHandle; }
/// <summary>Creates a new empty bitmap whose width and height are set to zero.</summary> public DotNetBitmap() { fBitmapInfo = WinRT.Interop.Graphics.BitmapInfo.Empty; }