public static extern IntPtr GetNativeImageSourcePtr(HandleRef jarg1);
[DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Capture_GenerateUrl")]
- public static extern string GenerageUrl(HandleRef capture);
+ public static extern string GenerateUrl(HandleRef capture);
}
}
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_NativeImageSource_ReleaseBuffer")]
public static extern bool ReleaseBuffer(IntPtr jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_NativeImageSource_GenerateUrl")]
+ public static extern string GenerateUrl(IntPtr handle);
}
}
-}
\ No newline at end of file
+}
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_PixelData_GetPixelFormat")]
public static extern int PixelData_GetPixelFormat(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_PixelData_GenerateUrl")]
+ public static extern string GenerateUrl(IntPtr handle);
}
}
}
\ No newline at end of file
public string GenerateUrl()
{
string url = "";
- url = Interop.Capture.GenerageUrl(swigCPtr);
+ url = Interop.Capture.GenerateUrl(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return url;
}
+/*
+ * Copyright(c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
Handle = cPtr;
}
+
+ /// <summary>
+ /// Get URL from native image source.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Uri Url
+ {
+ get
+ {
+ string url = "";
+ url = Interop.NativeImageSource.GenerateUrl(this.swigCPtr.Handle);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return new Uri(url);
+ }
+ }
+
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
{
return ret;
}
}
-}
\ No newline at end of file
+}
/*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*
*/
+
+using System;
using System.ComponentModel;
namespace Tizen.NUI
}
/// <summary>
+ /// Get URL from pixel data.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Uri Url
+ {
+ get
+ {
+ string url = "";
+ url = Interop.PixelData.GenerateUrl(this.swigCPtr.Handle);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return new Uri(url);
+ }
+ }
+
+ /// <summary>
/// Gets the width of the buffer in pixels.
/// </summary>
/// <returns>The width of the buffer in pixels.</returns>
Interop.PixelData.delete_PixelData(swigCPtr);
}
}
-}
\ No newline at end of file
+}
if (sender is Capture)
{
log.Debug(tag, $"sender is Capture \n");
- var url = capture.GenerateUrl();
- capturedImage = new ImageView(url);
+ var url = capture.GetNativeImageSource().Url;
+ capturedImage = new ImageView(url.AbsoluteUri);
log.Debug(tag, $"url={url} \n");
- capturedImage.Size = new Size(300, 300);
+ capturedImage.Size = new Size(510, 510);
capturedImage.Position = new Position(10, 10);
root.Add(capturedImage);
done = false;
{
done = true;
capture = new Capture();
- capture.Start(root, new Size(345, 543), @"/opt/usr/nui_captured.jpg");
+ capture.Start(root, new Size(510, 510), @"/opt/usr/nui_captured.jpg");
capture.Finished += onCaptureFinished;
log.Debug(tag, $"capture done \n");
}