Esempio n. 1
0
        public Vector2 MeasureString(string text)
        {
            Bounds bounds = new Bounds();

            _font.TextBounds(text, System.Numerics.Vector2.Zero, ref bounds);

            return(new Vector2(bounds.X2, bounds.Y2));
        }
Esempio n. 2
0
        public Vector2 MeasureString(string text)
        {
            Bounds bounds = new Bounds();

            _font.TextBounds(0, 0, text, ref bounds);

            return(new Vector2(bounds.X2, bounds.Y2));
        }