星火微课系统客户端
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. using System.Collections;
  2. using System.Drawing;
  3. using TQLComm;
  4. namespace XHWK.WKTool
  5. {
  6. public struct PenData
  7. {
  8. public int PenWidth;
  9. public Color PenColor;
  10. public Dot dot;
  11. public PenData(int PenWidth, Color PenColor, Dot dot)
  12. {
  13. this.PenWidth = PenWidth;
  14. this.PenColor = PenColor;
  15. this.dot = new Dot(dot);
  16. }
  17. public PenData(PenData Data)
  18. {
  19. this.PenWidth = Data.PenWidth;
  20. this.PenColor = Data.PenColor;
  21. this.dot = new Dot(Data.dot);
  22. }
  23. }
  24. public class DrawBezierInfo
  25. {
  26. public float g_x0 = 0, g_x1 = 0, g_x2 = 0, g_x3 = 0;
  27. public float g_y0 = 0, g_y1 = 0, g_y2 = 0, g_y3 = 0;
  28. public float g_p0 = 0, g_p1 = 0, g_p2 = 0, g_p3 = 0;
  29. public float g_vx01 = 0, g_vy01 = 0, g_n_x0 = 0, g_n_y0 = 0;
  30. public float g_vx21 = 0, g_vy21 = 0;
  31. public float g_norm = 0;
  32. public float g_n_x2 = 0, g_n_y2 = 0;
  33. public int DrawIndex = 0;
  34. public void clear()
  35. {
  36. g_x0 = 0; g_x1 = 0; g_x2 = 0; g_x3 = 0;
  37. g_y0 = 0; g_y1 = 0; g_y2 = 0; g_y3 = 0;
  38. g_p0 = 0; g_p1 = 0; g_p2 = 0; g_p3 = 0;
  39. g_vx01 = 0; g_vy01 = 0; g_n_x0 = 0; g_n_y0 = 0;
  40. g_vx21 = 0; g_vy21 = 0;
  41. g_norm = 0;
  42. g_n_x2 = 0; g_n_y2 = 0;
  43. DrawIndex = 0;
  44. }
  45. }
  46. public class Pentiming
  47. {
  48. int Width = 5;
  49. int PenWidth = 5;
  50. Color PenColor = Color.Black;
  51. public ArrayList DotData = new ArrayList();
  52. //public DrawingBox Drawing = null;
  53. public long DrawIndex = 0;
  54. public DrawBezierInfo BoxBezierInfo = new DrawBezierInfo();
  55. public DrawBezierInfo ImageBezierInfo = new DrawBezierInfo();
  56. //Form1 from = null;
  57. public Pentiming()//(PictureBox Box, Form1 from)
  58. {
  59. //this.from = from;
  60. //Drawing = new DrawingBox(Box, from);
  61. }
  62. public void SetPenWidth(int Raio)
  63. {
  64. this.PenWidth = Width * Raio;
  65. }
  66. public void SetPenColor(Color PenColor)
  67. {
  68. this.PenColor = PenColor;
  69. }
  70. public void DrawImaging(Dot dot)
  71. {
  72. //PenData data = new PenData(this.PenWidth, this.PenColor, dot);
  73. //from.timed.DotData.Add(data);
  74. //if (DrawingBox.DrawType == 2) return;
  75. //Drawing.Drawdot(data, ref BoxBezierInfo, ref ImageBezierInfo);
  76. }
  77. public void SetgScale(float gScale)
  78. {
  79. //Drawing.SetgScale(gScale);
  80. }
  81. //public Image GetImage()
  82. //{
  83. // return Drawing.GetImage();
  84. //}
  85. public void Seep(int sp)
  86. {
  87. //Drawing.Seep(sp);
  88. }
  89. public void clear()
  90. {
  91. DrawIndex = 0;
  92. BoxBezierInfo.clear();
  93. ImageBezierInfo.clear();
  94. DotData.Clear();
  95. //Drawing.clear();
  96. }
  97. }
  98. }