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(); }
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(); }