当前位置:编程学习 > C#/ASP.NET >>

C#之实现缩放字体代码

  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Text;
  7. using System.Windows.Forms;
  8. using System.Drawing.Drawing2D;
  9. namespace advanced_drawing
  10. {
  11.     public partial class Form5 : Form
  12.     {
  13.         public Form5()
  14.         {
  15.             InitializeComponent();
  16.         }
  17.         private void button1_Click(object sender, EventArgs e)
  18.         {
  19.             Matrix matrix = new Matrix();
  20.             matrix.Scale(5, 1);
  21.             Graphics g = this.CreateGraphics();
  22.             g.Transform = matrix;
  23.             g.DrawString("zhuzhao",this.Font,Brushes.Black,new RectangleF(0,0,200,200));
  24.         }
  25.     }
  26. }
补充:软件开发 , C# ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,