示例#1
0
文件: Picture.cs 项目: wonrst/TizenFX
 /// <summary>
 /// Gets the size of the image.
 /// </summary>
 /// <returns> The size of the image in pixels.</returns>
 /// <since_tizen> 9 </since_tizen>
 public Size2D GetSize()
 {
     global::System.IntPtr cPtr = Interop.Picture.GetSize(View.getCPtr(this));
     if (NDalicPINVOKE.SWIGPendingException.Pending)
     {
         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
     }
     return(Size2D.GetSize2DFromPtr(cPtr));
 }
示例#2
0
        public void Size2DGetSize2DFromPtr()
        {
            tlog.Debug(tag, $"Size2DGetSize2DFromPtr START");

            using (Size size = new Size(100, 50))
            {
                var testingTarget = Size2D.GetSize2DFromPtr(size.SwigCPtr.Handle);
                Assert.AreEqual(100, testingTarget.Width, "Should be equal!");
                Assert.AreEqual(50, testingTarget.Height, "Should be equal!");

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"Size2DGetSize2DFromPtr END (OK)");
        }