Пример #1
0
 public void Can_zoom_in()
 {
     var transform = new ScreenTransform( 0, 100, 0, 100 );
     transform.ZoomIn( 10 );
     Assert.That( transform.MinX, Is.EqualTo( 5 ) );
     Assert.That( transform.MaxX, Is.EqualTo( 95 ) );
     Assert.That( transform.MinY, Is.EqualTo( 5 ) );
     Assert.That( transform.MaxY, Is.EqualTo( 95 ) );
 }
Пример #2
0
 public void Zoom_is_relative_to_span_in_each_direction()
 {
     var transform = new ScreenTransform( 0, 100, 0, 200 );
     transform.ZoomIn( 10 );
     Assert.That( transform.MinX, Is.EqualTo( 5 ) );
     Assert.That( transform.MaxX, Is.EqualTo( 95 ) );
     Assert.That( transform.MinY, Is.EqualTo( 10 ) );
     Assert.That( transform.MaxY, Is.EqualTo( 190 ) );
 }
Пример #3
0
 public void Max_zoom_in_one_step_is_fifty()
 {
     var transform = new ScreenTransform( 0, 100, 0, 100 );
     transform.ZoomIn( 100 );
     Assert.That( transform.MinX, Is.EqualTo( 25 ) );
     Assert.That( transform.MaxX, Is.EqualTo( 75 ) );
     Assert.That( transform.MinY, Is.EqualTo( 25 ) );
     Assert.That( transform.MaxY, Is.EqualTo( 75 ) );
 }