Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PointF p1 = new PointF(600F, 130F);
- PointF p2 = new PointF(445F, 300F);
- PointF p3 = new PointF(755F, 300F);
- PointF p4 = new PointF(600F, 200F);
- PointF p5 = new PointF(400F, 400F);
- PointF p6 = new PointF(800F, 400F);
- PointF p7 = new PointF(600F, 270F);
- PointF p8 = new PointF(340F, 520F);
- PointF p9 = new PointF(860F, 520F);
- PointF p10 = new PointF(580F, 500F);
- PointF p11 = new PointF(580F, 530F);
- PointF p12 = new PointF(620F, 630F);
- PointF p13 = new PointF(620F, 540F);
- PointF[] trojkat1 =
- {
- p1,p2,p3
- };
- PointF[] trojkat2 =
- {
- p4,p5,p6
- };
- PointF[] trojkat3 =
- {
- p7,p8,p9
- };
- e.Graphics.DrawPolygon(pen, trojkat1);
- e.Graphics.DrawPolygon(pen, trojkat2);
- e.Graphics.DrawPolygon(pen, trojkat3);
- // Create location and size of rectangle.
- SolidBrush brownBrush = new SolidBrush(Color.SaddleBrown);
- e.Graphics.FillRectangle(brownBrush, 580,510,40,70);
- // Create solid brush.
- SolidBrush greenBrush = new SolidBrush(Color.Green);
- //PointF[] curvePoints = { p1,p2,p3,p4,p5,p6,p7,p8,p9 };
- PointF[] curvePoints1 = { p1, p2, p3};
- PointF[] curvePoints2 = { p4, p5, p6 };
- PointF[] curvePoints3 = { p7, p8, p9 };
- // Define fill mode.
- FillMode newFillMode = FillMode.Winding;
- // Fill polygon to screen.
- e.Graphics.FillPolygon(greenBrush, curvePoints1, newFillMode);
- e.Graphics.FillPolygon(greenBrush, curvePoints2, newFillMode);
- e.Graphics.FillPolygon(greenBrush, curvePoints3, newFillMode);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement