Exemplo n.º 1
0
 internal FontClient(FontClient handle) : this(NDalicManualPINVOKE.new_FontClient__SWIG_1(FontClient.getCPtr(handle)), true)
 {
     if (NDalicPINVOKE.SWIGPendingException.Pending)
     {
         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Exemplo n.º 2
0
        public void FontClientCreateVectorBlob()
        {
            tlog.Debug(tag, $"FontClientCreateVectorBlob START");

            var testingTarget = new FontClient(FontClient.Instance);

            using (Color color = new Color(0.4f, 1.0f, 0.3f, 0.0f))
            {
                var blob       = new SWIGTYPE_p_p_Dali__TextAbstraction__VectorBlob(color.SwigCPtr.Handle);
                var blobLegnth = new SWIGTYPE_p_unsigned_int(color.SwigCPtr.Handle);

                var nominalWidth  = new SWIGTYPE_p_unsigned_int(FontClient.Instance.SwigCPtr.Handle);
                var nominalHeight = new SWIGTYPE_p_unsigned_int(testingTarget.SwigCPtr.Handle);

                try
                {
                    testingTarget.CreateVectorBlob(0, 0, blob, blobLegnth, nominalWidth, nominalHeight);
                }
                catch (Exception e)
                {
                    tlog.Debug(tag, e.Message.ToString());
                    Assert.Fail("Caught Exception: Failed!");
                }

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"FontClientCreateVectorBlob END (OK)");
        }
Exemplo n.º 3
0
        public void FontClientGetDefaultPlatformFontDescription()
        {
            tlog.Debug(tag, $"FontClientGetDefaultPlatformFontDescription START");

            using (FontDescription description = new FontDescription())
            {
                description.Path = ttf_path;

                var testingTarget = new FontClient(FontClient.Instance);
                Assert.IsNotNull(testingTarget, "Return a null object of FontClient");
                Assert.IsInstanceOf <FontClient>(testingTarget, "Should be an instance of FontClient type.");

                try
                {
                    testingTarget.GetDefaultPlatformFontDescription(description);
                }
                catch (Exception e)
                {
                    tlog.Debug(tag, e.Message.ToString());
                    Assert.Fail("Caught Exception: Failed");
                }

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"FontClientGetDefaultPlatformFontDescription END (OK)");
        }
Exemplo n.º 4
0
        public void FontClientGetDpi()
        {
            tlog.Debug(tag, $"FontClientGetDpi START");

            var testingTarget = new FontClient(FontClient.Instance);

            Assert.IsNotNull(testingTarget, "Return a null object of FontClient");
            Assert.IsInstanceOf <FontClient>(testingTarget, "Should be an instance of FontClient type.");

            testingTarget.SetDpi(50, 60);

            try
            {
                var horizontalDpi = new SWIGTYPE_p_unsigned_int(testingTarget.GetBaseHandleCPtrHandleRef.Handle);
                var verticalDpi   = new SWIGTYPE_p_unsigned_int(new FontClient().GetBaseHandleCPtrHandleRef.Handle);
                testingTarget.GetDpi(horizontalDpi, verticalDpi);
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception: Failed");
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"FontClientGetDpi END (OK)");
        }
Exemplo n.º 5
0
        internal FontClient Assign(FontClient handle)
        {
            FontClient ret = new FontClient(NDalicManualPINVOKE.FontClient_Assign(swigCPtr, FontClient.getCPtr(handle)), false);

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemplo n.º 6
0
        internal static FontClient Get()
        {
            FontClient ret = new FontClient(NDalicManualPINVOKE.FontClient_Get(), true);

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemplo n.º 7
0
        public void FontClientConstructorWithFontClient()
        {
            tlog.Debug(tag, $"FontClientConstructorWithFontClient START");

            var testingTarget = new FontClient(FontClient.Instance);

            Assert.IsNotNull(testingTarget, "Return a null object of FontClient");
            Assert.IsInstanceOf <FontClient>(testingTarget, "Should be an instance of FontClient type.");

            testingTarget.Dispose();

            tlog.Debug(tag, $"FontClientConstructorWithFontClient END (OK)");
        }
Exemplo n.º 8
0
        public void FontClientGetEllipsisGlyph()
        {
            tlog.Debug(tag, $"FontClientGetEllipsisGlyph START");

            var testingTarget = new FontClient(FontClient.Instance);

            Assert.IsNotNull(testingTarget, "Return a null object of FontClient");
            Assert.IsInstanceOf <FontClient>(testingTarget, "Should be an instance of FontClient type.");

            var result = testingTarget.GetEllipsisGlyph(10);

            Assert.IsInstanceOf <GlyphInfo>(result, "Should be an instance of GlyphInfo type.");

            testingTarget.Dispose();
            tlog.Debug(tag, $"FontClientGetEllipsisGlyph END (OK)");
        }
Exemplo n.º 9
0
        public void FontClientIsScalable()
        {
            tlog.Debug(tag, $"FontClientIsScalable START");

            using (FontDescription description = new FontDescription())
            {
                description.Path = ttf_path;

                var testingTarget = new FontClient(FontClient.Instance);
                Assert.IsNotNull(testingTarget, "Return a null object of FontClient");
                Assert.IsInstanceOf <FontClient>(testingTarget, "Should be an instance of FontClient type.");

                var result = testingTarget.IsScalable(description);
                Assert.IsNotNull(result);

                testingTarget.Dispose();
            }

            tlog.Debug(tag, $"FontClientIsScalable END (OK)");
        }
Exemplo n.º 10
0
        public void FontClientIsColorGlyph()
        {
            tlog.Debug(tag, $"FontClientIsColorGlyph START");

            var testingTarget = new FontClient(FontClient.Instance);

            Assert.IsNotNull(testingTarget, "Return a null object of FontClient");
            Assert.IsInstanceOf <FontClient>(testingTarget, "Should be an instance of FontClient type.");

            try
            {
                testingTarget.IsColorGlyph(testingTarget.GetFontId(ttf_path), testingTarget.GetGlyphIndex(0, 0x0041));
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caugth Exception: Failed!");
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"FontClientIsColorGlyph END (OK)");
        }
Exemplo n.º 11
0
        public void FontClientAssign()
        {
            tlog.Debug(tag, $"FontClientAssign START");

            using (FontClient client = new FontClient())
            {
                try
                {
                    var testingTarget = client.Assign(FontClient.Instance);
                    Assert.IsNotNull(testingTarget, "Return a null object of FontClient");
                    Assert.IsInstanceOf <FontClient>(testingTarget, "Should be an instance of FontClient type.");

                    testingTarget.Dispose();
                }
                catch (Exception e)
                {
                    tlog.Debug(tag, e.Message.ToString());
                    Assert.Fail("Caught Exception: Failed!");
                }
            }

            tlog.Debug(tag, $"FontClientAssign END (OK)");
        }
Exemplo n.º 12
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FontClient obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }