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));
|
}
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
}
|