private void PaintEntity(ref Graphics graphic, ChartEntityType entityType, double x, double y, double heading)
        {
            var entity = CoordinateSystemOperation.CalculateEntityPoints(new PointModel(x, y), heading, entityHeight);

            Pen pen = new Pen(Color.Black, 2);

            if (entityType == ChartEntityType.SUB)
            {
                pen = new Pen(Color.Blue, 2);
            }
            else if (entityType == ChartEntityType.TARGET)
            {
                pen = new Pen(Color.Black, 2);
            }
            else if (entityType == ChartEntityType.TARGET2)
            {
                pen = new Pen(Color.DarkOrange, 2);
            }

            DrawLineByPoint(ref graphic, pen, entity.headPoint, entity.bottomLeftPoint);
            DrawLineByPoint(ref graphic, pen, entity.headPoint, entity.bottomRightPoint);
            DrawLineByPoint(ref graphic, pen, entity.bottomLeftPoint, entity.bottomRightPoint);

            //DrawLineByLine(ref graphic, pen, entity.centerLine);
            //DrawLineByLine(ref graphic, tempPen, entity.bottomLine);

            pen.Dispose();
        }
        private void PaintTargetLine(ref Graphics graphic, LineModel targetLine, ChartEntityType targetType)
        {
            Pen pen = new Pen(Color.Black, 2);

            if (targetType == ChartEntityType.TARGET)
            {
                pen = new Pen(Color.Black, 2);
            }
            else if (targetType == ChartEntityType.TARGET2)
            {
                pen = new Pen(Color.DarkOrange, 2);
            }
            DrawLineByLine(ref graphic, pen, targetLine);
            pen.Dispose();
        }
 private void PaintEntity(ref Graphics graphic, ChartEntityType entityType, PointModel point, double heading)
 {
     PaintEntity(ref graphic, entityType, point.x, point.y, heading);
 }