示例#1
0
 internal void RemoveText()
 {
     TextValue = null;
     if (TextHandle != null)
     {
         TextHandle.Dispose();
         TextHandle = null;
     }
 }
示例#2
0
 public void ReplaceFont(FontDescription fontDescription)
 {
     if (TextHandle != null)
     {
         TextHandle.Dispose();
     }
     TextHandle = new Font(Drawing.Direct3DDevice, fontDescription);
     RecalculateBoundingAndDisplayedText();
 }
示例#3
0
 public void ReplaceFont(System.Drawing.Font font)
 {
     if (TextHandle != null)
     {
         TextHandle.Dispose();
     }
     TextHandle = new Font(Drawing.Direct3DDevice, font);
     RecalculateBoundingAndDisplayedText();
 }
示例#4
0
        public void Dispose()
        {
            if (TextHandle != null)
            {
                TextHandle.Dispose();
                TextHandle = null;
            }

            Drawing.OnPreReset  -= OnPreReset;
            Drawing.OnPostReset -= OnPostReset;
            AppDomain.CurrentDomain.ProcessExit  -= OnUnload;
            AppDomain.CurrentDomain.DomainUnload -= OnUnload;
        }
示例#5
0
 /// <summary>
 /// Occurs after after calling GameWindow.Exit, but before destroying the OpenGL context.
 /// Override to unload application resources.
 /// </summary>
 /// <param name="e">Not used.</param>
 public override void OnUnload(EventArgs e)
 {
     if (m_textHandleHelp != null)
     {
         m_textHandleHelp.Dispose();
     }
     if (m_textHandleStats != null)
     {
         m_textHandleStats.Dispose();
     }
     if (m_textFont != null)
     {
         m_textFont.Dispose();
     }
     if (m_blobs != null)
     {
         m_blobs.Dispose();
     }
 }
示例#6
0
 public void ReplaceFont(
     int height,
     int width,
     FontWeight weight,
     int mipLevels,
     bool isItalic,
     FontCharacterSet characterSet,
     FontPrecision precision,
     FontQuality quality,
     FontPitchAndFamily pitchAndFamily,
     string faceName)
 {
     if (TextHandle != null)
     {
         TextHandle.Dispose();
     }
     TextHandle = new Font(Drawing.Direct3DDevice, height, width, weight, mipLevels, isItalic, characterSet, precision, quality, pitchAndFamily, faceName);
     RecalculateBoundingAndDisplayedText();
 }