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