コード例 #1
0
        /// <summary>
        /// Takes "bukalemun" values, converts them to "pixelated" values and saves for next drawing.
        /// </summary>
        /// <param name="dataPoints">An IEnumerable set of bukalemun type data points</param>
        public void SetPoints(IEnumerable <DataPoint> dataPoints)
        {
            // Convert bukalemunDataPoints into pixelatedDataPoints and add them to Ellipses & Polyliner classes //hypothetical == bukalemun?
            PointMarks.Reset();
            Polyliner.Reset();
            DataPoint temp_PixelatedDataPoint;

            foreach (DataPoint bukalemunDataPoint in dataPoints)
            {
                // Linear mapping from imagined "bukalemun 2D plane" to real "pixelated 2D plane"
                temp_PixelatedDataPoint   = bukalemunDataPoint;
                temp_PixelatedDataPoint.X = AxesWithOrigin.Origin.Item1 + temp_PixelatedDataPoint.X * AxesWithOrigin.XScalingFactor;
                temp_PixelatedDataPoint.Y = AxesWithOrigin.Origin.Item2 + temp_PixelatedDataPoint.Y * AxesWithOrigin.YScalingFactor;

                // Add the result of transformation as both a circle to the Ellipses and point to the Polyliner
                PointMarks.AddPoint(bukalemunDataPoint, temp_PixelatedDataPoint);
                Polyliner.AddPoint(new System.Windows.Point(temp_PixelatedDataPoint.X, temp_PixelatedDataPoint.Y));
            }
        }
コード例 #2
0
 public void ResetAll()
 {
     AutoIncrementedDataPoints.Clear();
     PointMarks.Reset();
     Polyliner.Reset();
 }