首页 > 开发 > 综合 > 正文

利用C#制作公章

2024-07-21 02:26:52
字体:
来源:转载
供稿:网友

代码:
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();
  }

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表