C#制作公章

时间:2021-05-02

本文借助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(); }

本文源自:翔宇亭——IT乐园(http://),转载请保留此信息!

声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。

相关文章