コード例 #1
0
 public EngineText2D(KoCFont font, string text, Vector2 origin)
 {
     this.origin = origin;
     this.font   = font;
     this.text   = text;
     matrixArray = font.CalculateMatrices(text, origin.X, origin.Y);
 }
コード例 #2
0
        public TextHandler(EngineText2D[] texts)
        {
            this.texts = new List <EngineText2D>(texts);
            Font f = new Font("Consolas", 64f);

            defaultFont = new KoCFont(f);
        }
コード例 #3
0
 /// <summary>
 /// Changes used default Font <br/>
 /// First and Last are used for range of chars to copy to usable chars
 /// </summary>
 /// <param name="f">Font to use</param>
 /// <param name="first">first char</param>
 /// <param name="last">end char</param>
 public void ChangeDefaultFont(Font f, int first = 32, int last = 127)
 {
     defaultFont = new KoCFont(f, first, last);
 }
コード例 #4
0
 public TextHandler(EngineText2D[] texts, Font f)
 {
     this.texts  = new List <EngineText2D>(texts);
     defaultFont = new KoCFont(f);
 }