代码:
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();
}
新闻热点
疑难解答