@@ -9,25 +9,25 @@ use sys::gfx::rotozoom;
99/// `RotozoomSurface` for work with rust-sdl2 Surface type
1010pub trait RotozoomSurface {
1111 /// Rotates and zooms a surface and optional anti-aliasing.
12- fn rotozoom ( & self , angle : f64 , zoom : f64 , smooth : bool ) -> Result < Surface , String > ;
12+ fn rotozoom ( & self , angle : f64 , zoom : f64 , smooth : bool ) -> Result < Surface < ' _ > , String > ;
1313 /// Rotates and zooms a surface with different horizontal and vertical scaling factors and optional anti-aliasing.
1414 fn rotozoom_xy (
1515 & self ,
1616 angle : f64 ,
1717 zoomx : f64 ,
1818 zoomy : f64 ,
1919 smooth : bool ,
20- ) -> Result < Surface , String > ;
20+ ) -> Result < Surface < ' _ > , String > ;
2121 /// Zoom a surface by independent horizontal and vertical factors with optional smoothing.
22- fn zoom ( & self , zoomx : f64 , zoomy : f64 , smooth : bool ) -> Result < Surface , String > ;
22+ fn zoom ( & self , zoomx : f64 , zoomy : f64 , smooth : bool ) -> Result < Surface < ' _ > , String > ;
2323 /// Shrink a surface by an integer ratio using averaging.
24- fn shrink ( & self , factorx : i32 , factory : i32 ) -> Result < Surface , String > ;
24+ fn shrink ( & self , factorx : i32 , factory : i32 ) -> Result < Surface < ' _ > , String > ;
2525 /// Rotates a 8/16/24/32 bit surface in increments of 90 degrees.
26- fn rotate_90deg ( & self , turns : i32 ) -> Result < Surface , String > ;
26+ fn rotate_90deg ( & self , turns : i32 ) -> Result < Surface < ' _ > , String > ;
2727}
2828
2929impl < ' a > RotozoomSurface for Surface < ' a > {
30- fn rotozoom ( & self , angle : f64 , zoom : f64 , smooth : bool ) -> Result < Surface , String > {
30+ fn rotozoom ( & self , angle : f64 , zoom : f64 , smooth : bool ) -> Result < Surface < ' _ > , String > {
3131 let raw = unsafe { rotozoom:: rotozoomSurface ( self . raw ( ) , angle, zoom, smooth as c_int ) } ;
3232 if ( raw as * mut ( ) ) . is_null ( ) {
3333 Err ( get_error ( ) )
@@ -41,7 +41,7 @@ impl<'a> RotozoomSurface for Surface<'a> {
4141 zoomx : f64 ,
4242 zoomy : f64 ,
4343 smooth : bool ,
44- ) -> Result < Surface , String > {
44+ ) -> Result < Surface < ' _ > , String > {
4545 let raw = unsafe {
4646 rotozoom:: rotozoomSurfaceXY ( self . raw ( ) , angle, zoomx, zoomy, smooth as c_int )
4747 } ;
@@ -51,15 +51,15 @@ impl<'a> RotozoomSurface for Surface<'a> {
5151 unsafe { Ok ( Surface :: from_ll ( raw) ) }
5252 }
5353 }
54- fn zoom ( & self , zoomx : f64 , zoomy : f64 , smooth : bool ) -> Result < Surface , String > {
54+ fn zoom ( & self , zoomx : f64 , zoomy : f64 , smooth : bool ) -> Result < Surface < ' _ > , String > {
5555 let raw = unsafe { rotozoom:: zoomSurface ( self . raw ( ) , zoomx, zoomy, smooth as c_int ) } ;
5656 if ( raw as * mut ( ) ) . is_null ( ) {
5757 Err ( get_error ( ) )
5858 } else {
5959 unsafe { Ok ( Surface :: from_ll ( raw) ) }
6060 }
6161 }
62- fn shrink ( & self , factorx : i32 , factory : i32 ) -> Result < Surface , String > {
62+ fn shrink ( & self , factorx : i32 , factory : i32 ) -> Result < Surface < ' _ > , String > {
6363 let raw =
6464 unsafe { rotozoom:: shrinkSurface ( self . raw ( ) , factorx as c_int , factory as c_int ) } ;
6565 if ( raw as * mut ( ) ) . is_null ( ) {
@@ -68,7 +68,7 @@ impl<'a> RotozoomSurface for Surface<'a> {
6868 unsafe { Ok ( Surface :: from_ll ( raw) ) }
6969 }
7070 }
71- fn rotate_90deg ( & self , turns : i32 ) -> Result < Surface , String > {
71+ fn rotate_90deg ( & self , turns : i32 ) -> Result < Surface < ' _ > , String > {
7272 let raw = unsafe { rotozoom:: rotateSurface90Degrees ( self . raw ( ) , turns as c_int ) } ;
7373 if ( raw as * mut ( ) ) . is_null ( ) {
7474 Err ( get_error ( ) )
0 commit comments