Exemplo n.º 1
0
        public static Texture RenderText(TextRenderOptions options, string text)
        {
            Texture texture = TextureFactory.CreateTexture();
            Bitmap b = new Bitmap(_textRendererDrawText(options, text));
            texture.InitFromBitmap(b);

            return texture;
        }
Exemplo n.º 2
0
 private static extern Rect _textRendererGetTextBounds(TextRenderOptions opt,string text);
Exemplo n.º 3
0
 private static extern IntPtr _textRendererDrawText(TextRenderOptions opt,string text);
Exemplo n.º 4
0
 public static Rect GetTextBounds(TextRenderOptions options, string text)
 {
     return _textRendererGetTextBounds(options, text);
 }