/// <summary> /// this function make a zoom out action /// </summary> public void ZoomOut() { this.currentZoom = this.currentZoom - 3; if (this.currentZoom < 0) { this.currentZoom = 0; } if (this.currentScaleChangeEffect != null) { this.currentScaleChangeEffect.End(); } this.currentScaleChangeEffect = this.settings.ChangeScale(this, this.arrayZoom[this.currentZoom]); this.currentScaleChangeEffect.Begin(); }
/// <summary> /// this function changes the zoom value by creating an animation /// </summary> /// <param name="ratio">the final zoom ratio</param> public void Zoom(int ratio) { lock (this) { this.currentZoom = ratio; if (this.currentScaleChangeEffect != null) { this.currentScaleChangeEffect.End(); } this.currentScaleChangeEffect = this.settings.ChangeScale(this, this.arrayZoom[this.currentZoom]); this.currentScaleChangeEffect.Begin(); } }