Exemple #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;
        }
Exemple #2
0
 private static extern Rect _textRendererGetTextBounds(TextRenderOptions opt,string text);
Exemple #3
0
 private static extern IntPtr _textRendererDrawText(TextRenderOptions opt,string text);
Exemple #4
0
 public static Rect GetTextBounds(TextRenderOptions options, string text)
 {
     return _textRendererGetTextBounds(options, text);
 }