public SCoordsWorkRequest(TransformType transformType, SCoords sCoords, CanvasSize canvasSize, MapSection mapSection, int jobId)
 {
     TransformType = transformType;
     SCoords       = sCoords ?? throw new ArgumentNullException(nameof(sCoords));
     CanvasSize    = canvasSize ?? throw new ArgumentNullException(nameof(canvasSize));
     MapSection    = mapSection ?? throw new ArgumentNullException(nameof(mapSection));
     JobId         = jobId;
 }
 private SCoordsWorkRequest()
 {
     TransformType = TransformType.In;
     SCoords       = null;
     CanvasSize    = new CanvasSize(0, 0);
     MapSection    = new MapSection(new Point(0, 0), new CanvasSize(0, 0));
     JobId         = -1;
 }
示例#3
0
 public SMapWorkRequest(string name, SCoords sCoords, CanvasSize canvasSize, MapSection area, int maxIterations, string connectionId)
 {
     Name          = name ?? throw new ArgumentNullException(nameof(name));
     SCoords       = sCoords ?? throw new ArgumentNullException(nameof(sCoords));
     CanvasSize    = canvasSize ?? throw new ArgumentNullException(nameof(canvasSize));
     Area          = area ?? throw new ArgumentNullException(nameof(area));
     MaxIterations = maxIterations;
     ConnectionId  = connectionId ?? throw new ArgumentNullException(nameof(connectionId));
 }
示例#4
0
 private SMapWorkRequest()
 {
     Name         = null;
     SCoords      = null;
     CanvasSize   = new CanvasSize(0, 0);
     Area         = new MapSection(new Point(0, 0), new CanvasSize(0, 0));
     ConnectionId = null;
     JobId        = -1;
 }
示例#5
0
        public CanvasSize GetWholeUnits(int blockSize)
        {
            CanvasSize result = new CanvasSize()
            {
                Width  = (int)Math.Ceiling(Width / (double)blockSize),
                Height = (int)Math.Ceiling(Height / (double)blockSize)
            };

            return(result);
        }
示例#6
0
 public MapSection(RectangleInt rectangleInt)
 {
     SectionAnchor = new Point(rectangleInt.Point.X, rectangleInt.Point.Y);
     CanvasSize    = new CanvasSize(rectangleInt.Size.W, rectangleInt.Size.H);
 }
示例#7
0
 public MapSection(Point sectionAnchor, CanvasSize canvasSize)
 {
     SectionAnchor = sectionAnchor;
     CanvasSize    = canvasSize;
 }
示例#8
0
 private MapSection()
 {
     SectionAnchor = null;
     CanvasSize    = null;
 }