日期:2014-05-20 浏览次数:20861 次
if (textHasFrame)
{
stringFormat = StringFormat.GenericDefault;
Brush brush = new SolidBrush(Color.FromArgb(this.dColor));
SizeF sf = Paint.MeasureText("测", this.fTextSize);
// 设置创建的路径对象
myPath.AddString(this.text,
new FontFamily(/*StaticField.DrawText_FONT_FORMAT*/"宋体"),
(int)this.textStyle,
/*StaticField.DrawText_TextRectHeight*/
sf.Height,
/*new RectangleF((float)this.MinX, (float)this.MinY, (float)this.widthEx, (float)this.heightEx)*/
new PointF((float)this.MinX, (float)this.MinY),
stringFormat);
//Draw the path to the screen.
g.FillPath(brush, myPath);
g.DrawPath(new Pen(this.textFrameColor, this.textFrameWidth), myPath);
}