Esempio n. 1
0
        public static List <RelativeRoute> RequestCharacterRoute(char c)
        {
            var win = new RecordCharacter(c);

            win.ShowDialog();
            return(win.routes);
        }
Esempio n. 2
0
        public void InitAllRoutes(String text)
        {
            list = new List <CharacterRouteInfo>(text.Length);

            text.ToList().ForEach((char c) => {
                if (!CharacterRoute.HasCharacter(c))
                {
                    var routes = RecordCharacter.RequestCharacterRoute(c);
                    CharacterRoute.SaveRouteByChar(c, routes);
                }
                var route = CharacterRoute.GetRouteByChar(c) * (FontSize / 10.0);
                if (route.Height > MaxCharHeight)
                {
                    MaxCharHeight = route.Height;
                }
                AverageCharWidth += route.Width;
                list.Add(route);
            });
            AverageCharWidth /= text.Length;
        }