コード例 #1
0
ファイル: P3Text.cs プロジェクト: stangelandcl/piccolo2d.net
 /// <summary>
 /// Dispose the Direct3D font.
 /// </summary>
 protected virtual void DisposeFont()
 {
     if (D3Dfont != null)
     {
         D3Dfont.Dispose();
         D3Dfont = null;
     }
 }
コード例 #2
0
        private void OnFontChanged(EventArgs e)
        {
            TextureValid = false;

            if (DXFont != null && !DXFont.Disposed)
            {
                DXFont.Dispose();
            }

            if (Font != null)
            {
                DXFont = new Microsoft.DirectX.Direct3D.Font(DXManager.Device, Font);
            }

            if (FontChanged != null)
            {
                FontChanged.Invoke(this, e);
            }
        }
コード例 #3
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (directxFont != null)
         {
             directxFont.Dispose();
             directxFont = null;
         }
         if (device != null)
         {
             device.Dispose();
             device = null;
         }
         base.Dispose(true);
     }
 }