Demo.WindowsForms/BSE.Windows.Forms/XPander/UseClearTypeGridFit.cs
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Drawing.Text;
namespace BSE.Windows.Forms
{
/// <summary>
/// Set the TextRenderingHint.ClearTypeGridFit until instance disposed.
/// </summary>
public class UseClearTypeGridFit : IDisposable
{
#region FieldsPrivate
private Graphics m_graphics;
private TextRenderingHint m_textRenderingHint;
#endregion
#region MethodsPublic
/// <summary>
/// Initialize a new instance of the UseClearTypeGridFit class.
/// </summary>
/// <param name="graphics">Graphics instance.</param>
public UseClearTypeGridFit(Graphics graphics)
{
if (graphics == null)
{
throw new ArgumentNullException("graphics",
string.Format(System.Globalization.CultureInfo.InvariantCulture,
Demo.WindowsForms.Properties.Resources.IDS_ArgumentException,
"graphics"));
}
this.m_graphics = graphics;
this.m_textRenderingHint = this.m_graphics.TextRenderingHint;
this.m_graphics.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
}
/// <summary>
/// destructor of the UseClearTypeGridFit class.
/// </summary>
~UseClearTypeGridFit()
{
Dispose(false);
}
/// <summary>
/// Releases all resources used by the class.
/// </summary>
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
#endregion
#region MethodsProtected
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected virtual void Dispose(bool disposing)
后面还有 10 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
