コード例 #1
0
ファイル: ScreenPoint.cs プロジェクト: horker/oxyplotcli2
        public ScreenPoint(Double[] values)
        {
            if (values.Length != 2)
            {
                throw new ArgumentException("Specify two numbers to create a ScreenPoint object");
            }

            Value = new OxyPlot.ScreenPoint(values[0], values[1]);
        }
コード例 #2
0
ファイル: ScreenPoint.cs プロジェクト: horker/oxyplotcli2
        public static OxyPlot.ScreenPoint[] ConvertArray(Double[] values)
        {
            if (values.Length % 2 != 0)
            {
                throw new ArgumentException("Specify an even length array to create an array of ScreenPoint objects");
            }

            var result = new OxyPlot.ScreenPoint[values.Length / 2];

            for (var i = 0; i < result.Length; ++i)
            {
                result[i] = new OxyPlot.ScreenPoint(values[i * 2], values[i * 2 + 1]);
            }

            return(result);
        }
コード例 #3
0
ファイル: ScreenPoint.cs プロジェクト: horker/oxyplotcli2
 public ScreenPoint()
 {
     Value = new OxyPlot.ScreenPoint();
 }