Beispiel #1
0
        public static FontBoundaries GetFontBoundaryBox(IntPtr font, string text)
        {
            var bbox = new FontBoundaries();

            if (text != null)
            {
                GetFontBoundaryBox(font, text, text.Length, ref bbox);
            }
            return(bbox);
        }
Beispiel #2
0
 public static extern void GetFontBoundaryBox(IntPtr font,
                                              [MarshalAs(UnmanagedType.LPStr)] string text, int textLength,
                                              [MarshalAs(UnmanagedType.Struct)] ref FontBoundaries boundaries
                                              );