System.Drawing.Text.TextRenderingHint 的几种效果

简介:

 

 

复制代码
            for (int i = 0; i < 6; i++)
            {
                g5.TextRenderingHint = (System.Drawing.Text.TextRenderingHint)i;
                string txt;
                int font_sz = 25;

                txt = "Static 测试 ";
                switch ((System.Drawing.Text.TextRenderingHint)i)
                {
                    case System.Drawing.Text.TextRenderingHint.SystemDefault:
                        txt += "SystemDefault";
                        g5.DrawString(txt, new Font("Times New Roman", font_sz), new SolidBrush(Color.Black),
                            new PointF(this._parentControl.Width - 400, 30 + 35 * i));
                        break;
                    case System.Drawing.Text.TextRenderingHint.AntiAlias:
                        txt += "AntiAlias";
                        g5.DrawString(txt, new Font("Times New Roman", font_sz), new SolidBrush(Color.Black),
                            new PointF(this._parentControl.Width - 400, 30 + 35 * i));
                        break;
                    case System.Drawing.Text.TextRenderingHint.AntiAliasGridFit:
                        txt += "AntiAliasGridFit";
                        g5.DrawString(txt, new Font("Times New Roman", font_sz), new SolidBrush(Color.Black),
                            new PointF(this._parentControl.Width - 400, 30 + 35 * i));
                        break;
                    case System.Drawing.Text.TextRenderingHint.ClearTypeGridFit:
                        txt += "ClearTypeGridFit";
                        g5.DrawString(txt, new Font("Times New Roman", font_sz), new SolidBrush(Color.Black),
                            new PointF(this._parentControl.Width - 400, 30 + 35 * i));
                        break;
                    case System.Drawing.Text.TextRenderingHint.SingleBitPerPixel:
                        txt += "SingleBitPerPixel";
                        g5.DrawString(txt, new Font("Times New Roman", font_sz), new SolidBrush(Color.Black),
                            new PointF(this._parentControl.Width - 400, 30 + 35 * i));
                        break;
                    case System.Drawing.Text.TextRenderingHint.SingleBitPerPixelGridFit:
                        txt += "SingleBitPerPixelGridFit";
                        g5.DrawString(txt, new Font("Times New Roman", font_sz), new SolidBrush(Color.Black),
                            new PointF(this._parentControl.Width - 400, 30 + 35 * i));
                        break;
                    default:
                        break;
                }
            }
复制代码

 

没有整理与归纳的知识,一文不值!高度概括与梳理的知识,才是自己真正的知识与技能。 永远不要让自己的自由、好奇、充满创造力的想法被现实的框架所束缚,让创造力自由成长吧! 多花时间,关心他(她)人,正如别人所关心你的。理想的腾飞与实现,没有别人的支持与帮助,是万万不能的。


    本文转自wenglabs博客园博客,原文链接:http://www.cnblogs.com/arxive/p/7798327.html,如需转载请自行联系原作者

相关文章
C. Registration system
C. Registration system
46 0
ZCMU - 1992: Swiss-system tournament
ZCMU - 1992: Swiss-system tournament
111 0
|
JavaScript Linux 前端开发
|
网络协议 关系型数据库 网络安全
|
Oracle 关系型数据库 Java
|
监控 安全 数据中心
|
Linux Windows Unix