123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- using System.Collections;
- using System.Drawing;
-
- using TQLComm;
-
- namespace XHWK.WKTool
- {
- public struct PenData
- {
- public int PenWidth;
- public Color PenColor;
- public Dot dot;
- public PenData(int PenWidth, Color PenColor, Dot dot)
- {
- this.PenWidth = PenWidth;
- this.PenColor = PenColor;
- this.dot = new Dot(dot);
- }
-
- public PenData(PenData Data)
- {
- this.PenWidth = Data.PenWidth;
- this.PenColor = Data.PenColor;
- this.dot = new Dot(Data.dot);
- }
-
- }
-
- public class DrawBezierInfo
- {
- public float g_x0 = 0, g_x1 = 0, g_x2 = 0, g_x3 = 0;
- public float g_y0 = 0, g_y1 = 0, g_y2 = 0, g_y3 = 0;
- public float g_p0 = 0, g_p1 = 0, g_p2 = 0, g_p3 = 0;
- public float g_vx01 = 0, g_vy01 = 0, g_n_x0 = 0, g_n_y0 = 0;
- public float g_vx21 = 0, g_vy21 = 0;
- public float g_norm = 0;
- public float g_n_x2 = 0, g_n_y2 = 0;
- public int DrawIndex = 0;
- public void clear()
- {
- g_x0 = 0; g_x1 = 0; g_x2 = 0; g_x3 = 0;
- g_y0 = 0; g_y1 = 0; g_y2 = 0; g_y3 = 0;
- g_p0 = 0; g_p1 = 0; g_p2 = 0; g_p3 = 0;
- g_vx01 = 0; g_vy01 = 0; g_n_x0 = 0; g_n_y0 = 0;
- g_vx21 = 0; g_vy21 = 0;
- g_norm = 0;
- g_n_x2 = 0; g_n_y2 = 0;
- DrawIndex = 0;
-
- }
- }
-
- public class Pentiming
- {
- int Width = 5;
- int PenWidth = 5;
- Color PenColor = Color.Black;
- public ArrayList DotData = new ArrayList();
-
- //public DrawingBox Drawing = null;
- public long DrawIndex = 0;
-
- public DrawBezierInfo BoxBezierInfo = new DrawBezierInfo();
- public DrawBezierInfo ImageBezierInfo = new DrawBezierInfo();
-
- //Form1 from = null;
-
- public Pentiming()//(PictureBox Box, Form1 from)
- {
- //this.from = from;
- //Drawing = new DrawingBox(Box, from);
- }
- public void SetPenWidth(int Raio)
- {
- this.PenWidth = Width * Raio;
- }
-
- public void SetPenColor(Color PenColor)
- {
- this.PenColor = PenColor;
- }
-
- public void DrawImaging(Dot dot)
- {
-
- //PenData data = new PenData(this.PenWidth, this.PenColor, dot);
-
- //from.timed.DotData.Add(data);
- //if (DrawingBox.DrawType == 2) return;
- //Drawing.Drawdot(data, ref BoxBezierInfo, ref ImageBezierInfo);
- }
-
- public void SetgScale(float gScale)
- {
- //Drawing.SetgScale(gScale);
- }
-
- //public Image GetImage()
- //{
- // return Drawing.GetImage();
- //}
-
- public void Seep(int sp)
- {
- //Drawing.Seep(sp);
- }
-
- public void clear()
- {
-
- DrawIndex = 0;
- BoxBezierInfo.clear();
- ImageBezierInfo.clear();
- DotData.Clear();
- //Drawing.clear();
- }
-
-
- }
- }
|