正在加载图片...
文本的绘制 DrawString方法实现,用指定的Brush和Font对象绘制指定的文 本字符串。 ■构造函数 DrawString(String s,Font font,Brushbrush,float x,float y) ·参数s为要绘制的字符串, g this.CreateGraphics(); fontString="黑体,20号,灰色,倾斜"; font=new Font"隶书",20,FontStyle.Italic; brush new SolidBrush(Color.Gray); PointF结构 PointF p new PointF(20,130); 或替换为20,130 g.DrawString(fontString,font,brush,p);4 文本的绘制 ▪ DrawString方法实现,用指定的Brush和Font对象绘制指定的文 本字符串。 ▪ 构造函数 DrawString( String s, Font font, Brush brush, float x, float y) ▪ 参数s为要绘制的字符串, ▪ font 为字体样式 ▪ brush画刷 ▪ x,y文本左上角的坐标 g = this.CreateGraphics( ); fontString = "黑体,20号,灰色,倾斜"; font = new Font("隶书", 20, FontStyle.Italic); brush = new SolidBrush(Color .Gray); PointF p = new PointF(20, 130); g.DrawString(fontString, font, brush, p); PointF结构 或替换为20,130
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有