internal void RemoveText() { TextValue = null; if (TextHandle != null) { TextHandle.Dispose(); TextHandle = null; } }
public void ReplaceFont(FontDescription fontDescription) { if (TextHandle != null) { TextHandle.Dispose(); } TextHandle = new Font(Drawing.Direct3DDevice, fontDescription); RecalculateBoundingAndDisplayedText(); }
public void ReplaceFont(System.Drawing.Font font) { if (TextHandle != null) { TextHandle.Dispose(); } TextHandle = new Font(Drawing.Direct3DDevice, font); RecalculateBoundingAndDisplayedText(); }
public void Dispose() { if (TextHandle != null) { TextHandle.Dispose(); TextHandle = null; } Drawing.OnPreReset -= OnPreReset; Drawing.OnPostReset -= OnPostReset; AppDomain.CurrentDomain.ProcessExit -= OnUnload; AppDomain.CurrentDomain.DomainUnload -= OnUnload; }
/// <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(); } }
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(); }