Exemplo n.º 1
0
        public void t文字列描画(int x, int y, string str, EFontColor efc, EFontAlign efa)
        {
            if (!base.b活性化してない && !string.IsNullOrEmpty(str))
            {
                if (this.tx数値 != null)
                {
                    bool bRightAlign = (efa == EFontAlign.Right);

                    if (bRightAlign)                                                                            // 右詰なら文字列反転して右から描画
                    {
                        char[] chars = str.ToCharArray();
                        Array.Reverse(chars);
                        str = new string(chars);
                    }

                    foreach (char ch in str)
                    {
                        int  p     = (ch == '-' ? 11 : ch - '0');
                        ST数字 s     = st数字[p, (int)efc];
                        int  sw    = s.rc.Width;
                        int  delta = bRightAlign ? 0 : -sw;
                        this.tx数値.t2D描画(TJAPlayer3.app.Device, x + delta, y, s.rc);
                        x += bRightAlign ? -sw : sw;
                    }
                }
            }
        }
Exemplo n.º 2
0
 public void SetAlignment(EFontAlign alignment)
 {
     m_align = alignment;
 }