Beispiel #1
0
        public static void DrawString(int fontSize, string fontName, string s, REMOPoint p, Color c)
        {
            GfxStr t = new GfxStr(fontName, s, p);

            t.FontSize = fontSize;
            t.Draw(c);
        }
Beispiel #2
0
        /// <summary>
        /// 화면에 문자열을 그립니다. 백그라운드 색을 설정합니다.
        /// </summary>
        /// <param name="s"></param>
        /// <param name="p"></param>
        /// <param name="c"></param>
        /// <param name="BackGroundColor"></param>
        public static void DrawString(string s, REMOPoint p, Color c, Color BackGroundColor)
        {
            GfxStr t = new GfxStr(s, p);

            Filter.Absolute(t, BackGroundColor);
            t.Draw(c);
        }
Beispiel #3
0
 public GfxStr(GfxStr s)
 {
     FontSize = s.FontSize;
     Texture  = s.Texture;
     Text     = s.Text;
     Bound    = new Rectangle(s.Pos, Texture.MeasureString(Text).ToPoint());
 }
Beispiel #4
0
 public static void Draw(GfxStr gfx, params Color[] cs)
 {
     for (int i = 0; i < cs.Length; i++)
     {
         Draw(gfx, cs[i]);
     }
 }
Beispiel #5
0
            public static void Draw(GfxStr gfx, Color c)
            {
                Matrix m = CurrentMatrix;

                CloseCanvas();
                Vector2 pos = Vector2.Transform(gfx.Pos, m);

                OpenCanvas(Matrix2D.Zoom(pos, StandAlone.FontZoom * gfx.FontSize / StandAlone.SpriteFontSize),
                           () =>
                {
                    spriteBatch.DrawString(gfx.Texture, gfx.Text, pos, c);
                });
                BeginCanvas(m);
            }
Beispiel #6
0
 public CheckBox(int size, string description, REMOPoint pos)
 {
     Box         = new Gfx2D("Box", new Rectangle(pos.X, pos.Y, size * 2, size * 2));
     Description = new GfxStr(size, description, pos + new REMOPoint(size * 2 + size / 2, size / 4));
 }
Beispiel #7
0
        /// <summary>
        /// 화면에 문자열을 그립니다.
        /// </summary>
        /// <param name="s"></param>
        /// <param name="p"></param>
        /// <param name="c"></param>
        public static void DrawString(string s, REMOPoint p, Color c)
        {
            GfxStr t = new GfxStr(s, p);

            t.Draw(c);
        }
Beispiel #8
0
 public static void Draw(GfxStr gfx) => Draw(gfx, Color.Black);