diff --git a/src/SDL2.cs b/src/SDL2.cs index 9c97f64..146bda8 100644 --- a/src/SDL2.cs +++ b/src/SDL2.cs @@ -1926,6 +1926,13 @@ namespace SDL2 int count ); + /* renderer refers to an SDL_Renderer* */ + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern void SDL_RenderGetClipRect( + IntPtr renderer, + out SDL_Rect rect + ); + /* renderer refers to an SDL_Renderer* */ [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern void SDL_RenderGetLogicalSize( @@ -1955,6 +1962,22 @@ namespace SDL2 int pitch ); + /* renderer refers to an SDL_Renderer* */ + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern int SDL_RenderSetClipRect( + IntPtr renderer, + ref SDL_Rect rect + ); + + /* renderer refers to an SDL_Renderer* + * This overload allows for IntPtr.Zero (null) to be passed for rect. + */ + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern int SDL_RenderSetClipRect( + IntPtr renderer, + IntPtr rect + ); + /* renderer refers to an SDL_Renderer* */ [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern int SDL_RenderSetLogicalSize(