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)"); }
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)"); }
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)"); }
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)"); }
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)"); }
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)"); }
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)"); }