程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> C語言 >> 關於C語言 >> 利用C#制作公章

利用C#制作公章

編輯:關於C語言

代碼:
private void button1_Click(object sender, System.EventArgs e)
  {
   Graphics g = this.CreateGraphics();
   g.Clear(Color.White);
   //g.InterpolationMode = InterpolationMode.HighQualityBicubic;
   g.CompositingQuality = CompositingQuality.HighQuality;
   g.SmoothingMode = SmoothingMode.HighQuality;
           
   int radius = 200;
   CircularTextualLayout ctl = new CircularTextualLayout();
   ctl.Radius = radius;
   Point location = new Point(50, 20);
   //ctl.CenterPoint = new Point(location.X + radius, location.Y + radius);
   ctl.TextDrawing = "方正姚體方正姚體方正姚體方正姚體";

   float arcAngle = 270;
   ctl.ArcAngle = arcAngle;
   ctl.AngleStart = -arcAngle/2 + arcAngle/2/ctl.TextDrawing.Length;
   ctl.TextFontInner = new Font("方正姚體", radius/3.2f);
   ctl.RatioX = 0.6f;
   ctl.BorderWidth = (int)(ctl.Radius / 40);
   //ctl.IsBold = false;
   ctl.Location = location;
   ctl.WordsColor = Color.FromArgb(250, Color.Red);
   ctl.BorderColor = Color.FromArgb(250, Color.Red);
   ctl.RectColor = Color.FromArgb(250, Color.Red);
   ctl.Draw(g);

   g.Dispose();
  }

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved