Microsoft.Xna.Framework.PointExtensions.TranslateFont C# (CSharp) Method

TranslateFont() public static method

Gets the cell coordinates of the targetFont based on a cell in the sourceFont.
public static TranslateFont ( this point, Font sourceFont, Font targetFont ) : Point
point this The position of the cell in the .
sourceFont SadConsole.Font The source font translating from.
targetFont SadConsole.Font The target font translating to.
return Point
        public static Point TranslateFont(this Point point, Font sourceFont, Font targetFont)
        {
            var world = point.ConsoleLocationToWorld(sourceFont.Size.X, sourceFont.Size.Y);
            return world.WorldLocationToConsole(targetFont.Size.X, targetFont.Size.Y);
        }