zoukankan      html  css  js  c++  java
  • 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;
                    }
                }
  • 相关阅读:
    python常用函数年初大总结
    Linux系统巡检常用命令
    码率
    视频码率计算问题
    Python快速教程
    MFC消息机制
    MySQL多表查询
    VoIP的话音质量测量方法
    用Py2exe打包Python脚本简单介绍
    在Eclipse中执行Andorid test preject提示The connection to adb is down, and a severe error has occured.解决方法
  • 原文地址:https://www.cnblogs.com/arxive/p/7798327.html
Copyright © 2011-2022 走看看