Added RWops versions of OpenFont to support loading TTFs from memory.
This commit is contained in:
parent
48bae22f0e
commit
1c6261532c
@ -100,6 +100,14 @@ namespace SDL2
|
|||||||
int ptsize
|
int ptsize
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/* IntPtr refers to a SDL_RWops* */
|
||||||
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern IntPtr TTF_OpenFontRW(
|
||||||
|
IntPtr src,
|
||||||
|
int freesrc,
|
||||||
|
int ptsize
|
||||||
|
);
|
||||||
|
|
||||||
/* IntPtr refers to a TTF_Font* */
|
/* IntPtr refers to a TTF_Font* */
|
||||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern IntPtr TTF_OpenFontIndex(
|
public static extern IntPtr TTF_OpenFontIndex(
|
||||||
@ -109,6 +117,15 @@ namespace SDL2
|
|||||||
long index
|
long index
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/* IntPtr refers to a SDL_RWops* */
|
||||||
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern IntPtr TTF_OpenFontIndexRW(
|
||||||
|
IntPtr src,
|
||||||
|
int freesrc,
|
||||||
|
int ptsize,
|
||||||
|
long index
|
||||||
|
);
|
||||||
|
|
||||||
/* font refers to a TTF_Font* */
|
/* font refers to a TTF_Font* */
|
||||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern int TTF_GetFontStyle(IntPtr font);
|
public static extern int TTF_GetFontStyle(IntPtr font);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user