Beispiel #1
0
        //
        // RealPos>Location +off
        // Location>RealPos -off
        //


        public FCBlock(ChartDrawer parent)
        {
            Parent                     = parent;
            brush                      = new SolidBrush(Color.Black);
            StringFormat               = new StringFormat();
            StringFormat.Alignment     = StringAlignment.Center;
            StringFormat.LineAlignment = StringAlignment.Center;
            Font = new Font("宋体", 10.5f);
            Text = "";
        }
Beispiel #2
0
 public IEnumerator DrawLineChart()
 {
     while (!_isPause)
     {
         m_rpmData.Add(new Vector2(_time, _speed));
         _time += 1;
         StartCoroutine(ChartDrawer.InitLineChart(_texture));
         StartCoroutine(ChartDrawer.DrawGrid(_texture));
         StartCoroutine(ChartDrawer.DrawLineChart(_texture, m_rpmData));
         _texture.Apply();
         yield return(new WaitForSeconds(1));
     }
 }
Beispiel #3
0
    void Awake()
    {
        chart = gameObject.GetComponent <LineChart>();
        if (chart == null)
        {
            return;
        }

        chart.customDrawCallback = delegate(VertexHelper vh)
        {
            var dataPoints = chart.series.list[0].dataPoints;
            if (dataPoints.Count > 0)
            {
                var pos      = dataPoints[3];
                var zeroPos  = new Vector3(chart.coordinateX, chart.coordinateY);
                var startPos = new Vector3(pos.x, zeroPos.y);
                var endPos   = new Vector3(pos.x, zeroPos.y + chart.coordinateHeight);
                ChartDrawer.DrawLine(vh, startPos, endPos, 1, Color.blue);
                ChartDrawer.DrawCricle(vh, pos, 5, Color.blue);
            }
        };
    }
Beispiel #4
0
 private void initChartDrawer()
 {
     _chartDrawer = new ChartDrawer(chart1, _symbolService);
 }
Beispiel #5
0
 public FCSEBlock(ChartDrawer chartDrawer) : base(chartDrawer)
 {
     borderPen = new Pen(Color.FromArgb(notEnteredAlpha, 0, 160, 233), 2);
     fillBrush = new SolidBrush(Color.FromArgb(200, 255, 255));
     BlockType = FCBlockType.BlockStartOrEnd;
 }