public static unsafe int Mix_SetSoundFonts(string paths) { byte *utf8Paths = SDL.Utf8Encode(paths); int result = INTERNAL_Mix_SetSoundFonts( utf8Paths ); Marshal.FreeHGlobal((IntPtr)utf8Paths); return(result); }
public static unsafe IntPtr IMG_Load(string file) { byte * utf8File = SDL.Utf8Encode(file); IntPtr handle = INTERNAL_IMG_Load( utf8File ); Marshal.FreeHGlobal((IntPtr)utf8File); return(handle); }
public static unsafe int Mix_SetMusicCMD(string command) { byte *utf8Cmd = SDL.Utf8Encode(command); int result = INTERNAL_Mix_SetMusicCMD( utf8Cmd ); Marshal.FreeHGlobal((IntPtr)utf8Cmd); return(result); }
public static unsafe int IMG_SavePNG(IntPtr surface, string file) { byte *utf8File = SDL.Utf8Encode(file); int result = INTERNAL_IMG_SavePNG( surface, utf8File ); Marshal.FreeHGlobal((IntPtr)utf8File); return(result); }
public static unsafe IntPtr TTF_OpenFont(string file, int ptsize) { byte * utf8File = SDL.Utf8Encode(file); IntPtr handle = INTERNAL_TTF_OpenFont( utf8File, ptsize ); Marshal.FreeHGlobal((IntPtr)utf8File); return(handle); }
public static unsafe IntPtr IMG_LoadTyped_RW( IntPtr src, int freesrc, string type ) { int utf8TypeBufSize = SDL.Utf8Size(type); byte *utf8Type = stackalloc byte[utf8TypeBufSize]; return(INTERNAL_IMG_LoadTyped_RW( src, freesrc, SDL.Utf8Encode(type, utf8Type, utf8TypeBufSize) )); }
public static unsafe IntPtr TTF_RenderUTF8_Blended( IntPtr font, string text, SDL.SDL_Color fg ) { byte * utf8Text = SDL.Utf8Encode(text); IntPtr result = INTERNAL_TTF_RenderUTF8_Blended( font, utf8Text, fg ); Marshal.FreeHGlobal((IntPtr)utf8Text); return(result); }
public static unsafe IntPtr IMG_LoadTextureTyped_RW( IntPtr renderer, IntPtr src, int freesrc, string type ) { byte * utf8Type = SDL.Utf8Encode(type); IntPtr handle = INTERNAL_IMG_LoadTextureTyped_RW( renderer, src, freesrc, utf8Type ); Marshal.FreeHGlobal((IntPtr)utf8Type); return(handle); }
public static unsafe int TTF_SizeUTF8( IntPtr font, string text, out int w, out int h ) { byte *utf8Text = SDL.Utf8Encode(text); int result = INTERNAL_TTF_SizeUTF8( font, utf8Text, out w, out h ); Marshal.FreeHGlobal((IntPtr)utf8Text); return(result); }
public static unsafe IntPtr TTF_RenderUTF8_Shaded_Wrapped( IntPtr font, string text, SDL.SDL_Color fg, SDL.SDL_Color bg, uint wrapLength ) { byte * utf8Text = SDL.Utf8Encode(text); IntPtr result = INTERNAL_TTF_RenderUTF8_Shaded_Wrapped( font, utf8Text, fg, bg, wrapLength ); Marshal.FreeHGlobal((IntPtr)utf8Text); return(result); }
public static unsafe int TTF_MeasureUTF8( IntPtr font, string text, int measure_width, out int extent, out int count ) { byte *utf8Text = SDL.Utf8Encode(text); int result = INTERNAL_TTF_MeasureUTF8( font, utf8Text, measure_width, out extent, out count ); Marshal.FreeHGlobal((IntPtr)utf8Text); return(result); }