Ejemplo n.º 1
0
        public void DrawString(string s, System.Drawing.Font f, System.Drawing.Color c, float x, float y)
        {
            Begin();
            var v = transform.Transform(new SlimDX.Vector2(x, y));

            if (fCurrent.Height != f.Height || fCurrent.FontFamily != f.FontFamily)
            {
                font.Dispose();
                font     = new SlimDX.Direct3D9.Font(device, f);
                fCurrent = f;
            }
            font.DrawString(null, s, (int)v.X, (int)v.Y, new SlimDX.Color4(c));
        }
Ejemplo n.º 2
0
 public override void ReleaseResources()
 {
     if (DisplayFont != null)
     {
         DisplayFont.Dispose();
     }
     DisplayFont = null;
 }