Exemple #1
0
        public void MakeSeg_WithTestStringAndPaduakFont_ReturnsNonNullSegment()
        {
            using (var font = new PaduakDisposableFont())
            {
                IntPtr str           = Marshal.StringToCoTaskMemAnsi("hello world");
                IntPtr error         = new IntPtr(0);
                int    numCodePoints = Graphite2Api.CountUnicodeCharacters(Encform.Utf8, str, IntPtr.Zero, ref error);
                IntPtr seg           = Graphite2Api.MakeSeg(font.Font, font.Face, 0, IntPtr.Zero, Encform.Utf8, str, numCodePoints, 0);
                Assert.AreNotEqual(IntPtr.Zero, seg);

                Graphite2Api.SegDestroy(seg);
                Marshal.FreeCoTaskMem(str);
            }
        }
Exemple #2
0
 public void Dispose()
 {
     Graphite2Api.SegDestroy(Seg);
     Marshal.FreeCoTaskMem(_testData);
     _font.Dispose();
 }
Exemple #3
0
 public void SegDestroy_NULL_DoesNotThrowException()
 {
     Graphite2Api.SegDestroy(IntPtr.Zero);
 }