@@ -88,12 +88,12 @@ fn strategy_to_steps(s: Strategy) -> Option<Vec<Step>> {
8888
8989 //Scale_to_outer can reduce the width, then crop the height, causing both coordinates to be smaller
9090 //TODO: perhaps combine scale_to_outer and crop() into a single operation to prevent this?
91- Strategy :: CropOrAspect => { steps ( ) . skip_if ( Cond :: Either ( Ordering :: Less ) ) . scale_to_outer ( ) . crop ( )
91+ Strategy :: CropOrAspect => { steps ( ) . skip_if ( Cond :: Either ( Ordering :: Less ) ) . fill_crop ( )
9292 . new_seq ( ) . skip_unless ( Cond :: Either ( Ordering :: Less ) ) . crop_aspect ( ) } ,
9393
9494
9595 //I think we need multiple parts, as we don't offer a way to compare against the obox
96- Strategy :: CropDownscaleOnly => { steps ( ) . skip_if ( Cond :: Either ( Ordering :: Less ) ) . scale_to_outer ( ) . crop ( ) . new_seq ( ) . skip_unless ( Cond :: Larger1DSmaller1D ) . crop_intersection ( ) } ,
96+ Strategy :: CropDownscaleOnly => { steps ( ) . skip_if ( Cond :: Either ( Ordering :: Less ) ) . fill_crop ( ) . new_seq ( ) . skip_unless ( Cond :: Larger1DSmaller1D ) . crop_intersection ( ) } ,
9797 // Strategy::CropCarefulDownscale => StepSet::AnyLarger(vec![Step::ScaleToOuter,
9898 // Step::PartialCropAspect, Step::ScaleToInner]),
9999 // Strategy::ExactCropAllowUpscaling => StepSet::Always(vec![Step::ScaleToOuter,
@@ -591,7 +591,7 @@ fn test_scale_to_outer(){
591591#[ test]
592592fn test_scale_to_outer_and_crop ( ) {
593593 let cropper = sizing:: IdentityCropProvider :: new ( ) ;
594- let result = Layout :: create ( r ( 2 , 4 ) , r ( 1 , 3 ) ) . execute_all ( & steps ( ) . scale_to_outer ( ) . crop ( ) . into_vec ( ) , & cropper) . unwrap ( ) ;
594+ let result = Layout :: create ( r ( 2 , 4 ) , r ( 1 , 3 ) ) . execute_all ( & steps ( ) . fill_crop ( ) . into_vec ( ) , & cropper) . unwrap ( ) ;
595595 assert_eq ! ( result. get_source_crop( ) , r( 1 , 4 ) )
596596}
597597
@@ -995,4 +995,4 @@ static SMALL_PRIMES:[i32;1000] = [
995995, 7573 , 7577 , 7583 , 7589 , 7591 , 7603 , 7607 , 7621 , 7639 , 7643
996996, 7649 , 7669 , 7673 , 7681 , 7687 , 7691 , 7699 , 7703 , 7717 , 7723
997997, 7727 , 7741 , 7753 , 7757 , 7759 , 7789 , 7793 , 7817 , 7823 , 7829
998- , 7841 , 7853 , 7867 , 7873 , 7877 , 7879 , 7883 , 7901 , 7907 , 7919 ] ;
998+ , 7841 , 7853 , 7867 , 7873 , 7877 , 7879 , 7883 , 7901 , 7907 , 7919 ] ;
0 commit comments