zoukankan      html  css  js  c++  java
  • C#绘出平滑的文字

    发表时间:2006-4-12 22:59:00

    protected override void OnPaint(PaintEventArgs e)
      {
       base.OnPaint (e);
       FontFamily  fontFamily = new FontFamily("Times New Roman");
       Font font = new Font(
        fontFamily,
        32,
        FontStyle.Regular,
        GraphicsUnit.Pixel);
       SolidBrush  solidBrush = new SolidBrush(Color.FromArgb(255, 202, 0, 255));
       string string1 = "SingleBitPerPixel";
       string string2 = "AntiAlias";

       e.Graphics.TextRenderingHint = TextRenderingHint.SingleBitPerPixel;
       e.Graphics.DrawString(string1, font, solidBrush, new PointF(10, 10));

       e.Graphics.TextRenderingHint = TextRenderingHint.AntiAlias;
       e.Graphics.DrawString(string2, font, solidBrush, new PointF(10, 60));
      }

  • 相关阅读:
    Node自动重启工具 nodemon
    centos 集群
    kettle操作数据库增删改
    Dinic
    vim
    mermaid简介
    联赛模拟测试32
    检讨书模板
    博客园如何添加看板娘!
    手机浏览器如何调试
  • 原文地址:https://www.cnblogs.com/yuanxiaoping_21cn_com/p/1446299.html
Copyright © 2011-2022 走看看