コード例 #1
0
        public Axis SuggestXAxis()
        {
            if (data_.Count < 2)
            {
                return(data_.SuggestXAxis());
            }

            // else

            Axis a = data_.SuggestXAxis();

            PointD p1 = data_[0];
            PointD p2 = data_[1];
            PointD p3 = data_[data_.Count - 2];
            PointD p4 = data_[data_.Count - 1];

            double offset1;
            double offset2;

            if (!center_)
            {
                offset1 = 0.0f;
                offset2 = p4.X - p3.X;
            }
            else
            {
                offset1 = (p2.X - p1.X) / 2.0f;
                offset2 = (p4.X - p3.X) / 2.0f;
            }

            a.WorldMin -= offset1;
            a.WorldMax += offset2;

            return(a);
        }
コード例 #2
0
 public Axis SuggestXAxis()
 {
     return(data_.SuggestXAxis());
 }