using System; using System.Collections; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using TQLComm; namespace XHPZ.Desktop { 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(); } } }