Beispiel #1
0
 internal void RemoveText()
 {
     TextValue = null;
     if (TextHandle != null)
     {
         TextHandle.Dispose();
         TextHandle = null;
     }
 }
Beispiel #2
0
 public void ReplaceFont(FontDescription fontDescription)
 {
     if (TextHandle != null)
     {
         TextHandle.Dispose();
     }
     TextHandle = new Font(Drawing.Direct3DDevice, fontDescription);
     RecalculateBoundingAndDisplayedText();
 }
Beispiel #3
0
 public void ReplaceFont(System.Drawing.Font font)
 {
     if (TextHandle != null)
     {
         TextHandle.Dispose();
     }
     TextHandle = new Font(Drawing.Direct3DDevice, font);
     RecalculateBoundingAndDisplayedText();
 }
Beispiel #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;
        }
Beispiel #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();
     }
 }
Beispiel #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();
 }