Fix BlitSurface, add BlitSurfaceScaled

This commit is contained in:
Ethan Lee 2013-09-29 05:45:58 -04:00
parent 390a6c2cb3
commit e7f9b53796

View File

@ -2585,7 +2585,7 @@ namespace SDL2
} }
/* src and dst refer to an SDL_Surface* */ /* src and dst refer to an SDL_Surface* */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, EntryPoint = "SDL_UpperBlit", CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_BlitSurface( public static extern int SDL_BlitSurface(
IntPtr src, IntPtr src,
ref SDL_Rect srcrect, ref SDL_Rect srcrect,
@ -2593,6 +2593,93 @@ namespace SDL2
ref SDL_Rect dstrect ref SDL_Rect dstrect
); );
/* src and dst refer to an SDL_Surface*
* Internally, this function contains logic to use default values when
* source and destination rectangles are passed as NULL.
* This overload allows for IntPtr.Zero (null) to be passed for srcrect.
*/
[DllImport(nativeLibName, EntryPoint = "SDL_UpperBlit", CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_BlitSurface(
IntPtr src,
IntPtr srcrect,
IntPtr dst,
ref SDL_Rect dstrect
);
/* src and dst refer to an SDL_Surface*
* Internally, this function contains logic to use default values when
* source and destination rectangles are passed as NULL.
* This overload allows for IntPtr.Zero (null) to be passed for dstrect.
*/
[DllImport(nativeLibName, EntryPoint = "SDL_UpperBlit", CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_BlitSurface(
IntPtr src,
ref SDL_Rect srcrect,
IntPtr dst,
IntPtr dstrect
);
/* src and dst refer to an SDL_Surface*
* Internally, this function contains logic to use default values when
* source and destination rectangles are passed as NULL.
* This overload allows for IntPtr.Zero (null) to be passed for both SDL_Rects.
*/
[DllImport(nativeLibName, EntryPoint = "SDL_UpperBlit", CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_BlitSurface(
IntPtr src,
IntPtr srcrect,
IntPtr dst,
IntPtr dstrect
);
/* src and dst refer to an SDL_Surface* */
[DllImport(nativeLibName, EntryPoint = "SDL_UpperBlitScaled", CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_BlitSurfaceScaled(
IntPtr src,
ref SDL_Rect srcrect,
IntPtr dst,
ref SDL_Rect dstrect
);
/* src and dst refer to an SDL_Surface*
* Internally, this function contains logic to use default values when
* source and destination rectangles are passed as NULL.
* This overload allows for IntPtr.Zero (null) to be passed for srcrect.
*/
[DllImport(nativeLibName, EntryPoint = "SDL_UpperBlitScaled", CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_BlitSurfaceScaled(
IntPtr src,
IntPtr srcrect,
IntPtr dst,
ref SDL_Rect dstrect
);
/* src and dst refer to an SDL_Surface*
* Internally, this function contains logic to use default values when
* source and destination rectangles are passed as NULL.
* This overload allows for IntPtr.Zero (null) to be passed for dstrect.
*/
[DllImport(nativeLibName, EntryPoint = "SDL_UpperBlitScaled", CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_BlitSurfaceScaled(
IntPtr src,
ref SDL_Rect srcrect,
IntPtr dst,
IntPtr dstrect
);
/* src and dst refer to an SDL_Surface*
* Internally, this function contains logic to use default values when
* source and destination rectangles are passed as NULL.
* This overload allows for IntPtr.Zero (null) to be passed for both SDL_Rects.
*/
[DllImport(nativeLibName, EntryPoint = "SDL_UpperBlitScaled", CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_BlitSurfaceScaled(
IntPtr src,
IntPtr srcrect,
IntPtr dst,
IntPtr dstrect
);
/* src and dst are void* pointers */ /* src and dst are void* pointers */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_ConvertPixels( public static extern int SDL_ConvertPixels(