您的位置:首页 > 编程语言 > C#

C#中怎么压扁字体

2014-02-19 13:11 447 查看
e.Graphics.SmoothingMode = SmoothingMode.HighQuality;
GraphicsPath path = new GraphicsPath();
StringFormat strformat = new StringFormat();
strformat.Alignment = StringAlignment.Center;
strformat.LineAlignment = StringAlignment.Center;
path.AddString("中国", new FontFamily("黑体"), (int)this.Font.Style, 100f, new Point(10, 10), strformat);

Matrix m = new Matrix();
m.Scale(1f, 0.2f);   //压扁
path.Transform(m);
e.Graphics.FillPath(new SolidBrush(Color.Red), path);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: