tx
2025-04-22 e0b138b3e057de6f57021e6c8963868f5c5acc5a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing.Drawing2D;
using System.Drawing;
using Eventech.Utils.Images;
 
namespace TProduct.PumpGraph.Picture
{
 
    public partial class LxpSeriesChart
    {
        private bool _isDispDesignPoint = true;
        private List<Eventech.Model.FeatPoint> designPoints = null;
        public void AddDesignPoint(Eventech.Model.FeatPoint pt)
        {
            if (pt == null)
                return;
            designPoints = new List<Eventech.Model.FeatPoint>();
            designPoints.Add(pt);
        }
        private Color _designPointLineColor = Color.Red;
        private int _designPointLineWidth = 2;
       // protected   Eventech.Model.eDesignPointDispType _designPointDispType = Eventech.Model.eDesignPointDispType.LeftDownHalfCross;
 
        protected void DrawDesignPoints(Graphics g  )
        {
            if (designPoints == null || designPoints.Count()==0)
                return;
            if (!_isDispDesignPoint)
                return;
 
     
                using (Pen pen = new Pen(_designPointLineColor, _designPointLineWidth))
                {
                           foreach (var _designPoint in designPoints)
                           {
                               var center_pt = new PointF(MapRealToPictQ(_designPoint.X), MapRealToPictH(_designPoint.Y));
                               var h_length = this._chartDiagramSize.Width / 30;
                               var v_length = h_length * 0.61f;//0.618黄金分割
 
                               _graphics.DrawLine(pen, center_pt, new PointF(center_pt.X, center_pt.Y + v_length));
                               _graphics.DrawLine(pen, center_pt, new PointF(center_pt.X - h_length, center_pt.Y));
                               _graphics.DrawLine(pen, new PointF(center_pt.X, center_pt.Y + v_length), new PointF(center_pt.X - h_length, center_pt.Y));
                               _graphics.DrawLine(pen, new PointF(center_pt.X, center_pt.Y + v_length * 0.33f), new PointF(center_pt.X - h_length * 0.33f, center_pt.Y));
                               _graphics.DrawLine(pen, new PointF(center_pt.X, center_pt.Y + v_length * 0.66f), new PointF(center_pt.X - h_length * 0.66f, center_pt.Y));
                           }
 
                }
           
 
 
 
        }
 
 
   
 
 
 
 
    }
}