예제 #1
0
        public static unsafe IntPtr TTF_RenderUTF8_Solid_Wrapped(
            IntPtr font,
            string text,
            SDL.SDL_Color fg,
            uint wrapLength
            )
        {
            byte * utf8Text = SDL.Utf8EncodeHeap(text);
            IntPtr result   = INTERNAL_TTF_RenderUTF8_Solid_Wrapped(
                font,
                utf8Text,
                fg,
                wrapLength
                );

            Marshal.FreeHGlobal((IntPtr)utf8Text);
            return(result);
        }
예제 #2
0
        public static unsafe int TTF_SizeUTF8(
            IntPtr font,
            string text,
            out int w,
            out int h
            )
        {
            byte *utf8Text = SDL.Utf8EncodeHeap(text);
            int   result   = INTERNAL_TTF_SizeUTF8(
                font,
                utf8Text,
                out w,
                out h
                );

            Marshal.FreeHGlobal((IntPtr)utf8Text);
            return(result);
        }
예제 #3
0
        public static unsafe IntPtr TTF_RenderUTF8_Shaded(
            IntPtr font,
            string text,
            SDL.SDL_Color fg,
            SDL.SDL_Color bg
            )
        {
            byte * utf8Text = SDL.Utf8EncodeHeap(text);
            IntPtr result   = INTERNAL_TTF_RenderUTF8_Shaded(
                font,
                utf8Text,
                fg,
                bg
                );

            Marshal.FreeHGlobal((IntPtr)utf8Text);
            return(result);
        }
예제 #4
0
        public static unsafe int TTF_MeasureUTF8(
            IntPtr font,
            string text,
            int measure_width,
            out int extent,
            out int count
            )
        {
            byte *utf8Text = SDL.Utf8EncodeHeap(text);
            int   result   = INTERNAL_TTF_MeasureUTF8(
                font,
                utf8Text,
                measure_width,
                out extent,
                out count
                );

            Marshal.FreeHGlobal((IntPtr)utf8Text);
            return(result);
        }