Ejemplo n.º 1
0
 public void SetCenter(ReadOnlyPoint center)
 {
     if (Map.PanLock)
     {
         return;
     }
     _viewport.SetCenter(center);
     Limiter.LimitExtent(_viewport, Map.Envelope);
 }
Ejemplo n.º 2
0
        static void Main()
        {
            var p = new Point(1, 2);

            p.Set(3, 4);                   // readonly フィールドの書き換えが出来ちゃう

            System.Console.WriteLine(p.X); // 3
            System.Console.WriteLine(p.Y); // 4

            var r = new ReadOnlyPoint(1, 2);

            System.Console.WriteLine(r.X); // こっちなら、絶対に 1 な保証あり
            System.Console.WriteLine(r.Y); // 同、2
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Create a new viewport from another viewport
        /// </summary>
        /// <param name="viewport">Viewport from which to copy all values</param>
        public Viewport(IReadOnlyViewport viewport) : this()
        {
            _resolution = viewport.Resolution;
            _width      = viewport.Width;
            _height     = viewport.Height;
            _rotation   = viewport.Rotation;
            _center     = new ReadOnlyPoint(viewport.Center);
            if (viewport.Extent != null)
            {
                _extent = new BoundingBox(viewport.Extent);
            }
            if (viewport.WindowExtent != null)
            {
                _windowExtent = new Quad(viewport.WindowExtent);
            }

            UpdateExtent();
        }
Ejemplo n.º 4
0
 public void SetCenter(ReadOnlyPoint center)
 {
     _viewport.SetCenter(center);
     Limiter.LimitExtent(_viewport, Map.Envelope);
 }
Ejemplo n.º 5
0
 public static bool Within(ReadOnlyPoint point, ReadOnlyPolygon area) => throw null;
Ejemplo n.º 6
0
 public static bool Disjoint(ReadOnlyPoint point, ReadOnlyPolygon area) => throw null;
Ejemplo n.º 7
0
 public static bool Coincident(ReadOnlyPoint point, ReadOnlyPolygon area) => throw null;
Ejemplo n.º 8
0
 public ReadOnlyPoint(ReadOnlyPoint readOnlyPoint)
 {
     X = readOnlyPoint.X;
     Y = readOnlyPoint.Y;
 }
Ejemplo n.º 9
0
 public static bool Disjoint(ReadOnlyPoint point, ReadOnlyLine line) => throw null;
Ejemplo n.º 10
0
 public static bool CoincidentAndTerminate(ReadOnlyPoint point, ReadOnlyLine line) => throw null;
Ejemplo n.º 11
0
 public static bool Coincident(ReadOnlyPoint point, ReadOnlyLine line) => throw null;
Ejemplo n.º 12
0
 public static bool Disjoint(ReadOnlyPoint a, ReadOnlyPoint b) => throw null;
Ejemplo n.º 13
0
 public static bool Coincident(ReadOnlyPoint a, ReadOnlyPoint b) => throw null;
Ejemplo n.º 14
0
 public void SetResolution(double resolution, ReadOnlyPoint centerOfZoom)
 {
     _viewport.SetResolution(resolution, centerOfZoom);
 }