110,534
社区成员
发帖
与我相关
我的任务
分享
GraphicsPath(Point[] apt, byte[] abyPointType);
GraphicsPath(PointF[] apt, byte[] abyPointType);
Region(GraphicsPath path);
Void SetClip(Region regn, CombineMode cm);
private void button2_Click(object sender, EventArgs e)
{
this.Close();
}
private void IrregularForm_Load(object sender, EventArgs e)
{
GraphicsPath path = new GraphicsPath();
Point[] pt = {
new Point(0,0),
new Point(100,150),
new Point(this.Width-100,10),
};
path.AddCurve(pt);
Point[] ptA = {
new Point(this.Width-40,this.Height-60),
new Point(this.Width,this.Height),
new Point(50,this.Height),
};
path.AddCurve(ptA);
path.CloseAllFigures();
this.Region = new Region(path);
}
private void button1_Click(object sender, EventArgs e)
{
float f = 0.0f;
GraphicsPath path = new GraphicsPath();
Point[] pt = {
new Point(0,0),
new Point(10,20),
new Point(this.Width-20,0),
};
path.AddCurve(pt);
Point[] ptA = {
new Point(this.Width-40,this.Height-60),
new Point(this.Width,this.Height),
new Point(50,this.Height),
};
path.AddCurve(ptA);
Matrix rotationTra = new Matrix(1, 0, 0, 1, 1, 1);
PointF rp = new PointF(110.0f, 110.0f);
rotationTra.RotateAt(f, rp);
path.Transform(rotationTra);
f = f + 10;
this.Region = new Region(path);
}
}