Exemplo n.º 1
0
 /// <summary>
 /// Marshal the image from native if not already marshaled.
 /// </summary>
 private void EnsureMarshalled()
 {
     if (!nativeFrame.HasValue)
     {
         nativeFrame = (NUI_FUSION_IMAGE_FRAME)Marshal.PtrToStructure(
             NativeFrameHandle.ToIntPtr(Handle),
             typeof(NUI_FUSION_IMAGE_FRAME));
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Convert a FusionImageFrame to HandleRef structure.
 /// </summary>
 /// <param name="imageFrame">The FusionImageFrame to be converted.</param>
 /// <returns>
 /// Returns null if the input <para>imageFrame</para> is null or a HandleRef structure.
 /// </returns>
 public static HandleRef ToHandleRef(FusionImageFrame imageFrame)
 {
     return(null != imageFrame ?
            new HandleRef(imageFrame, NativeFrameHandle.ToIntPtr(imageFrame.Handle)) : new HandleRef());
 }