示例#1
0
 public void Zoom(Extents extents)
 {
     Scale  = Math.Max(extents.Range(0) / this.ActualWidth, extents.Range(1) / this.ActualHeight);
     Origin = new Point(this.ActualWidth / 2 - extents.Center().X / Scale, this.ActualHeight / 2 + extents.Center().Y / Scale);
     this.RenderLayers();
     this.AdjustMagFactor();
 }
示例#2
0
 private void Zoom(Extents extents)
 {
     this.Scale  = Math.Max(extents.Range(0) / this.ActualWidth, extents.Range(1) / this.ActualHeight);
     this.Origin = new Point(this.ActualWidth / 2 - extents.Center().X / this.Scale, this.ActualHeight / 2 - extents.Center().Y / this.Scale);
     this.RenderLayers();
 }