예제 #1
0
 private short[] GetValueByLineAssist(List<GeoXYPoint> pointInGeoXYLine, GeoXYPoint largePoint, GeoXYPoint smallPoint, double xOffSet, double yOffSet, bool isDivInsert)
 {
     List<short> tempValue = new List<short>();
     GeoXYPoint point = largePoint.Clone();
     if (largePoint.X > smallPoint.X)
     {
         this.GetTempValueByLineMinus(pointInGeoXYLine, point, smallPoint, ref tempValue, xOffSet, yOffSet, isDivInsert);
     }
     else
     {
         this.GetTempValueByLinePlus(pointInGeoXYLine, ref point, smallPoint, ref tempValue, xOffSet, yOffSet, isDivInsert);
     }
     tempValue.Add(this.GetValueByGeoXYPoint(smallPoint, isDivInsert));
     pointInGeoXYLine.Add(smallPoint);
     return tempValue.ToArray();
 }
예제 #2
0
 private static bool MakeLargeAndSmallPoint(GeoXYPoint startPoint, GeoXYPoint endPoint, bool isNeedReverse, out GeoXYPoint largePoint, out GeoXYPoint smallPoint)
 {
     if (startPoint.Y < endPoint.Y)
     {
         largePoint = endPoint.Clone();
         smallPoint = startPoint.Clone();
         isNeedReverse = true;
         return isNeedReverse;
     }
     largePoint = startPoint.Clone();
     smallPoint = endPoint.Clone();
     return isNeedReverse;
 }
예제 #3
0
 private void GetTempValueByLinePlus(List<GeoXYPoint> pointInGeoXYLine, ref GeoXYPoint largePoint, GeoXYPoint smallPoint, ref List<short> tempValue, double xOffSet, double yOffSet, bool isDivInsert)
 {
     if ((xOffSet <= 0.0) && (yOffSet <= 0.0))
     {
         tempValue.Add(this.GetValueByGeoXYPoint(largePoint, isDivInsert));
     }
     else if (largePoint.X == smallPoint.X)
     {
         while (largePoint.Y > smallPoint.Y)
         {
             tempValue.Add(this.GetValueByGeoXYPoint(largePoint, isDivInsert));
             pointInGeoXYLine.Add(largePoint.Clone());
             largePoint.Y -= yOffSet;
         }
     }
     else if (largePoint.Y == smallPoint.Y)
     {
         while (largePoint.X < smallPoint.X)
         {
             tempValue.Add(this.GetValueByGeoXYPoint(largePoint, isDivInsert));
             pointInGeoXYLine.Add(largePoint.Clone());
             largePoint.X += xOffSet;
         }
     }
     else
     {
         while ((largePoint.X < smallPoint.X) && (largePoint.Y > smallPoint.Y))
         {
             tempValue.Add(this.GetValueByGeoXYPoint(largePoint, isDivInsert));
             pointInGeoXYLine.Add(largePoint.Clone());
             largePoint.X += xOffSet;
             largePoint.Y -= yOffSet;
         }
     }
 }