Advertisement
Guest User

Untitled

a guest
Dec 14th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1.  
  2. PointF p1 = new PointF(600F, 130F);
  3. PointF p2 = new PointF(445F, 300F);
  4. PointF p3 = new PointF(755F, 300F);
  5.  
  6. PointF p4 = new PointF(600F, 200F);
  7. PointF p5 = new PointF(400F, 400F);
  8. PointF p6 = new PointF(800F, 400F);
  9.  
  10. PointF p7 = new PointF(600F, 270F);
  11. PointF p8 = new PointF(340F, 520F);
  12. PointF p9 = new PointF(860F, 520F);
  13.  
  14. PointF p10 = new PointF(580F, 500F);
  15. PointF p11 = new PointF(580F, 530F);
  16. PointF p12 = new PointF(620F, 630F);
  17. PointF p13 = new PointF(620F, 540F);
  18. PointF[] trojkat1 =
  19. {
  20. p1,p2,p3
  21. };
  22. PointF[] trojkat2 =
  23. {
  24. p4,p5,p6
  25. };
  26. PointF[] trojkat3 =
  27. {
  28. p7,p8,p9
  29. };
  30.  
  31. e.Graphics.DrawPolygon(pen, trojkat1);
  32. e.Graphics.DrawPolygon(pen, trojkat2);
  33. e.Graphics.DrawPolygon(pen, trojkat3);
  34.  
  35.  
  36.  
  37.  
  38.  
  39. // Create location and size of rectangle.
  40.  
  41.  
  42. SolidBrush brownBrush = new SolidBrush(Color.SaddleBrown);
  43. e.Graphics.FillRectangle(brownBrush, 580,510,40,70);
  44.  
  45.  
  46. // Create solid brush.
  47. SolidBrush greenBrush = new SolidBrush(Color.Green);
  48.  
  49.  
  50. //PointF[] curvePoints = { p1,p2,p3,p4,p5,p6,p7,p8,p9 };
  51. PointF[] curvePoints1 = { p1, p2, p3};
  52. PointF[] curvePoints2 = { p4, p5, p6 };
  53. PointF[] curvePoints3 = { p7, p8, p9 };
  54.  
  55. // Define fill mode.
  56. FillMode newFillMode = FillMode.Winding;
  57.  
  58. // Fill polygon to screen.
  59. e.Graphics.FillPolygon(greenBrush, curvePoints1, newFillMode);
  60. e.Graphics.FillPolygon(greenBrush, curvePoints2, newFillMode);
  61. e.Graphics.FillPolygon(greenBrush, curvePoints3, newFillMode);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement