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;
                    }
                }
  • 相关阅读:
    Linux文件目录结构详解
    Linux常用命令学习
    51Nod 1094 和为k的连续区间 | 水
    (转) jsp学习笔记
    Hadoop到底能做什么?怎么用hadoop?
    51Nod 1092 回文字符串 | 最长公共子序列变形
    51Nod 1067 Bash游戏 V2 | 博弈论 Bash
    51Nod 1062 序列中最大的数 | 简单DP
    51Nod 1050 循环数组最大子段和 | DP
    HDU 5643 King's Game | 约瑟夫环变形
  • 原文地址:https://www.cnblogs.com/arxive/p/7798327.html
Copyright © 2011-2022 走看看