private void Form2_Paint(object sender, PaintEventArgs e)
{
//패스 그래디언트
Point[] pts = { new Point(100, 0), new Point(0, 100), new Point(200, 100) };
PathGradientBrush B = new PathGradientBrush(pts, WrapMode.Tile);
e.Graphics.FillRectangle(B, ClientRectangle);
//패스 그래디언트 끝
//패스변형
GraphicsPath Path = new GraphicsPath();
Path.AddString("한글", new FontFamily("궁서"), 0, 100, new Point(10, 30), new StringFormat());
//확장 후 외곽선 그리기
Path.Widen(new Pen(Color.Black, 3));
e.Graphics.DrawPath(Pens.Black, Path);
//확장 후 채우기
Path.Widen(new Pen(Color.Blue, 3));
e.Graphics.DrawPath(Pens.Black, Path);
//곡선 펴기
Path.Flatten(new Matrix(), 12f);
e.Graphics.DrawPath(Pens.Black, Path);
//회전
Matrix M = new Matrix();
M.Rotate(-10);
Path.Transform(M);
e.Graphics.FillPath(Brushes.Blue, Path);
//휘기
RectangleF R = Path.GetBounds();
PointF[] arPoint = new PointF[4];
arPoint[0] = new PointF(R.Left, R.Top + 30);
arPoint[1] = new PointF(R.Right, R.Top - 10);
arPoint[2] = new PointF(R.Left + 10, R.Bottom - 10);
arPoint[3] = new PointF(R.Right + 30, R.Bottom + 30);
Path.Warp(arPoint, R);
e.Graphics.FillPath(Brushes.Blue, Path);
//클리핑
//graphicspath path= new graphicspath();
//path.fillmode = fillmode.winding;
//path.addellipse(50, 10, 100, 80);
//path.addellipse(20, 45, 160, 120);
//e.graphics.fillpath(brushes.white, path);
//e.graphics.setclip(path);
//for (int y = 0; y < bottom; y+= 20)
//{
// string str = "눈사람의 모양의클리핑 영역에 글자를 쓴것입니다";
// e.graphics.drawstring(str, font, brushes.blue, 0, y);
//}
//클리핑 끝
}