星火批注
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

Pentiming.cs 3.1KB

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